熱門搜索 Zabbix技術資料 Zabbix常見問、答討論 成功案例 Zabbix交流區(qū) Prometheus交流區(qū)
agent與snmp是zabbix兩種重要的監(jiān)控方式,這一期主要介紹zabbix Agent item監(jiān)控項。。zabbix agent分為主動代理、被動代理,配置item類型時,可以選擇需要的類型:
zabbix agent :用于被動檢查
zabbix agent(active):用戶主動檢查
在zabbix Server上使用zabbix_get命令可以從監(jiān)控對象獲取監(jiān)控參數(shù)的具體內(nèi)容。zabbix_get命令的具體使用方法如下:
zabbix_get ?-s ?目標服務器IP ?-p??端口(10050)??-k ?{key}
具體執(zhí)行結(jié)果如下:
zabbix_get -s 192.168.3.166 -p 10050 -k system.boottime
2.1.?監(jiān)控操作系統(tǒng)信息(OS)
system.boottime
# 系統(tǒng)啟動的時間點(Host boot time)(單位:時間戳);API中參數(shù)history需指定為3;
system.uptime
# 系統(tǒng)已運行時長(System uptime)(單位:秒);API中參數(shù)history需指定為3;
system.localtime
# 系統(tǒng)時間(Host local time)(單位:時間戳);API中參數(shù)history需指定為3;
system.hostname
# 主機名(Host name);API中參數(shù)history需指定為1;
2.1.?網(wǎng)卡信息(Network interfaces)
對傳輸網(wǎng)卡信息進行監(jiān)控查看等
net.if.out[br0]
# 網(wǎng)卡流速,流出方向;時間間隔60s;
# 獲取指定網(wǎng)卡(br0)的流出流量的流速值(Outgoing network traffic on br0),br0為網(wǎng)卡名稱,根據(jù)實際情況填寫;時間間隔60s;
net.if.in[br0]
# 網(wǎng)卡流速,流入方向(單位:字節(jié));
API中參數(shù)history需指定為3;下同;時間間隔60s;
# 獲取指定網(wǎng)卡(br0)的流入流量的流速值(Incoming network traffic on br0),br0為網(wǎng)卡名稱,根據(jù)實際情況填寫;時間間隔60s;
2.3.?進程信息
proc.num[]
#?目前系統(tǒng)中的進程總數(shù)(Number of processes);時間間隔60s;
proc.num[,,run]
#?目前正在運行(處于運行態(tài))的進程總數(shù)(Number of running processes);時間間隔60s;
2.4.?CPU信息
合理的控制用戶態(tài)、系統(tǒng)態(tài)、io等待時間可以保證進程高效率的運行。
系統(tǒng)態(tài)運行時間較高說明進程進行系統(tǒng)調(diào)用的次數(shù)比較多。一般的程序,如果系統(tǒng)態(tài)運行時間占用過高,就需要優(yōu)化程序,減少系統(tǒng)調(diào)用。
io等待時間的比例過高,則表明硬盤的IO性能差,如果是讀寫文件比較頻繁,讀寫效率要求比較高,可以考慮更換硬盤,或者使用多磁盤做Raid的方案。
system.cpu.switches
# CPU的進程上下文切換(Context switches per seconds),單位sps,表示每秒采樣次數(shù);API中參數(shù)history需指定為3;時間間隔60s;
system.cpu.intr
# CPU中斷數(shù)量(Interrupts per second);
API中參數(shù)history需指定為3;
system.cpu.load[percpu,avg1]
# CPU每分鐘的負載值,按照核數(shù)做平均值(Processor load (1 min average per core));API中參數(shù)history需指定為0;下同
system.cpu.load[percpu,avg5]
# CPU每5分鐘的負載值,按照核數(shù)做平均值(Processor load (5 min average per core))
system.cpu.load[percpu,avg15]
# CPU每15分鐘的負載值,按照核數(shù)做平均值(Processor load (15 min average per core))
system.cpu.util[,softirq]
# CPU的軟中斷時間,百分比形式(CPU softirq time);API中參數(shù)history需指定為0;下同
system.cpu.util[,steal]
# CPU的偷盜的時間,百分比形式(CPU steal time);
system.cpu.util[,idle]
# CPU的空閑時間,百分比形式(CPU idle time);API中參數(shù)history需指定為0;下同;時間間隔60s;
system.cpu.util[,user]
# CPU的用戶態(tài)運行時間,百分比形式(CPU user time);時間間隔60s;
system.cpu.util[,system]
# CPU的系統(tǒng)態(tài)運行時間,百分比形式(CPU system time);時間間隔60s;
system.cpu.util[,iowait]
# CPU的io等待時間,百分比形式(CPU iowait time)
system.cpu.util[,interrupt]
# CPU的中斷時間,百分比形式(CPU interrupt time)
system.cpu.util[,nice]
# CPU的nice時間,百分比形式(CPU nice time)
2.5.?內(nèi)存信息
zabbix_get獲取內(nèi)存使用信息
system.swap.size[available]
# 物理內(nèi)存目前可用的容量(Available memory)(單位:字節(jié));API中參數(shù)history需指定為3;時間間隔60s;
system.swap.size[,total]
# swap分區(qū)的總?cè)萘?Total swap space);API中參數(shù)history需指定為3;時間間隔3600s;
system.swap.size[,free]
# swap分區(qū)尚可使用的容量(Free swap space);API中參數(shù)history需指定為3;時間間隔60s;
system.swap.size[,pfree]
# swap分區(qū)尚可使用的容量,百分比形式(Free swap space in %);API中參數(shù)history需指定為0;時間間隔60s;
vm.memory.size[total]
# 物理內(nèi)存總量(Total memory)(單位:字節(jié));API中參數(shù)history需指定為3;時間間隔3600s;
2.6.?agent信息
agent.ping
# Agent的在線狀態(tài)(Agent ping);API中參數(shù)history需指定為3;
agent.hostname
# zabbix Agent的hostname(Host name of zabbix_agentd running);
agent.version
# Agent的軟件版本號(Version of zabbix_agent(d) running)
以上就是這一期的內(nèi)容。大家好,我是樂樂,專注運維技術研究與分享,關注我,學習更多zabbix技術知識。如有zabbix問題還可以到尊龍時凱社區(qū)提問留言,一起交流zabbix技術心得。
尊龍時凱一站式的監(jiān)控了IT基礎架構和業(yè)務系統(tǒng),同時還為重要業(yè)務系統(tǒng)設計業(yè)務地圖,針對核心業(yè)務多維度重點保障。
View details尊龍時凱從基礎資源、中間件、數(shù)據(jù)庫、到第三方系統(tǒng),提供全方位、快速關聯(lián)的監(jiān)控管理和分析能力,幫助用戶及時了解應用系統(tǒng)的運行狀態(tài)、性能、異常,防患于未然。
View details綜合運維管理平臺的落地,實現(xiàn)了統(tǒng)一門戶、統(tǒng)一監(jiān)控、統(tǒng)一資產(chǎn)管理、統(tǒng)一運維、統(tǒng)一存儲等目標,為客戶解決了運維數(shù)據(jù)孤島、人力運維等問題。
View details基于客戶企業(yè)原有的運維體系、運維痛點與具體需求,尊龍時凱為其量身打造了一套一站式智能運維監(jiān)控解決方案,搭建統(tǒng)一監(jiān)控平臺整體框架,引入智能化告警管理系統(tǒng)...
View details