mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-06-10 17:20:05 -04:00
Corrected rate_multiplier calculation
This commit is contained in:
parent
3444519014
commit
5c72d075de
2 changed files with 2 additions and 2 deletions
|
|
@ -424,7 +424,7 @@ main (int argc, char **argv)
|
|||
temp_double+=(double)18446744069414584320.0; /* 2^64-2^32 */;
|
||||
}
|
||||
/* Convert to per second, then use multiplier */
|
||||
temp_double = temp_double/(duration*rate_multiplier);
|
||||
temp_double = temp_double/duration*rate_multiplier;
|
||||
iresult = get_status(temp_double, thlds[i]);
|
||||
asprintf (&show, conv, temp_double);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ sleep 1;
|
|||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10 --rate -l inoctets_per_minute --rate-multiplier=60" );
|
||||
is($res->return_code, 0, "OK as no thresholds" );
|
||||
is($res->output, "SNMP RATE OK - inoctets_per_minute 11.1 | inoctets_per_minute=11.1 ", "Checking multiplier");
|
||||
is($res->output, "SNMP RATE OK - inoctets_per_minute 39960 | inoctets_per_minute=39960 ", "Checking multiplier");
|
||||
|
||||
|
||||
$res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.11 -s '\"stringtests\"'" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue