Remote test plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brownie
Posts: 3
Joined: Thu Mar 24, 2011 3:36 am

Remote test plugins

Post 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
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Remote test plugins

Post 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
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Remote test plugins

Post by tonyyarusso »

You will need to use key-based authentication with SSH to avoid being interactively prompted for the password.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
User avatar
niebais
Posts: 349
Joined: Tue Apr 13, 2010 2:15 pm

Re: Remote test plugins

Post 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
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: Remote test plugins

Post by rdedon »

Thank you for the input niebais, excellent suggestion. :-)
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked