UPTIME - add performance data

Add uptime as performance data in seconds
This commit is contained in:
Michal Švamberg 2014-08-26 12:08:52 +02:00
parent f028b12248
commit 45b543a7a7
1 changed files with 2 additions and 0 deletions

View File

@ -708,6 +708,8 @@ if("$opt{'check_type'}" eq "TEMP") {
} elsif("$opt{'check_type'}" eq "UPTIME") {
my $check = _get_oid_value($snmp_session,$snmpUpTime);
$msg = "$opt{'check_type'}: $check";
$check =~ m/^\s*(\d+)\s+days,\s+(\d+):(\d+):(\d+).*$/;
$perf = "uptime=" . ($1*86400 + $2*3600 + $3*60 + $4) . "s";
### CACHEAGE ###
} elsif("$opt{'check_type'}" eq "CACHEAGE") {
my $check = _get_oid_value($snmp_session,$snmpCacheAge);