ZabbixCPU溫度監視-Centos

來源:互聯網
上載者:User

標籤:

ZabbixCPU溫度監視

1, lm_sensors安裝

#yum install lm_sensors

#sensors-detect

出來的選項全部選yes

 

重啟伺服器

 

2, lm_sensors出力結果調整

命令sensors可以顯示組件溫度(機器不同顯示的內容也不同)

[[email protected] sbin]# sensors

coretemp-isa-0000

Adapter: ISA adapter

Core 0: +40°C (high = +100°C)

 

coretemp-isa-0001

Adapter: ISA adapter

Core 1: +37°C (high = +100°C)

 

命令sensors –u <組件編號>可以單獨取出指定組件的溫度

[[email protected] sbin]# sensors -u coretemp-isa-0000

coretemp-isa-0000

Adapter: ISA adapter

Core 0: 40.00 (temp1)

temp1_crit: 100.00 (temp1_crit)

temp1_crit_alarm: 0.00 (temp1_crit_alarm)

 

把出力結果加工(根據實際情況加工)

例:

[[email protected] etc]# sensors -u coretemp-isa-0000 |grep Core |cut -d" " -f3|cut -d"." -f1

40

[[email protected] etc]# sensors -u coretemp-isa-0001 |grep Core |cut -d" " -f3|cut -d"." -f1

37

 

3, Zabbix_agentd.conf設定

 

在zabbix_agentd.conf中加入UserParameter

 

[[email protected] etc]# vi /usr/local/etc/zabbix_agentd.conf

……

### Option: UserParameter

# User-defined parameter to monitor. There can be several user-defined parameters.

# Format: UserParameter=<key>,<shell command>

# See ‘zabbix_agentd‘ directory for examples.

#

# Mandatory: no

# Default:

# UserParameter=

UserParameter=cputemp.core0,/usr/bin/sensors -u coretemp-isa-0000 |grep Core |cut -d" " -f3|cut -d"." -f1

UserParameter=cputemp.core1,/usr/bin/sensors -u coretemp-isa-0001 |grep Core |cut -d" " -f3|cut -d"." -f1

……

 

重啟zabbix_agentd

[[email protected] etc]# /sbin/service zabbix_agentd restart

Stopping Zabbix Agent: [ OK ]

Starting Zabbix Agent: [ OK ]

 

4, Zabbix伺服器端設定

建立item,如,未顯示的預設設定就好

建立trigle,

例:

就可以監視起來了

ZabbixCPU溫度監視-Centos

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.