Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

sugtao4423/ServerStatus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ServerStatus

自作のServerStatusは廃止
Zabbixでの運用に切り替えた

Zabbixのグラフを外部のページに貼り付けられるようにしたもの

Refresh Servers

api.php?type=refreshServers

実行すると同じディレクトリにzabbix.jsonが作成される。

sessionはグラフの取得に必要なセッションIDであり、
hostsはZabbixのAPIを使用するユーザーが取得できるすべてのホスト名 ホストID グラフ名 グラフID グラフタイプの配列である。

JSON Sample

{
  "session": "hogehoge",
  "hosts": [
    {
      "hostid": 10198,
      "name": "MyroomRaspi",
      "graphs": [
        {
          "graphid": 825,
          "graphtype": 0,
          "name": "CPU jumps"
        },
        {
          "graphid": 826,
          "graphtype": 0,
          "name": "CPU load"
        }, ........
      ]
    }, ........
  ]
}

Get JSON of hosts array

api.php

Graph Image

api.php?type=chart&graphtype=${GraphType}&graphid=${GraphId}

Config

api.php

$ZBX_URL    = 'https://localhost.localdomain';
$ZBX_USER   = 'ZABBIX_USER';
$ZBX_PASSWD = 'ZABBIX_PASSWORD';

About

サーバーの状況把握

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published