> ## Documentation Index
> Fetch the complete documentation index at: https://doc.lwops.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 6.3. Smartx

> 6.3.1. 获取smartx平台账密 联系客户获取只读账号权限密码 xxx/ppp 6.3.2. 验证账号密码测试获取token curl 命令测试获取token curl -X 'POST' 'http://smartx的api接口IP/api/v3/sessions' -H 'accep...

### 6.3.1. 获取smartx平台账密

联系客户获取只读账号权限密码 xxx/ppp

### 6.3.2. 验证账号密码测试获取token

curl 命令测试获取token

```
curl -X 'POST'  'http://smartx的api接口IP/api/v3/sessions'  -H 'accept: application/json'  -H 'content-language: en-US'  -H 'Content-Type: application/json'  -d '{"username": "xxx","password": "ppp"}'
```

返回如下json即为通过

![6.3. Smartx 操作截图 1](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-01.png)

返回如下报错则需要确认IP信息及账密信息是否准确

![6.3. Smartx 操作截图 2](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-02.png)

### 6.3.3. 将smartx模板导入监控平台

联系技术中心获取模板

![6.3. Smartx 操作截图 3](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-03.png)

分别传入五个模板

### 6.3.4. 脚本导入采集服务器（server/proxy）

联系技术中心获取脚本![6.3. Smartx 操作截图 4](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-04.png)上传 smartx6.0.zip 至外部检查脚本路径下，一般为/itops/zabbix/share/zabbix/externalscripts

```
cd/itops/zabbix/share/zabbix/externalscripts
unzip smartx6.0.zip
chmod -R +x smartx*
chown itops: smartx*
```

### 6.3.5. 配置模板面板信息等

![6.3. Smartx 操作截图 5](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-05.png)

### 6.3.6. 添加smartx监控对象，监控数据及采集情况确认

主机名称需要与IP地址一致，业务名称可以自定义

### 6.3.7.补充：界面测试查看可用接口信息

#### 6.3.7.1. smartx内部普罗米修斯数据对接

集群VIP地址:9090

![6.3. Smartx 操作截图 6](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-06.png)

获取示例： os\_memory\_used 是主机上 os 服务预留的内存大小（是一个固定值）。 主机当前的内存使用率，需要通过 metric api 来查询： 比如 [https://192.168.17.95/api/v3/metrics:query?query=host\_memory\_usage\_percent%7B\_host%3D%2281a76806-65ae-11e9-b874-5254005d05c5%22%7D%5B2h%5D](https://192.168.17.95/api/v3/metrics:query?query=host_memory_usage_percent%7B_host%3D%2281a76806-65ae-11e9-b874-5254005d05c5%22%7D%5B2h%5D)

#### 6.3.7.2. api接口在线文档界面

集群VIP地址/api/v3/docs

![6.3. Smartx 操作截图 7](https://lwweb.oss-cn-shenzhen.aliyuncs.com/docs/images/yuque/smartx/image-07.png)

#### 6.3.7.3. api在线文档

[https://code.smartx.com/](https://code.smartx.com/)
