Whatever 10.2.8.7 is, that is working, can you explain why it isn't working?kwhogster wrote:I tried both the Pi did not work
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.7 -t 30 -c check_mem -a 80 90
[MEMORY] Total: 576 MB - Used: 154 MB - 26% [SWAP] Total: 133 MB - Used: 5 MB - 4% | MTOTAL=604598272;;;; MUSED=159191040;;;; MCACHE=95244288;;;; MBUFFER=92229632;;;; STOTAL=140505088;;;; SUSED=5779456;;;;
NRPE Chcek_Memory on Linix
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Chcek_Memory on Linix
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Chcek_Memory on Linix
My define services
define service {
host_name RaspberryPi
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80 -c 90'
check_interval 1
servicegroups MemUsage
use generic-service
}
define service {
host_name TGCS018
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80% -c 90%'
check_interval 1
servicegroups MemUsage
use generic-service
}
define service {
host_name vMA
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80 -c 90'
check_interval 1
servicegroups MemUsage
use generic-service
}
the Pi No handler for command: check_mem
TGCS018 Works
VMA NRPE: Unable to read output
Thoughts
define service {
host_name RaspberryPi
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80 -c 90'
check_interval 1
servicegroups MemUsage
use generic-service
}
define service {
host_name TGCS018
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80% -c 90%'
check_interval 1
servicegroups MemUsage
use generic-service
}
define service {
host_name vMA
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80 -c 90'
check_interval 1
servicegroups MemUsage
use generic-service
}
the Pi No handler for command: check_mem
TGCS018 Works
VMA NRPE: Unable to read output
Thoughts
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Chcek_Memory on Linix
I think what is really important here is to solve one problem at a time. It's getting way too confusing.kwhogster wrote:the Pi No handler for command: check_mem
TGCS018 Works
VMA NRPE: Unable to read output
Which one is the Pi?
Show us the command line test for the Pi.
Show us the service config for the Pi.
Even if you've just posted it a couple of posts ago we need to make it really clear and remove any confusion.
I don't want any other information on any other problems you are having until the Pi problem is resolved.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Chcek_Memory on Linix
Ok the PI only
Command line test from the Nagios Server
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.72 -t 30 -c check_mem -a 80 90
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
On Nagios
Raspberry Pi UNKNOWN 08-26-2016 02:40:42 1d 4h 5m 22s 3/3 No handler for command: check_mem
Command line test from the Nagios Server
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.72 -t 30 -c check_mem -a 80 90
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Code: Select all
define service {
host_name RaspberryPi
service_description Check Memory Used Physical
check_command check_nrpe!check_mem! -a '-w 80 -c 90'
check_interval 1
servicegroups MemUsage
use generic-service
}
Raspberry Pi UNKNOWN 08-26-2016 02:40:42 1d 4h 5m 22s 3/3 No handler for command: check_mem
Re: NRPE Chcek_Memory on Linix
Let's modify the "/etc/nagios/nrpe.cfg" one more time. I noticed that in this particular config you have:
however, you are trying to pass arguments in your command, which is not going to work. Change this line to:
Also, change this line:
to this:
Save and exit. Restart the Pi box.
After the Pi is up, and NRPE is running, test your check by running the following command on the nagios server:
Let us know if this helped.
Code: Select all
dont_blame_nrpe=0
Code: Select all
dont_blame_nrpe=1
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh -w $ARG1$ -c $ARG2$
Code: Select all
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh $ARG1$
After the Pi is up, and NRPE is running, test your check by running the following command on the nagios server:
Code: Select all
/usr/lib/nagios/plugins/check_nrpe -H 10.2.8.7 -t 30 -c check_mem -a '-w 80 -c 90'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE Chcek_Memory on Linix
Ok
modified the nrpe.cfg /etc/Nagios/nrpe.cfg on the PI
dont_blame_nrpe=1
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh $ARG1$
Then I restarted the PI
Check Memory Used Physical
Notifications for this service have been disabled
On Nagios
Raspberry PI UNKNOWN 08-26-2016 19:54:53 1d 21h 19m 48s 3/3 No handler for command: check_mem
From Nagios server ran this command
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.72 -t 30 -c check_mem -a '-w 80 -c 90'
NRPE: Unable to read output
root@tgcs017:/usr/local/nagios/etc/objects#
Thoughts
Thanks Tom
UPDATE UPDATE UPDATE
Could this be a problem???????????????????????????????????
root@raspberrypi:~# service nagios-nrpe-server status
● nagios-nrpe-server.service - LSB: Start/Stop the Nagios remote plugin execution daemon
Loaded: loaded (/etc/init.d/nagios-nrpe-server)
Active: active (exited) since Fri 2016-08-26 19:46:04 EDT; 22min ago
Process: 509 ExecStart=/etc/init.d/nagios-nrpe-server start (code=exited, status=0/SUCCESS)
Aug 26 19:46:03 raspberrypi nrpe[567]: Starting up daemon
Aug 26 19:46:03 raspberrypi nagios-nrpe-server[509]: Starting nagios-nrpe: na...
Aug 26 19:46:03 raspberrypi nrpe[567]: Bind to port 5666 on 0.0.0.0 failed:...e.
Aug 26 19:46:03 raspberrypi nrpe[567]: Bind to port 5666 on :: failed: Addr...e.
Aug 26 19:46:04 raspberrypi systemd[1]: Started LSB: Start/Stop the Nagios r....
Hint: Some lines were ellipsized, use -l to show in full.
Firewall on raspbian????
What should I check?????????????????????????
modified the nrpe.cfg /etc/Nagios/nrpe.cfg on the PI
dont_blame_nrpe=1
command[check_mem]=/usr/local/nagios/libexec/check_mem.sh $ARG1$
Then I restarted the PI
Check Memory Used Physical
Notifications for this service have been disabled
On Nagios
Raspberry PI UNKNOWN 08-26-2016 19:54:53 1d 21h 19m 48s 3/3 No handler for command: check_mem
From Nagios server ran this command
root@tgcs017:/usr/local/nagios/etc/objects# /usr/lib/nagios/plugins/check_nrpe -H 10.2.8.72 -t 30 -c check_mem -a '-w 80 -c 90'
NRPE: Unable to read output
root@tgcs017:/usr/local/nagios/etc/objects#
Thoughts
Thanks Tom
UPDATE UPDATE UPDATE
Could this be a problem???????????????????????????????????
root@raspberrypi:~# service nagios-nrpe-server status
● nagios-nrpe-server.service - LSB: Start/Stop the Nagios remote plugin execution daemon
Loaded: loaded (/etc/init.d/nagios-nrpe-server)
Active: active (exited) since Fri 2016-08-26 19:46:04 EDT; 22min ago
Process: 509 ExecStart=/etc/init.d/nagios-nrpe-server start (code=exited, status=0/SUCCESS)
Aug 26 19:46:03 raspberrypi nrpe[567]: Starting up daemon
Aug 26 19:46:03 raspberrypi nagios-nrpe-server[509]: Starting nagios-nrpe: na...
Aug 26 19:46:03 raspberrypi nrpe[567]: Bind to port 5666 on 0.0.0.0 failed:...e.
Aug 26 19:46:03 raspberrypi nrpe[567]: Bind to port 5666 on :: failed: Addr...e.
Aug 26 19:46:04 raspberrypi systemd[1]: Started LSB: Start/Stop the Nagios r....
Hint: Some lines were ellipsized, use -l to show in full.
Firewall on raspbian????
What should I check?????????????????????????
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Chcek_Memory on Linix
Execute this command on your Nagios server, it will test if it can connect to port 5666 on the Pi
What is the output of this on the pi:
Code: Select all
nmap -Pn -p T:5666 10.2.8.72
Code: Select all
ps -ef | grep nrpe
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Chcek_Memory on Linix
TRoy
On the PI
root@raspberrypi:~# ps -ef | grep nrpe
nagios 501 1 0 Aug26 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
root 6662 915 0 21:22 pts/1 00:00:00 grep nrpe
root@raspberrypi:~#
Also on the pi
root@raspberrypi:~# lsof -i TCP| fgrep LISTEN
sshd 489 root 3u IPv4 8266 0t0 TCP *:ssh (LISTEN)
sshd 489 root 4u IPv6 8268 0t0 TCP *:ssh (LISTEN)
nrpe 501 nagios 4u IPv4 8322 0t0 TCP *:nrpe (LISTEN)
nrpe 501 nagios 5u IPv6 8323 0t0 TCP *:nrpe (LISTEN)
apache2 629 root 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5202 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5203 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5204 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5205 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5206 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
root@raspberrypi:~#
On the Nagios Server
root@tgcs017:/usr/local/nagios/etc/objects# nmap -Pn -p T:5666 10.2.8.72
Starting Nmap 7.01 ( https://nmap.org ) at 2016-08-28 21:21 EDT
Nmap scan report for raspberrypi.our.network.tgcsnet.com (10.2.8.72)
Host is up (0.00062s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Seems to be open ???
MAC Address: B8:27:EB:D9:3E:C0 (Raspberry Pi Foundation)
Nmap done: 1 IP address (1 host up) scanned in 1.78 seconds
root@tgcs017:/usr/local/nagios/etc/objects#
On the PI
root@raspberrypi:~# ps -ef | grep nrpe
nagios 501 1 0 Aug26 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
root 6662 915 0 21:22 pts/1 00:00:00 grep nrpe
root@raspberrypi:~#
Also on the pi
root@raspberrypi:~# lsof -i TCP| fgrep LISTEN
sshd 489 root 3u IPv4 8266 0t0 TCP *:ssh (LISTEN)
sshd 489 root 4u IPv6 8268 0t0 TCP *:ssh (LISTEN)
nrpe 501 nagios 4u IPv4 8322 0t0 TCP *:nrpe (LISTEN)
nrpe 501 nagios 5u IPv6 8323 0t0 TCP *:nrpe (LISTEN)
apache2 629 root 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5202 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5203 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5204 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5205 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
apache2 5206 www-data 4u IPv6 9242 0t0 TCP *:http (LISTEN)
root@raspberrypi:~#
On the Nagios Server
root@tgcs017:/usr/local/nagios/etc/objects# nmap -Pn -p T:5666 10.2.8.72
Starting Nmap 7.01 ( https://nmap.org ) at 2016-08-28 21:21 EDT
Nmap scan report for raspberrypi.our.network.tgcsnet.com (10.2.8.72)
Host is up (0.00062s latency).
PORT STATE SERVICE
5666/tcp open nrpe
Seems to be open ???
MAC Address: B8:27:EB:D9:3E:C0 (Raspberry Pi Foundation)
Nmap done: 1 IP address (1 host up) scanned in 1.78 seconds
root@tgcs017:/usr/local/nagios/etc/objects#
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: NRPE Chcek_Memory on Linix
It seems to me that you have two separate instances of NRPE installed on the Pi.
/etc/Nagios/nrpe.cfg
You should make all the changes to the /usr/local/nagios/etc/nrpe.cfg file.
This clearly states that NRPE is stated and using the config file /usr/local/nagios/etc/nrpe.cfgkwhogster wrote:root@raspberrypi:~# ps -ef | grep nrpe
nagios 501 1 0 Aug26 ? 00:00:00 /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -f
But there you have a config file in a different location:kwhogster wrote:modified the nrpe.cfg /etc/Nagios/nrpe.cfg on the PI
/etc/Nagios/nrpe.cfg
You should make all the changes to the /usr/local/nagios/etc/nrpe.cfg file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: NRPE Chcek_Memory on Linix
TRoy
I use to run Nagios on the pi and started with nrpe plugin on there and had problems running on the pi so I built the Ubuntu server to run Nagios server
should I remove Nagios on the PI I just have the service stopped now
I use to run Nagios on the pi and started with nrpe plugin on there and had problems running on the pi so I built the Ubuntu server to run Nagios server
should I remove Nagios on the PI I just have the service stopped now