check_service reporting incorrectly in Nagios
Posted: Tue May 28, 2019 9:36 am
Hello,
I'm using the check_service plugin which uses systemctl to determine if a service is running or not. When I run the command locally, I get one result. When I run the command using Nagios Core, I get something different.
Here's the output:
ubuntu@ip-redacted:/usr/lib/nagios/plugins$ ./check_service -s [service]
OK: Service [service] is running!
But in the Nagios user interface:
CRITICAL: Service [service] is not running!
It seems so simple yet I have absolutely no idea why it's getting it wrong.
I'm using the check_service plugin which uses systemctl to determine if a service is running or not. When I run the command locally, I get one result. When I run the command using Nagios Core, I get something different.
Here's the output:
ubuntu@ip-redacted:/usr/lib/nagios/plugins$ ./check_service -s [service]
OK: Service [service] is running!
But in the Nagios user interface:
CRITICAL: Service [service] is not running!
It seems so simple yet I have absolutely no idea why it's getting it wrong.