how to monitor a process that shouldn't be running ?

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.
Locked
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

how to monitor a process that shouldn't be running ?

Post by nagmoto »

Hi

check_proc doesn't alert if a process shouldn't running.
Is there other plugin can do this kind of checking ?
Ex, a host has telnet or ftp server daemon running should trigger an alert.


Thanks
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: how to monitor a process that shouldn't be running ?

Post by slansing »

You could actually do this, just set your critical value to >=1 like so:

Code: Select all

/path/to/your/check_procs -c 1 -C nagios

Return: PROCS CRITICAL: 6 processes with command name 'nagios' | procs=6;20;1;0;
There are some fancier things you can do, to get the full usage, check out:

Code: Select all

/path/to/your/check_procs -h
nagmoto
Posts: 195
Joined: Fri Jan 09, 2015 8:05 am

Re: how to monitor a process that shouldn't be running ?

Post by nagmoto »

Thanks for the answer on checking the ftp or sshd process using check_proc command.

Can I also do the ftp/ssh port scanning from Nagios server side ?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: how to monitor a process that shouldn't be running ?

Post by tmcdonald »

In regards to your first question that slansing answered, you can also use the negate plugin in similar situations where the threshold might not be a viable option:

http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

The doc mentions XI but works for Core as well.

As for the port scanning, that is available in XI using the Autodiscover Wizard, which uses nmap in the backend.
Former Nagios employee
Locked