Page 1 of 1

check_wmi_plus.pl check files are not older then

Posted: Fri Feb 05, 2021 1:20 pm
by btayl
check_wmi_plus.pl check files in a folder are not older then at cretin time need help with this
./check_wmi_plus.pl -H 10.20.22.78 -u user -p ***** -m password -a "E:/backup/6-19-2019.*" -w 5min -c 10min

Re: check_wmi_plus.pl check files are not older then

Posted: Mon Feb 08, 2021 3:16 pm
by vtrac
Hi btayl,
Please run "./check_wmi_plus.pl --help" for more details description.

Since you are checking for the age of the file, please use the "checkfileage" mode.

Here's an example for checking a file older than "5min" but less than "5hr":

Code: Select all

[root@vt-nagiosxi-62 libexec]# ./check_wmi_plus.pl -H 192.168.XXX.XXX -u 'NAGIOS\vtrac' -p 'XXXXXXXX' -m checkfileage -a "C:/Vinh/VT1.txt" -w 5min -c 5hr
WARNING - [Triggered by _FileAge>5min] - Age of File C:/Vinh/VT1.txt is  03:12:19 (192min) or 3.21hr(s).|'C:/Vinh/VT1.txt Age'=3.21hr;0.0833333333333333;5;
Give "CRITICAL" if older than "10min":

Code: Select all

[root@vt-nagiosxi-62 libexec]# ./check_wmi_plus.pl -H 192.168.XXX.XXX -u 'NAGIOS\vtrac' -p 'XXXXXXXX' -m checkfileage -a "C:/Vinh/VT1.txt" -w 5min -c 10min
CRITICAL - [Triggered by _FileAge>10min] - Age of File C:/Vinh/VT1.txt is  03:19:01 (199min) or 3.32hr(s).|'C:/Vinh/VT1.txt Age'=3.32hr;0.0833333333333333;0.166666666666667;
Regards,
Vinh

Re: check_wmi_plus.pl check files are not older then

Posted: Tue Feb 09, 2021 5:39 am
by btayl
Will this do folder age since I am not looking for a particular file just that the folder is being written to ?

Re: check_wmi_plus.pl check files are not older then

Posted: Tue Feb 09, 2021 4:08 pm
by vtrac
No, I checked the "help" option and looks like it do not check folder's age.

Please use the "--help" option for more info.

May I close/lock this ticket/pose?


Regards,
Vinh