Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Is there a way to get nagios to monitor a service on a linux system? It looks like all of the plugin files are either binary or encrypted, so unlikely those can be modified if needed so this can be accomplished
Just want nagios to poll the system at certain intervals and basically run a "systemctl status service.service" then report back the info it received in the "active" line, like below.
I need something that check the status of the service on a remote system, then report back the status as I described in my original post. Which would then show up in the web UI with any of the other items that are being polled, such as ping, NTP, DNS, etc..and would show either "ok" (green) if the service check interval returned that the service was running, or "critical" (red) if the service check failed.
linuser wrote:What does your example do and how would it work?
This command runs the plguin check_init_service via NRPE. What this script does is issues a service <something> status and exits 0 (green) if it is running, or exits 2 (red) if it is not running. So it does part of what you want to do. If your system has NRPE on it already, I am sure you could modify check_init_service or write a simple script to get you more detailed information. I can't think of a plugin off of the top of my head to get more detailed information about all services.
I don't see that plugin listed either on the remote system or our nagios server. Is it ran from the nagios server or the remote system? Where do I get the plugin?