check_cisco_firewall.sh email alert on Warning status

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.
Locked
mkhan12282
Posts: 28
Joined: Sun May 31, 2015 3:02 pm

check_cisco_firewall.sh email alert on Warning status

Post by mkhan12282 »

Nagios core: 3.5.0

Hello

Can we configure Nagios to send out email alert when failover status = warning? As of now it shows this status in the portal but we would like to get alerted when failover happens.
check_cisco_firewall.PNG
check_cisco_firewall.PNG (3.08 KiB) Viewed 1398 times
I have gone through these link already.
https://exchange.nagios.org/directory/P ... IX/details

Thank you.
MK
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_cisco_firewall.sh email alert on Warning status

Post by tgriep »

Yes, you can setup your service check to notify you on a warning.
For example, you would have to edit your service check and enable notifications, set a period, a notification interval and a contact.
Adjust to your needs.

Code: Select all

notification_interval           60
notification_period             24x7
notifications_enabled           1
contacts                        nagiosadmin
Then your contact will have to be setup also like below.

Code: Select all

define contact {
        contact_name                            nagiosadmin
        alias                                   Nagios Administrator
        host_notifications_enabled              1
        service_notifications_enabled           1
        host_notification_period                24x7
        service_notification_period             24x7
        host_notification_options               d,u,r,f,s
        service_notification_options            w,u,c,r,f,s
        host_notification_commands               	notify-host-by-email
        service_notification_commands            	notify-service-by-email
        email                                   nagios@localhost
        }
The above are example but here is a link to the online documentation that you can review further.
https://assets.nagios.com/downloads/nag ... n/toc.html

If you have any problems, please post the configs so we can review them.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mkhan12282
Posts: 28
Joined: Sun May 31, 2015 3:02 pm

Re: check_cisco_firewall.sh email alert on Warning status

Post by mkhan12282 »

Hi

Thanks for the input.
Sorry, i missed to add that we have notfications enabled, we just need to asa failover warning status to trigger email alert too. So based on what you suggested me, i have added another contact as "asa.failover" and added "w" in the service_notification_options. Please find doc attached. Appologies i had to hide some info relating to domains.

You will also note that i have added multiple emails in the "email" of "contacts.cfg". will this work? As far as nagios didn't complaint during the preflight check.

please let me know if you find the config OK
Thank you.
MK
nagios.docx
(45.33 KiB) Downloaded 201 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_cisco_firewall.sh email alert on Warning status

Post by tgriep »

You will have to create a separate contact, one per email address and then add them to the contact group and use that for your notifications.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked