check_nt_fileage -- date format?


I currently have nagios 1.3 up and running on debian. I have multiple ping and http checks working. I also have NSClient201 installed on a few test Windows boxes.

When I run:

/usr/lib/nagios/plugins/check_nt -H -p 1248 -v FILEAGE -l "c:\\pagefile.sys","Date: %d-%m-%Y %I:%M:%S %p" -w 1440 -c 2880

I get:

I am glad to see the check works, but the date is not in a format I want to calculate in my head. :slight_smile: Any ideas why “Date: %d-%m-%Y %I:%M:%S %p” is not being taken? I built this command based on the documentation included with NSClient201, which states:

Example: ./check_nt -H -p 1248 -v FILEAGE –l "c:\\program files\\nsclient\\pnsclient.exe" -w 1440 -c 2880 ./check_nt -H -p 1248 -v FILEAGE -l "c:\\program files\\nsclient\\pnsclient.exe","Date: %d-%m-%Y %I:%M:%S %p" -w 1440 -c 2880

All ideas welcome. Thanks.


I’ve got nsclient working on a load of production boxes but just not for this command (I use load, diskpace and proc checks).

Have3 you tried it without the date formating - I get the following.
/usr/local/nagios/libexec/check_nt -H -v FILEAGE -l "c:\test.txt"
Date: 03/03/2005 7:56:09 AM


I believe I did try it without first, and then added the date formatting when it was just showing me the number. I guess I look for a newer version of check_nt if you have it working.

What I have it actually checking for is the age of the AV dat files. My supervisor seems to be obsessive about the virus dat files updating, and I figured he would like it if I could give him a web interface.



/usr/lib/nagios/plugins/check_nt -H -p 1248 -v FILEAGE -l “c:\pagefile.sys” -w 1440 -c 2880

ls -l /usr/lib/nagios/plugins/*nt

-rwxr-xr-x 1 root root 23352 Feb 19 14:48 /usr/lib/nagios/plugins/check_nt

What size is your check_nt file? Bigger then 23352?


-rwxr-xr-x 1 nagios users 113711 Mar 2 11:20 check_nt
More useful is
nagios@lnsysmon:/usr/local/nagios/libexec$ ./check_nt --ver
check_nt (nagios-plugins 1.4) 1.39

The 1.4 are stable now so might be worth moving over.


Oh and AV*(Web gui+emailed alerts) = Boss heaven :frowning:


Duh. I keep forgetting the depth of these plugins. --version should have been my first step.

/usr/lib/nagios/plugins/check_nt.orig --version

check_nt (nagios-plugins 1.4) 1.39

Well thats fun. Same version, different results.

./check_nt.nsclient201 --version

check_nt (nagios-plugins 1.3.1) 1.7

That came with the old NSClient_201 I downloaded. I swapped it in and now it works. It seems really strange to me to go back a version and have something work?

It works, I don’t care what version it is as long as it behaves. Thanks for your time.


It’s great to see so many other nagios nuts helping out with these problems. Good job redtom!!!
When I first got on this forum, there was only a couple of post’s here, with no replies at all.