Page 1 of 1

Remote test plugins

Posted: Thu Mar 24, 2011 3:43 am
by brownie
Howdy

I've got a question about a nagios plugin to check the time of a file how long it has been in a folder.
Now the server where i need to test on, is a remote server.
So I've looked for a plugin and I've found one, but it won't work... can someone help me or give me a better plugin?

This is the code i use:

Code: Select all

$USER1$/check_fileages_remote -e ssh -H $ARG1$ -p $ARG2$ -m 1 -w 1 -c 2
and this is where you can find the plugin:
http://exchange.nagios.org/directory/Pl ... es/details

And this is what you get when you open the help:
check_fileages_remote v$Revision: 0.1 $ (nagios-plugins 1.4.14)
The nagios plugins come with ABSOLUTELY NO WARRANTY. You may redistribute
copies of the plugins under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Copyright (c) 2006 tamas hetenyi

Usage: check_fileages_remote -e -H -p -m [-w ] [-c ] [-t ] [-v verbose]

Checks the amount of files older than specified on remote system over SSH or RSH
-e (--shell) = ssh or rsh (required)
-H (--hostname) = remote server name (required)-p (--pattern) = Directory pattern for find command
-m (--minutes) = Fileage in minutes
-w (--warning) = Number of files older than -m minutes to generate warning alert
-c (--critical) = Number of files older than -m minutes to generate critical alert ( w < c )
-t (--timeout) = Plugin timeout in seconds (default = 15)
-h (--help)
-V (--version)
-v (--verbose) = debugging output
so i need to connect to a remote host which is secured with a password and login.
when i test it, i get an result, but it isn't right...
does anyone know what i'm doing wrong?

thanks

Brownie

Re: Remote test plugins

Posted: Thu Mar 24, 2011 9:56 am
by rdedon
I had noticed your other post so will await reply there, or you can also put here. This is the standard questions we generally ask to get an idea of your set up:
From XI Staff To Our Customers,

In order to give you the best support possible, we ask that you submit your support requests with the following guidelines. These guidelines are intended to reduce resolution time to your issues.

For all support requests, we need to know:

Linux Distribution and version?
32 or 64bit?
Nagios Core, Nagios XI or "other"?
VMware Image or Manual Install of XI?

Are there specials configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
**If you are encountering multiple issues that may not be related, start a thread for each issue

Re: Remote test plugins

Posted: Tue Mar 29, 2011 10:45 am
by tonyyarusso
You will need to use key-based authentication with SSH to avoid being interactively prompted for the password.

Re: Remote test plugins

Posted: Wed Apr 06, 2011 10:32 am
by niebais
brownie wrote:Howdy

I've got a question about a nagios plugin to check the time of a file how long it has been in a folder.
Now the server where i need to test on, is a remote server.
So I've looked for a plugin and I've found one, but it won't work... can someone help me or give me a better plugin?

This is the code i use:

Code: Select all

$USER1$/check_fileages_remote -e ssh -H $ARG1$ -p $ARG2$ -m 1 -w 1 -c 2
and this is where you can find the plugin:
http://exchange.nagios.org/directory/Pl ... es/details

Brownie
For alerts like these we've found that using systems like nrpe or send_nsca work really well. If you can't install nrpe on the remote system, send_nsca is really easy to fit into a script that can check the file. Here is a check_file command that might work for you:
http://exchange.nagios.org/directory/Pl ... le/details

Re: Remote test plugins

Posted: Wed Apr 06, 2011 12:39 pm
by rdedon
Thank you for the input niebais, excellent suggestion. :-)