Top output is not send to check_nrpe
Posted: Wed Mar 30, 2016 4:05 am
Hello guys. After 10 years of windows I've come back to configure some linux servers.
I've installed Nagios 4 on a server, nagios-nrpe-service on another server and used check_ps.sh from https://exchange.nagios.org/directory/P ... sh/details.
The check_ps.sh is using ps aux to get data about a running service. Because %CPU is not the actual %CPU I've changed ps aux to top -bcn 1.
The problem is that running the service locally gives an output, but when running from the nagios server gives an error that the service is not running, and the output is empty.
If instead of using top -bcn 1 I use top -bn 1 the output is received on the nagios server. I need top -bcn 1 because I need to identify a service command, not only the service.
I've installed Nagios 4 on a server, nagios-nrpe-service on another server and used check_ps.sh from https://exchange.nagios.org/directory/P ... sh/details.
The check_ps.sh is using ps aux to get data about a running service. Because %CPU is not the actual %CPU I've changed ps aux to top -bcn 1.
The problem is that running the service locally gives an output, but when running from the nagios server gives an error that the service is not running, and the output is empty.
If instead of using top -bcn 1 I use top -bn 1 the output is received on the nagios server. I need top -bcn 1 because I need to identify a service command, not only the service.