SlideShare a Scribd company logo
1
Monitoring Linux and Unix Server 
                         Temperatures with Opsview




Wednesday, 21 November 2012                                2
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).




                                                                            3
Wednesday, 21 November 2012
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.


                                                                           4
Wednesday, 21 November 2012
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:

                                                                             5
Wednesday, 21 November 2012
Configuration
HDD Temp:
[root@rhelserver ~]# hddtemp /dev/sda
/dev/sda: ST3120811AS: 31°C

lm_sensors:
[root@rhelserver ~]# sensors
coretemp‐isa‐0000
Adapter: ISA adapter
Core 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‐0000
Adapter: ISA adapter
Ch. 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)



                                                           6
Wednesday, 21 November 2012
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”.




                                                                               7
Wednesday, 21 November 2012
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/";




                                                                               8
Wednesday, 21 November 2012
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_sensors

chown –R nagios:nagios /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/




                                                                     9
Wednesday, 21 November 2012
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.




                                                                              10
Wednesday, 21 November 2012
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.




                                                                              11
Wednesday, 21 November 2012
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,55
check_command[core1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core1=45,55
check_command[core2_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core2=45,55
check_command[core3_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core3=45,55
check_command[dimm0_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.0DIMM0=60,75
check_command[dimm1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.1DIMM0=60,75
check_command[sda_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐
3.1.1/check_lm_sensors ‐‐sanitize ‐‐high sdaTemp=60,75


                                                                                       12
Wednesday, 21 November 2012
About Opsview
Opsview 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


                                                                                              13
Wednesday, 21 November 2012

More Related Content

PPTX
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
PPTX
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
PDF
Automação do físico ao NetSecDevOps
PDF
Connect Amazon EC2 Linux Instance
PDF
Whitepaper MS SQL Server on Linux
PDF
Installation CentOS 6.3
PDF
Building a Two Node SLES 11 SP2 Linux Cluster with VMware
PDF
Simplifying Ceph Management with Virtual Storage Manager (VSM)
Managing Oracle Enterprise Manager Cloud Control 12c with Oracle Clusterware
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Automação do físico ao NetSecDevOps
Connect Amazon EC2 Linux Instance
Whitepaper MS SQL Server on Linux
Installation CentOS 6.3
Building a Two Node SLES 11 SP2 Linux Cluster with VMware
Simplifying Ceph Management with Virtual Storage Manager (VSM)

What's hot (20)

PDF
How To Install and Configure AWS CLI on RHEL 7
PDF
Student exercise guide_training_cmode_8.2
PDF
How To Install OpenFire in CentOS 7
PDF
Netxms install guide
PDF
Setup guide nos-v3_5
PDF
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
PDF
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
DOCX
C mode class
PPTX
VMworld 2016: vSphere 6.x Host Resource Deep Dive
PPTX
Automating Yourself Out of Trouble
PPTX
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
PDF
How To Install and Configure AWS CLI for Windows
PDF
Oracle EMC 12 Installation
PDF
Oracle Linux 7 Beta First Look (Installations)
PPTX
Systems administration for coders presentation
PDF
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
PDF
12c on RHEL7
PDF
Virtualization with Xen and openQRM 5.1 on Debian Wheezy
PDF
Guide to clone_sles_instances
PDF
Automated Amazon EC2 Cloud deployments with openQRM
How To Install and Configure AWS CLI on RHEL 7
Student exercise guide_training_cmode_8.2
How To Install OpenFire in CentOS 7
Netxms install guide
Setup guide nos-v3_5
How To Create RDS Database for WordPress in AWS on RHEL 7 or CentOS 7
How To Install and Configure VSFTPD on RHEL 7 or CentOS 7
C mode class
VMworld 2016: vSphere 6.x Host Resource Deep Dive
Automating Yourself Out of Trouble
VMworld 2016: Getting Started with PowerShell and PowerCLI for Your VMware En...
How To Install and Configure AWS CLI for Windows
Oracle EMC 12 Installation
Oracle Linux 7 Beta First Look (Installations)
Systems administration for coders presentation
Eucalyptus on Xen - Build Enterprise Private Cloud | Torry Harris Whitepaper
12c on RHEL7
Virtualization with Xen and openQRM 5.1 on Debian Wheezy
Guide to clone_sles_instances
Automated Amazon EC2 Cloud deployments with openQRM
Ad

Viewers also liked (12)

PPTX
Control your deployments with Capistrano
PPTX
Ekran System Forensic Monitoring Tool -BusinesstoVirtual Italy Partner
PPTX
Connecting Field Operations and the Corporate Office - FME Server as a Near R...
PPTX
SeeTestAutomation - Mobile Test Automation Tool by Experitest
PDF
Doit apac-2010-1.0
PDF
Server Monitoring (Scaling while bootstrapped)
PPTX
Training Webinar: Detect Performance Bottlenecks of Applications
PPTX
Training Webinar: Effective Platform Server Monitoring
PDF
Oracle WebLogic Server: Remote Monitoring and Management
PPTX
Real time human health monitoring and alert automation system
PPTX
network monitoring system ppt
PPTX
Ekran system functions v. 5.0
Control your deployments with Capistrano
Ekran System Forensic Monitoring Tool -BusinesstoVirtual Italy Partner
Connecting Field Operations and the Corporate Office - FME Server as a Near R...
SeeTestAutomation - Mobile Test Automation Tool by Experitest
Doit apac-2010-1.0
Server Monitoring (Scaling while bootstrapped)
Training Webinar: Detect Performance Bottlenecks of Applications
Training Webinar: Effective Platform Server Monitoring
Oracle WebLogic Server: Remote Monitoring and Management
Real time human health monitoring and alert automation system
network monitoring system ppt
Ekran system functions v. 5.0
Ad

Similar to Monitoring Server Temperature with Opsview (20)

ODP
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
ODP
Monitoring at/with SUSE 2015
ODP
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
PPTX
Nagios XI Best Practices
PDF
Janice Singh - Writing Custom Nagios Plugins
PPTX
NagiOs.pptxhjkgfddssddfccgghuikjhgvccvvhjj
PPTX
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
PDF
Practice and challenges from building IaaS
PDF
Graphing Nagios services with pnp4nagios
PDF
Kernel Recipes 2019 - Metrics are money
PDF
Using Nagios to monitor your WO systems
ODP
Monitoring shootout loadays
PDF
Nagios, Getting Started.
PDF
Storage managment using nagios
PPTX
Automated out-of-band management with Ansible and Redfish
PDF
Virt monitoring
PPTX
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
PDF
SiteGround Tech TeamBuilding
PDF
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
PDF
Monitoring of OpenNebula installations
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Monitoring at/with SUSE 2015
Nagios Conference 2011 - Daniel Wittenberg - Scaling Nagios At A Giant Insur...
Nagios XI Best Practices
Janice Singh - Writing Custom Nagios Plugins
NagiOs.pptxhjkgfddssddfccgghuikjhgvccvvhjj
Nagios Conference 2014 - Bryan Heden - 10,000 Services Across The State of Ohio
Practice and challenges from building IaaS
Graphing Nagios services with pnp4nagios
Kernel Recipes 2019 - Metrics are money
Using Nagios to monitor your WO systems
Monitoring shootout loadays
Nagios, Getting Started.
Storage managment using nagios
Automated out-of-band management with Ansible and Redfish
Virt monitoring
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...
SiteGround Tech TeamBuilding
OpenNebulaConf 2013 - Monitoring of OpenNebula installations by Florian Heigl
Monitoring of OpenNebula installations

More from Opsview (8)

PDF
Infographic: Managing Network Technologies and Network Monitoring
PDF
Infographic: Opsview Cloud, Virtualization & IaaS Survey
PPTX
Opsview Network Monitoring Survey
PPTX
End to End Monitoring using Nested Keywords
PPTX
Advanced reporting with Opsview
PPTX
Monitoring Microsoft SQL Server 2008 with Opsview
PPTX
Monitoring Oracle Databases with Opsview
PPTX
Creating Custom Notifications in Opsview
Infographic: Managing Network Technologies and Network Monitoring
Infographic: Opsview Cloud, Virtualization & IaaS Survey
Opsview Network Monitoring Survey
End to End Monitoring using Nested Keywords
Advanced reporting with Opsview
Monitoring Microsoft SQL Server 2008 with Opsview
Monitoring Oracle Databases with Opsview
Creating Custom Notifications in Opsview

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Spectroscopy.pptx food analysis technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Electronic commerce courselecture one. Pdf
PPTX
Cloud computing and distributed systems.
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectroscopy.pptx food analysis technology
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Electronic commerce courselecture one. Pdf
Cloud computing and distributed systems.
Network Security Unit 5.pdf for BCA BBA.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Advanced methodologies resolving dimensionality complications for autism neur...
Mobile App Security Testing_ A Comprehensive Guide.pdf
A comparative analysis of optical character recognition models for extracting...
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Monitoring Server Temperature with Opsview

  • 1. 1
  • 2. Monitoring Linux and Unix Server  Temperatures with Opsview Wednesday, 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). 3 Wednesday, 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. 4 Wednesday, 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: 5 Wednesday, 21 November 2012
  • 6. Configuration HDD Temp: [root@rhelserver ~]# hddtemp /dev/sda /dev/sda: ST3120811AS: 31°C lm_sensors: [root@rhelserver ~]# sensors coretemp‐isa‐0000 Adapter: ISA adapter Core 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‐0000 Adapter: ISA adapter Ch. 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) 6 Wednesday, 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”. 7 Wednesday, 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/"; 8 Wednesday, 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_sensors chown –R nagios:nagios /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/ 9 Wednesday, 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. 10 Wednesday, 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. 11 Wednesday, 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,55 check_command[core1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core1=45,55 check_command[core2_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core2=45,55 check_command[core3_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Core3=45,55 check_command[dimm0_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.0DIMM0=60,75 check_command[dimm1_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high Ch.1DIMM0=60,75 check_command[sda_temp]=sudo /usr/local/nagios/libexec/check_lm_sensors‐ 3.1.1/check_lm_sensors ‐‐sanitize ‐‐high sdaTemp=60,75 12 Wednesday, 21 November 2012
  • 13. About Opsview Opsview 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 13 Wednesday, 21 November 2012