Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
usage:nrpe_on_linux [2019/08/12 09:09]
Robbie Ferguson
usage:nrpe_on_linux [2019/08/12 13:02] (current)
Robbie Ferguson
Line 3: Line 3:
 The Nagios Remote Plugin Executor (NRPE) allows your Nagios Enterprise Monitoring Server to communicate with the Linux machines on your server to determine things like free disk space, CPU load, and detect possible issues that a simple ping can't determine. The Nagios Remote Plugin Executor (NRPE) allows your Nagios Enterprise Monitoring Server to communicate with the Linux machines on your server to determine things like free disk space, CPU load, and detect possible issues that a simple ping can't determine.
  
-There are countless instructions online to download tar.gz files and install manually, or use a PPA to install via apt-get, but you'll be surprised to note the needed packages are in fact already in your Debian (and by proxy, Ubuntu) repositories.+There are countless instructions online to download tar.gz files and install manually, or use a PPA to install via apt-get, but NEMS includes a helpful installer that will configure everything for you.
  
-To install the needed NRPE client on Debian / Ubuntu / other Debian-based Linux operating systems:+Do not install the NRPE plugin via software repositories as these are abandoned and lack some important functionality. 
 + 
 +To install the needed NRPE client on Debian / Ubuntu / other Debian-based Linux operating systems ​(as root):
  
 <code bash> <code bash>
-apt-get install nagios-nrpe-server nagios-plugins+wget -https://​raw.githubusercontent.com/​Cat5TV/​nems-admin/​master/​build/​047-nrpe | bash
 </​code>​ </​code>​
  
-Don't forget that you need to be root (Debian) or use sudo (Ubuntu). +Next, we just have to tell NRPE that it's allowed to communicate with our Nagios server. On the client system, open the file ///usr/local/nagios/etc/nrpe.cfg//
- +
-Next, we just have to tell NRPE that it's allowed to communicate with our Nagios server. On the client system, open the file ///etc/​nagios/​nrpe.cfg//​+
  
-Find the line that reads:​ <​code>​allowed_hosts=127.0.0.1</​code>​+Find the line that reads:​ <​code>​allowed_hosts=127.0.0.1,::1</​code>​
  
 Now there are a few ways we can allow our server. First (and most obvious) is to add its IP address like this: Now there are a few ways we can allow our server. First (and most obvious) is to add its IP address like this:
  
-<​code>​allowed_hosts=127.0.0.1,​192.168.0.5</​code>​+<​code>​allowed_hosts=127.0.0.1,::1,​192.168.0.5</​code>​
  
 Where 192.168.0.5 is our Nagios/NEMS server. Where 192.168.0.5 is our Nagios/NEMS server.
Line 25: Line 25:
 Alternatively we can tell NRPE that it's allowed to communicate with any local system: Alternatively we can tell NRPE that it's allowed to communicate with any local system:
  
-<​code>​allowed_hosts=127.0.0.1,​192.168.0.0/​24</​code>​+<​code>​allowed_hosts=127.0.0.1,::1,​192.168.0.0/​24</​code>​
  
 Now, save the file and restart NRPE as follows: Now, save the file and restart NRPE as follows:
  
-<code bash>​systemctl restart ​nagios-nrpe-server</​code>​+<code bash>​systemctl restart nrpe</​code>​
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
  • usage/nrpe_on_linux.txt
  • Last modified: 2019/08/12 13:02
  • by Robbie Ferguson