A was requested to check the fileage of a file on a windows server.
Bij using the check_wmi.plus.pl (1.6) i get the message "Cannot determine local time zone" .
Here is the check as we run it:
Code: Select all
nagiosxi:root:/usr/local/nagios/libexec> ./check_wmi_plus.pl -H 192.168.1.1 -A /usr/local/nagios/libexec/check_wmi_plus.d/wmi_authentication_file -m checkfileage -a "d:/somedir/histdb.mdb" -d
Command Line (v1.6): ./check_wmi_plus.pl -H 192.168.1.1 -A /usr/local/nagios/libexec/check_wmi_plus.d/wmi_authentication_file -m checkfileage -a d:/somedir/histdb.mdb -d
Base Dir: /usr/local/nagios/libexec
Conf File Dir: /usr/local/nagios/libexec
Loaded Conf File /usr/local/nagios/libexec/check_wmi_plus.conf
Round #1 of 1
QUERY: /usr/bin/wmic '-A' '/usr/local/nagios/libexec/check_wmi_plus.d/wmi_authentication_file' '--namespace' 'root/cimv2' '//192.168.1.1' 'Select name,lastmodified from CIM_DataFile where name="d:\\somedir\\histdb.mdb"'
OUTPUT: CLASS: CIM_DataFile
LastModified|Name
20160622010033.855802+120|d:\somedir\histdb.mdb
COLUMNS(last index=1):LastModified|Name
Now looking for (.*?)\n (use_split=1)
FIELDS (via Split):COLNAME=LastModified,FIELD=20160622010033.855802+120
COLNAME=Name,FIELD=d:\somedir\histdb.mdb
Row Data Found OK
WMI DATA:$VAR1 = [
[
{
'_ChecksOK' => 1,
'_ItemCount' => 1,
'Name' => 'd:\\somedir\\histdb.mdb',
'LastModified' => '20160622010033.855802+120'
}
]
];
Cannot determine local time zoneEnvironment:
Nagiosxi 5.2.9
Centos 6.7 (Final)
On the windows server time zone is set to UTC +1,00 Amsterdam, nagios server on CEST , and al servers are in sync.
Any idea?
Regards,
Christian