Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
I will integrate two nagios core with HP OMi , and after that I apply correlation for events of two Nagios but i need to receive SNMP Traps with all macros generic and default of Nagios.
define service{
use local-service
host_name http://www.clarovideo.com
service_description Check URL Desde Monterrey
check_command check_url_itoc!www.clarovideo.com
_itoc_seguimiento_ok El servicio ha sido restablecido #Generic Macro
_itoc_seguimiento_alerta Se presenta alerta en URL VIP, especialista favor de confirmar si se requiere notificar al cliente #Generic Macro
_itoc_solicitud_oper_ok Actividad restablecida. #Generic Macr
_itoc_solicitud_oper_alerta Favor de notificar a las areas correspondientes #Generic Macro
flap_detection_enabled 0
check_interval 1
retry_interval 1
max_check_attempts 3
contact_groups soporten1
notifications_enabled 1
}
Any idea
Regards
Last edited by dwhitfield on Wed Oct 12, 2016 3:56 pm, edited 1 time in total.
Reason:edited code block for consistency
It should be doable, I have it about 90% done but I need to restore my VM so that it works and I can test it. I will let you know tomorrow the status and hopefully have a solution for you.
ssax wrote:It should be doable, I have it about 90% done but I need to restore my VM so that it works and I can test it. I will let you know tomorrow the status and hopefully have a solution for you.
Yes, you would need to edit the xi_host_event_handler and xi_service_event_handler commands and add them in:
*** Note: This will get reverted if you upgrade and will need to be reimplemented. *** Make sure that you have known-good backups/vm snapshots before making any modifications
$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nHostEvent nHostname s \"%host%\" nHostStateID i %hoststateid% nHostOutput s \"%hostoutput%\" 1.2.3.4.5.6 s '%itoc_cliente%' 1.2.3.4.5.7 s '%itoc_plataforma%' 1.2.3.4.5.8 s '%itoc_grupo_whatsapp%'";
$trap_command = "/usr/bin/snmptrap -v 2c -c $community $tcp$address$port '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s \"%host%\" nSvcDesc s \"%service%\" nSvcStateID i %servicestateid% nSvcOutput s \"%serviceoutput%\" 1.2.3.4.5.6 s '%itoc_seguimiento_ok%' 1.2.3.4.5.7 s '%itoc_seguimiento_alerta%' 1.2.3.4.5.8 s '%itoc_solicitud_oper_ok%' 1.2.3.4.5.9 s '%itoc_solicitud_oper_alerta%'";
That should do it, let me know if you have any questions.