mirror of
https://github.com/ranl/monitor-utils.git
synced 2024-11-22 15:33:43 +01:00
UPTIME - add performance data
Add uptime as performance data in seconds
This commit is contained in:
parent
f028b12248
commit
45b543a7a7
@ -708,6 +708,8 @@ if("$opt{'check_type'}" eq "TEMP") {
|
|||||||
} elsif("$opt{'check_type'}" eq "UPTIME") {
|
} elsif("$opt{'check_type'}" eq "UPTIME") {
|
||||||
my $check = _get_oid_value($snmp_session,$snmpUpTime);
|
my $check = _get_oid_value($snmp_session,$snmpUpTime);
|
||||||
$msg = "$opt{'check_type'}: $check";
|
$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 ###
|
### CACHEAGE ###
|
||||||
} elsif("$opt{'check_type'}" eq "CACHEAGE") {
|
} elsif("$opt{'check_type'}" eq "CACHEAGE") {
|
||||||
my $check = _get_oid_value($snmp_session,$snmpCacheAge);
|
my $check = _get_oid_value($snmp_session,$snmpCacheAge);
|
||||||
|
Loading…
Reference in New Issue
Block a user