How to deploy alert API in Nagios system?
Edited by Chris@Wisvia at 2014-10-3 17:12You can take following steps to deploy alert API to your Nagios,
1. Login your Wisvia portal and you will see two alert API URLs under Company Management page. One is for service check, the other is for host check.
These two URLs are unique for different company account. Make sure use your own API URLs when configure Nagios.
2. Edit commands.cfg in Nagios system
Add following two commands for service and host configuration separately and replace <Alert API for Service> and <Alert API for Host> with your own alert API URLs captured from step 1. define command {
command_name notify-service-by-wisvia
command_line wget --no-check-certificate "<Alert API for Service>"
}
define command {
command_name notify-host-by-wisvia
command_line wget --no-check-certificate "<Alert API for Host>"
}
3. Update "service_notification_commands" and "host_notification_commands" parameters in your Nagios Contact definition, usually found in contacts.cfg and templates.cfg. Below is a illustration of applying Wisvia notification commands at contact template, so that all defined contacts inherite the these notification commands.
define contact{
name generic-contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-wisvia
host_notification_commands notify-host-by-wisvia
register 0
}
4. Save all Nagios config files and restart Nagios.
Pages:
[1]