Fixed data always formatting to date in sys uptime snmp modules
This commit is contained in:
parent
a5b1128014
commit
e258069c39
|
@ -2307,7 +2307,10 @@ function modules_get_agentmodule_data_for_humans($module)
|
||||||
switch ($module['id_tipo_modulo']) {
|
switch ($module['id_tipo_modulo']) {
|
||||||
case 15:
|
case 15:
|
||||||
$value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']);
|
$value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']);
|
||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if (($value == '.1.3.6.1.2.1.1.3.0'
|
||||||
|
|| $value == '.1.3.6.1.2.1.25.1.1.0')
|
||||||
|
&& modules_get_unit_macro($module['data'], $module['unit']) === true
|
||||||
|
) {
|
||||||
if ($module['post_process'] > 0) {
|
if ($module['post_process'] > 0) {
|
||||||
$salida = human_milliseconds_to_string(($module['datos'] / $module['post_process']));
|
$salida = human_milliseconds_to_string(($module['datos'] / $module['post_process']));
|
||||||
} else {
|
} else {
|
||||||
|
@ -2328,7 +2331,10 @@ function modules_get_agentmodule_data_for_humans($module)
|
||||||
switch ($module['id_tipo_modulo']) {
|
switch ($module['id_tipo_modulo']) {
|
||||||
case 15:
|
case 15:
|
||||||
$value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']);
|
$value = db_get_value('snmp_oid', 'tagente_modulo', 'id_agente_modulo', $module['id_agente_modulo']);
|
||||||
if ($value == '.1.3.6.1.2.1.1.3.0' || $value == '.1.3.6.1.2.1.25.1.1.0') {
|
if (($value == '.1.3.6.1.2.1.1.3.0'
|
||||||
|
|| $value == '.1.3.6.1.2.1.25.1.1.0')
|
||||||
|
&& modules_get_unit_macro($module['data'], $module['unit']) === true
|
||||||
|
) {
|
||||||
if ($module['post_process'] > 0) {
|
if ($module['post_process'] > 0) {
|
||||||
$salida = human_milliseconds_to_string(($module['datos'] / $module['post_process']));
|
$salida = human_milliseconds_to_string(($module['datos'] / $module['post_process']));
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue