Modified SNMP Console to prefer agent aliases as SNMP agent if registered. #149
This commit is contained in:
parent
8d16f573cc
commit
5807e55459
|
@ -162,7 +162,7 @@ $severities = get_priorities ();
|
|||
$alerted = array (__('Not fired'), __('Fired'));
|
||||
foreach ($all_traps as $trap) {
|
||||
$agent = agents_get_agent_with_ip ($trap['source']);
|
||||
$agents[$trap["source"]] = $agent !== false ? $agent["nombre"] : $trap["source"];
|
||||
$agents[$trap["source"]] = $agent !== false ? ($agent["alias"] ? $agent["alias"] : $agent["nombre"]) : $trap["source"];
|
||||
$oid = enterprise_hook ('get_oid', array ($trap));
|
||||
if ($oid === ENTERPRISE_NOT_HOOK) {
|
||||
$oid = $trap["oid"];
|
||||
|
@ -678,7 +678,7 @@ if ($traps !== false) {
|
|||
continue;
|
||||
}
|
||||
$data[1] = '<a href="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent["id_agente"].'" title="'.__('View agent details').'">';
|
||||
$data[1] .= '<strong>'.$agent["nombre"].ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");'</strong></a>';
|
||||
$data[1] .= '<strong>'.($agent["alias"] ? $agent["alias"] : $agent["nombre"]).ui_print_help_tip($trap['source'], true, "images/tip-blanco.png");'</strong></a>';
|
||||
}
|
||||
|
||||
//OID
|
||||
|
|
Loading…
Reference in New Issue