Page 1 of 1

Nagios and SNMP

Posted: Thu Oct 21, 2010 10:16 am
by dr5419
I have a nagios maching on my network that is monitoring my servers. I now need to use Nagios to accept and report SNMP traps. I have searched everywhere i know to search and have not found any articles on configureing Nagios to do this task. The hardware i am needing to monitor are Cisco 6509 Catalists.. the switches will send out SNMP messages but i can not figure out how to get Nagios to accept them. Any help is appreciated...

Re: Nagios and SNMP

Posted: Thu Oct 21, 2010 10:23 am
by tonyyarusso
There is a document on http://library.nagios.com/library/produ ... -nagios-xi that describes how to receive SNMP traps in Nagios XI, and the first two pages apply equally to Nagios Core. After that, you can analyze the source code of the wizard mentioned on page 3 to see the configuration format for creating a service to use them.

Re: Nagios and SNMP

Posted: Thu Oct 21, 2010 10:32 am
by dr5419
Thanks for your reply. I'm assuming by what i've read in the article you gave me that in order for this to work i will be needing to purchase and download Nagios XI? I am currently using Nagios 3.0.6.

Re: Nagios and SNMP

Posted: Thu Oct 21, 2010 10:48 am
by tonyyarusso
No, that's what I mean by "the first two pages apply equally to Nagios Core". The wizard stuff is only for XI, but the basic architecture applies to both - you just have to write your own configs manually.

Re: Nagios and SNMP

Posted: Thu Oct 21, 2010 11:03 am
by dr5419
Thank you soooo much Tony.. I'll start going through the article now.. I really do appreciate it. Don

Re: Nagios and SNMP

Posted: Fri Oct 22, 2010 10:28 am
by dr5419
Ok. I guess i'm being dumb. I read through the link provided agove and am still having trouble. The link doesn't provde me instructions on pointing a switch thats sending the SNMP traps to the SNMP server and how to match the community strings. does anyone have any sample configs on how to do this? I am using Nagios3 with the SNMP plug-in. Thanks for any help given..

Re: Nagios and SNMP

Posted: Tue Oct 26, 2010 12:18 pm
by tonyyarusso
I think this is all just done on the device end, and so you'd need to check the documentation for that. For instance, here's what it looks like for our Netgear switches:
netgear-traps.png
netgear-traps.png (43.25 KiB) Viewed 2780 times
I don't think there's any Nagios-end config about community strings when working with traps. Also, here's a config example for the service:

Code: Select all

define service {
       host_name                       some-switch
       name                            snmptrap_service
       service_description             SNMP Traps
       max_check_attempts              1
       check_interval                  1
       retry_interval                  1
       check_period                    24x7
       notification_interval           1
       notification_period             24x7
       contacts                        nagiosadmin
       icon_image                      snmptrap.png
       register                        1
       check_command                   check_dummy!0!"TRAP RESET"
       is_volatile                     1
       initial_state                   o
       active_checks_enabled           0
       passive_checks_enabled          1
       flap_detection_enabled          0
       stalking_options                o,w,u,c
       parallelize_check               1
       obsess_over_service             1
       check_freshness                 0
       event_handler_enabled           1
       process_perf_data               1
       retain_status_information       1
       retain_nonstatus_information    1
       notifications_enabled           1
       failure_prediction_enabled      1
}