Check for file in directory and process in memory

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
priht
Posts: 2
Joined: Tue Feb 05, 2013 11:55 am

Check for file in directory and process in memory

Post by priht »

Hello,

I would like to do the following using Nagios:

- check whether a file exists in a particular directory, on a remote server

- check whether a particular process (eg, rsync) is running in memory on that server

How would you do that in Nagios?

Many thanks.

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

Re: Check for file in directory and process in memory

Post by slansing »

For simple process checking I would recommend check_procs which comes standard with any nagios installation, here is the manpage for it's requirements:

http://nagiosplugins.org/man/check_procs

For file checking I would recommend this very simple plugin found on our exchange site:

http://exchange.nagios.org/directory/Pl ... nt/details

Have you set up service's and command definitions before and understand how to do so?
priht
Posts: 2
Joined: Tue Feb 05, 2013 11:55 am

Re: Check for file in directory and process in memory

Post by priht »

Hi,

thanks for you reply.
Have you set up service's and command definitions before and understand how to do so?
No I haven't. A colleague of mine has shown me the object directory, but that's about it.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check for file in directory and process in memory

Post by abrist »

You may want to look over the core documentationto get a better understanding of the nagios ecosystem.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked