Check nt FILEAGE: can't get a good information

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
pfhermosilla
Posts: 2
Joined: Fri Aug 09, 2013 4:10 am

Check nt FILEAGE: can't get a good information

Post by pfhermosilla »

Plattform: Ubuntu virtual machine. Nagios core 3 NSClient++ v.0.3.7.493

Good morning.
I need to control the age of a file, but even after a week doing probes, check nt fileage don't works properly, and a little help will be apreciated.

First: Create a command to do it at commands.cfg file:

Code: Select all

define command{
command_name    check_nt_fileage
command_line   $USER1$/check_nt -H ~HOSTADDRESS$ -p 12489 -s <passwd> -v FILEAGE -l $ARG1$ -w $ARG2$ -c $ARG3$
}
Next step: Create a service at Windows.cfg :

Code: Select all

define service{
use                   generic-service
host name             HOSTNAME001   
service_description   Fileage Verification of c:\epoca\temp\nani.ftp
check_interval        1
retry_interval        1
......
......
notifications_enabled 1
contact_groups        Gestores
check_command         check_nt_fileage!"c:\\epoca\\temp\\nani.ftp" -w2 -c5 
}
In apaerance, works fine, but, once started Nagios, a WARNING alert appears inmediatly, even after the two minutes configured as limit. I've changed the values, with the same result:

Code: Select all

CS_DSSS-46Y2FPLOXC #marcajes WARNING  09-08-2013 11:26:55   0 years 0 mon 0 days 0 hours 0 min 39 sec 
Even eliminating tha chain "-w2" at the command line, WARNING alert appears.
When the fileage come to five minutes, really works fine: Disappears the WARNING alert, and is replaced by the CRITICAL alert, according the command line:

Code: Select all

CS_DSSS-46Y2FPLOXC #marcajes CRITICAL  09-08-2013 11:36:28    0 years 0 mon 0 days 0 hours 10 min 12 sec


I've tried other versions of NSClient++. FILEAGE don't works on 0.3.9 and later. Only 0.4.2. but, for now, is a non stable version.

Can someone help me?

Have a nice day
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Check nt FILEAGE: can't get a good information

Post by abrist »

Is the date/time and timezone on your nagios server correct?
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.
pfhermosilla
Posts: 2
Joined: Fri Aug 09, 2013 4:10 am

Re: Check nt FILEAGE: can't get a good information

Post by pfhermosilla »

by abrist » Fri Aug 09, 2013 5:43 pm :

Is the date/time and timezone on your nagios server correct?

Yes, Is the first thing that I verify.

Another idea?

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

Re: Check nt FILEAGE: can't get a good information

Post by slansing »

Can you run this command manually from your command line and show us the output along with how you are running the command? That is some strange output. Also, it seems as though you are getting output from the windows machine however in your command definition you have this "~HOSTADDRESS$" Not sure if you manually typed this into your post but you need to make sure the HOSTADDRESS macro has $'s on either side like so:

Code: Select all

$HOSTADDRESS$
Locked