ユーザ用ツール

サイト用ツール


サイドバー

このページの翻訳:



最近の更新



Tag Cloud

01_linux:04_監視:zabbix:18_zabbix_api

18 Zabbix API

32桁のトークンを取得する

user: hogehoge
password: hogehgoepass

# curl -XPOST http://hogehoge.net/zabbix/api_jsonrpc.php \
-H "Content-Type: application/json-rpc" \
-d '{
"jsonrpc": "2.0", 
"method": "user.login", 
"params": {"user": "hogehoge","password": "hogehogepass"},
"id": 1
}'
{"jsonrpc":"2.0","result":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","id":1}

最新のアラート3件

curl -XPOST http://hogehoge.net/zabbix/api_jsonrpc.php \
-H "Content-Type: application/json-rpc" \
-d '{
    "jsonrpc": "2.0",
    "method": "alert.get",
    "params": {
        "output": "extend",
        "limit": "3",
        "sortfield": "alertid",
        "sortorder": "DESC"
    },
    "auth": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "id": 1
}'

01_linux/04_監視/zabbix/18_zabbix_api.txt · 最終更新: 2021/02/26 22:18 by matsui