Sign in to leave a message
Remember me
Do not have an account?
Sign up now!
Register

User name
Password
Confirm password
Email

 
 
FAQ
View: 33634|Reply: 0

How to deploy alert API in Nagios system?

[Copy link]
How to deploy alert API in Nagios system?
shawn
0
33634
Edited by Chris@Wisvia at 2014-10-3 17:12

You 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.
1.jpg
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.   
  1. define command {
  2.      command_name notify-service-by-wisvia
  3.      command_line wget --no-check-certificate "<Alert API for Service>"
  4. }

  5. define command {
  6.      command_name notify-host-by-wisvia
  7.      command_line wget --no-check-certificate "<Alert API for Host>"
  8. }
Copy the Code


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.

  1. define contact{
  2.      name                            generic-contact
  3.      service_notification_period     24x7  
  4.      host_notification_period        24x7
  5.      service_notification_options    w,u,c,r,f,s
  6.      host_notification_options       d,u,r,f,s   
  7.      service_notification_commands   notify-service-by-wisvia
  8.      host_notification_commands      notify-host-by-wisvia
  9.      register                        0               
  10. }
Copy the Code

4. Save all Nagios config files and restart Nagios.