Opened 4 years ago

Closed 3 years ago

#307 closed enhancement (fixed)

FILEAGE check returns OK if directory is empty

Reported by: tycen Owned by: mickem
Priority: 1 Milestone: 0.3.8
Component: check_nt Version: 0.3.4
Severity: Feature Requests Keywords:
Cc:

Description

Currently, when using check_nt to do a fileage check of a Windows machine running NSCLient++, if the directory is empty the status reports "Return code of 139 is out of bounds" and it goes Critical. I want to find a way for an empty directory to be OK. How can I do this?

(we have a directory where emails get dumped until a service goes in and cleans out the folder and processes the emails - I'm setting up the fileage check to know if the service has died and emails are just building up in the directory - but it should be fine if the directory is empty)

Thanks!

Change History (1)

comment:1 Changed 3 years ago by mickem

  • Milestone changed from 0.3.6 to 0.3.8
  • Resolution set to fixed
  • Status changed from new to closed

Use the CHeckFIle2 command, it can easily be used to solve this scenario.

CheckFile2 MaxWarn=1 MaxCrit=10 path=D:\WINDOWS\system32 filter+date=gt:5h truncate=10

Will warn if more then 1 file is older then 5 hours. And critical when 10 is older if none are older or no files found everything is "ok".

Michael Medin

Note: See TracTickets for help on using tickets.