2016年8月1日月曜日

[XenServer 6.5] CPU Temperature Monitoring by Zabbix 2.2


 I was successful to monitor CPU temp. on XenServer 6.5 by Zabbix 2.2 by followings.

○ Environment:


CPU : AMD FX-9590 (4.7 GHz)
Mother board : ASRock 990Fx Extream 9
Phisycal Memory : 8G x 2
HDD : Western Digital WD2002FAEX x 2  (RAID 1 by mdadm)
Hypervisor : Citrix  XenServer 6.5

○ Install lm_sensors package


1.Download lm_sensors binary file from the below link
ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/archive.fedoraproject.org/fedora/linux/releases/10/Fedora/x86_64/os/Packages/lm_sensors-3.0.2-1.fc10.x86_64.rpm 
2. Install the lm_sensors by rmp command.
[root@servername ~]# rpm -ivh lm_sensors-3.0.2-1.fc10.x86_64.rpm
3. Configure lm_sensors.
[root@servername ~]# sensors-detect
(#Answer "Y" to all questions.)
[root@servername ~]# modprobe  -v k10temp     (#Load driver)
[root@servername ~]# modprobe -v w83627ehf     (#Load driver)
[root@xenserver-ixyaeoht ~]# modprobe -v w83627ehf
insmod /lib/modules/3.10.0+2/kernel/drivers/hwmon/hwmon-vid.ko
insmod /lib/modules/3.10.0+2/kernel/drivers/hwmon/w83627ehf.ko
[root@servername ~]# sernsors
k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +21.6°C  (high = +70.0°C, crit = +70.0°C)

nct6776-isa-0290
Adapter: ISA adapter
in0:         +0.89 V  (min =  +0.00 V, max =  +1.74 V)
in1:         +1.85 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in2:         +3.25 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in3:         +3.25 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in4:         +1.48 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in5:         +1.69 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in7:         +3.46 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
in8:         +3.36 V  (min =  +0.00 V, max =  +0.00 V)   ALARM
fan1:          0 RPM  (min =    0 RPM)  ALARM
fan2:          0 RPM  (min =    0 RPM)  ALARM
fan3:          0 RPM  (min =    0 RPM)  ALARM
fan4:          0 RPM  (min =    0 RPM)  ALARM
fan5:          0 RPM  (min =    0 RPM)  ALARM
SYSTIN:      +33.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:      +36.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN:       +2.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
cpu0_vid:   +1.550 V
[root@servername ~]# sernsors -u
 k10temp-pci-00c3
Adapter: PCI adapter
temp1:
  temp1_input: 28.25
  temp1_max: 70.00
  temp1_crit: 70.00
  temp1_crit_hyst: 67.00

nct6776-isa-0290
Adapter: ISA adapter
in0:
  in0_input: 1.50
  in0_min: 0.00
  in0_max: 1.74
  in0_alarm: 0.00
in1:
  in1_input: 1.85
  in1_min: 0.00
  in1_max: 0.00
  in1_alarm: 1.00
in2:
  in2_input: 3.25
  in2_min: 0.00
  in2_max: 0.00
  in2_alarm: 1.00
in3:
  in3_input: 3.25
  in3_min: 0.00
  in3_max: 0.00
  in3_alarm: 1.00
in4:
  in4_input: 1.47
  in4_min: 0.00
  in4_max: 0.00
  in4_alarm: 1.00
in5:
  in5_input: 1.69
  in5_min: 0.00
  in5_max: 0.00
  in5_alarm: 1.00
in7:
  in7_input: 3.46
  in7_min: 0.00
  in7_max: 0.00
  in7_alarm: 1.00
in8:
  in8_input: 3.36
  in8_min: 0.00
  in8_max: 0.00
  in8_alarm: 1.00
fan1:
  fan1_input: 0.00
  fan1_min: 0.00
  fan1_alarm: 1.00
fan2:
  fan2_input: 0.00
  fan2_min: 0.00
  fan2_alarm: 1.00
fan3:
  fan3_input: 0.00
  fan3_min: 0.00
  fan3_alarm: 1.00
fan4:
  fan4_input: 0.00
  fan4_min: 0.00
  fan4_alarm: 1.00
fan5:
  fan5_input: 0.00
  fan5_min: 0.00
  fan5_alarm: 1.00
SYSTIN:
  temp1_input: 33.00
  temp1_max: 0.00
  temp1_max_hyst: 0.00
  temp1_alarm: 1.00
  temp1_type: 4.00
  temp1_offset: 0.00
CPUTIN:
  temp2_input: 36.00
  temp2_max: 80.00
  temp2_max_hyst: 75.00
  temp2_alarm: 0.00
  temp2_type: 4.00
  temp2_offset: 0.00
AUXTIN:
  temp3_input: 2.50
  temp3_max: 80.00
  temp3_max_hyst: 75.00
  temp3_alarm: 0.00
  temp3_type: 4.00
  temp3_offset: 0.00
cpu0_vid:
  cpu0_vid: 1.55
    I need only CPU temp. , so I don't care that fan speed can't be obtained.

○ Setting Zabbix 2.2 Agent on XenServer 6.5

1. Add the followings to /etc/zabbix/zabbix-agentd.conf on XenServer 6.5 to report .
 UserParameter=lm_sensors[*],sensors -u $1|grep $2|cut -d ":" -f2|cut -d " " -f2
2. Restart Zabbix agent on XenServer 6.5
  [root@servername ~]# /etc/init.d/zabbix-agent restart
3. Add a new Item for CPU temp.of XenServer 6.5 on Zabbix Server


4. You can get the following result after creating the graph.


○ Reference:

1. http://hidenosuke.org/diary/?date=20130429
2. http://blog.goo.ne.jp/shigen417/e/0207cc853b4a8a173fe4baa116bc14bf






0 件のコメント:

コメントを投稿