File Age Checks with NSClient++

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bchabotdg
Posts: 34
Joined: Wed Aug 16, 2017 2:33 pm

File Age Checks with NSClient++

Post by bchabotdg »

I'm not sure if this is the best place, but I figure I'd ask.

Using Nagios XI to monitor a directory on a Windows Server. It should be critical for 0 files are younger than 24 hours.

nsclient.ini has this entry:
alias_file_age = check_files path=c:\path\to\folder\ pattern=* filter=age<86400

This returns a nice, text answer. When there are files present, Nagios is OK. BUT... with 0 files, it does not go to Critical. It goes to Unknown.

I've tried adding filter=crit_count<1 and crit=0 to no avail.

Also, Nagios shows no performance data to graph. This is vital. We need to know at least up/down state and preferably the number of files.

Any ideas?

Thanks in advance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: File Age Checks with NSClient++

Post by lmiltchev »

You could try using this plugin: https://www.itefix.net/check_winfile. I used it successfully in the past with NSClient++ and NCPA. It returns perfdata too.

Let us know if you get stuck on something or if you need help with setting up your command.

Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked