Page 1 of 1

Check nt FILEAGE: can't get a good information

Posted: Fri Aug 09, 2013 4:47 am
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

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

Posted: Fri Aug 09, 2013 10:43 am
by abrist
Is the date/time and timezone on your nagios server correct?

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

Posted: Thu Sep 19, 2013 2:58 am
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.

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

Posted: Thu Sep 19, 2013 2:43 pm
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$