Your SlideShare is downloading. ×
0
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Monitoring Server Temperature with Opsview
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Monitoring Server Temperature with Opsview

805

Published on

This slidedeck shows you how Opsview can be used to monitor server temperature and also the temperature of individual components within a server (Memory, CPU and Hard drives).

This slidedeck shows you how Opsview can be used to monitor server temperature and also the temperature of individual components within a server (Memory, CPU and Hard drives).

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
805
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 1
  • 2. Monitoring Linux and Unix Server  Temperatures with OpsviewWednesday, 21 November 2012 2
  • 3. About• This ‘how to’ presentation describes how to set up server temperature  monitoring for Linux and Unix servers• To obtain a copy of Opsview visit our website and download Opsview Core (free) or Opsview Pro (30 day trial). 3Wednesday, 21 November 2012
  • 4. Background• Managing power consumption in a Datacenter is a key factor in helping  keep overall business energy costs down and ensuring servers are  running at optimum performance. Overheating can lead to increased  costs for cooling and also runs the risk of servers crashing.• Opsview can be used to monitor server temperature and also the  temperature of individual components within a server (Memory, CPU  and Hard drives). Thresholds and alerts can be set for when critical  temperatures are exceeded, helping to keep hot‐running servers in  check.• This blog post details how to configure Opsview to monitor the  temperature of Linux and Unix servers. 4Wednesday, 21 November 2012
  • 5. Configuration• [NB: This guide assumes the system we wish to monitor already has the  Opsview agent installed]• As root, we will need to install “lm_sensors” and “hddtemp” (names may  differ by Linux distributions); on CentOS/RHEL they are acquired via  “yum install lm_sensors hddtemp”.• Once these items are installed, we will need to run “sensors‐detect” as  root to detect the items we’d like to monitor the temperature of. Once  completed, we will need to save this (simply hit ENTER) and the sensors‐ detect is complete.• Now lm_sensors and hddtemp are installed, we can test them locally as  following: 5Wednesday, 21 November 2012
  • 6. ConfigurationHDD Temp:[root@rhelserver ~]# hddtemp /dev/sda/dev/sda: ST3120811AS: 31°Clm_sensors:[root@rhelserver ~]# sensorscoretemp‐isa‐0000Adapter: ISA adapterCore 0: +38.0°C (high = +84.0°C, crit = +100.0°C)Core 1: +39.0°C (high = +84.0°C, crit = +100.0°C)Core 2: +37.0°C (high = +84.0°C, crit = +100.0°C)Core 3: +38.0°C (high = +84.0°C, crit = +100.0°C)i5k_amb‐isa‐0000Adapter: ISA adapterCh. 0 DIMM 0: +67.0°C (low = +110.5°C, high = +124.0°C)Ch. 1 DIMM 0: +62.0°C (low  = +110.5°C, high = +124.0°C) 6Wednesday, 21 November 2012
  • 7. Configuration• We can see as per the output above, that our sensors and their  temperature readings are detected and functioning as desired, now we  need to add plugins to take this output on a “per sensor” basis so we can  add it to a service check for monitoring server temperature.• Download the “check_lm_sensors” plugin from the link here and copy it  to /usr/local/nagios/libexec. Once done, extract it via “tar ‐zxvf check_lm_sensors‐3.1.1.tar.gz”. 7Wednesday, 21 November 2012
  • 8. Configuration• We can test our new plugin as root by running:  “/usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors – list” which should again list the sensors and their temperatures. If this  doesn’t work or gives Perl errors, then edit the check_lm_sensors file  using nano/vim, and at the top of the script add the following:use lib "/usr/local/nagios/perl/lib/"; 8Wednesday, 21 November 2012
  • 9. Configuration• To allow us to be able to run this command as the “nagios” user  (required for check_nrpe service checks), we need to:chmod +x /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensorschown –R nagios:nagios /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/ 9Wednesday, 21 November 2012
  • 10. Configuration• We also need to add a line to the “/etc/sudoers” file. As the root user,  append the following line to the bottom of /etc/sudoers:nagios ALL=(root) NOPASSWD:/usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors• This allows the nagios user to run check_lm_sensors as root without  having to authentication via password. 10Wednesday, 21 November 2012
  • 11. Configuration• We now have to add our check commands to our agent, as we will be  executing them locally on the server, and passing the output back to our  Opsview server via the check_nrpe command (NRPE being Nagios Remote Plugin Executor). To do this, we need to outline what our  commands are, and what we will refer to them as. To do this, we need to  edit the “overrides.cfg” file, located at/usr/local/nagios/etc/nrpe_local/override.cfg. 11Wednesday, 21 November 2012
  • 12. Configuration• We need to edit this file using a text editor such as vim or nano, i.e. “nano /usr/local/nagios/etc/nrpe_local/override.cfg”, and add lines similar to below:check_command[core0_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core0=45,55check_command[core1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core1=45,55check_command[core2_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core2=45,55check_command[core3_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core3=45,55check_command[dimm0_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.0DIMM0=60,75check_command[dimm1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.1DIMM0=60,75check_command[sda_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐3.1.1/check_lm_sensors ‐‐sanitize ‐‐high sdaTemp=60,75 12Wednesday, 21 November 2012
  • 13. About OpsviewOpsview delivers a single unified view of the health of all your distributed physical, virtual and hybrid cloud systems.We give DevOps staff all the tools they need to get their jobs done faster, easier and for less.• Opsview Enterprise offers large enterprises (+100 devices) and MSPs a certified,  professionally supported system with enhanced functionality such as dynamic  dashboards and reports• SMEs looking for feature‐rich dashboards to monitor the performance of their on‐ premise, virtualized or cloud apps choose Opsview Pro• Opsview Core is our free, open source monitoring tool ‐ you can test and customize it  how you want 13Wednesday, 21 November 2012

×