check_wmi_plus.pl check files are not older then

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

check_wmi_plus.pl check files are not older then

Post 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
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: check_wmi_plus.pl check files are not older then

Post 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
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Re: check_wmi_plus.pl check files are not older then

Post by btayl »

Will this do folder age since I am not looking for a particular file just that the folder is being written to ?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: check_wmi_plus.pl check files are not older then

Post 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
Locked