librenms 使用 Custom OID 時
Data Type 分為二種
說明一下要怎麼選
如果OID撈到的是當下的值而且不會持續累積
選擇 GAUGE
如果OID的值會持續累積
如果要等到當下的值 就要選擇 COUNTER
這樣才會用現在的值減到上一次的值
得到的才會是目前的值
另外如果建好後要改不同的data type
在web介面刪除後 要再進librenms os 手動刪除 對應的rrd檔 讓librenms 重建
如果不刪除 改type後 圖形不會重畫 所以會是錯的
cloudflare 提供免費靜態網頁的使用
講一下流程
先註冊或直使用google或其他帳號 (無需信用卡)
https://dash.cloudflare.com/login
登入後依照以下擷圖操作
使用上傳放式如果網頁內容有修改
不能只上傳修改部分
要砍掉重傳
snmp從windows server 2012 開始就被棄用
最近剛好看到 ncpa
nagios 出的工具
記錄一下安裝使用流程 被監控端以windows 為例
下載 windows agent 安裝
安裝過程中 token 記得要修改
監控端下載 check_ncpa.py
撈取被控端資料語法如下
# 1. 檢查 CPU 使用率 (5分鐘平均)
python3 check_ncpa.py -H 192.168.1.100 -t 'mytoken' -M 'cpu/percent' -q "aggregate=avg" -w 80 -c 90
# 2. 檢查記憶體使用率 (%)
python3 check_ncpa.py -H 192.168.1.100 -t 'mytoken' -M 'memory/virtual/percent' -w 80 -c 90
# 3. 檢查根目錄 / (Linux) 或 C: 磁碟空間 (Windows)
# Linux:
python3 check_ncpa.py -H 192.168.1.100 -t 'mytoken' -M 'disk/logical/|/percent' -w 80 -c 90
# Windows:
python3 check_ncpa.py -H 192.168.1.100 -t mytoken -M disk/logical/C:\|/used_percent -w 80 -c 90
查看所有可撈的指標
python3 check_ncpa.py -H 192.168.1.100 -t 'mytoken' -M 'disk/logical/C:|'
https://www.nagios.org/projects/ncpa/
https://assets.nagios.com/downloads/ncpa3/
https://github.com/NagiosEnterprises/ncpa/tree/master
https://github.com/NagiosEnterprises/ncpa/tree/master/client