Page 1 of 1

Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 1:25 pm
by pmpinto
Hi everyone, hope you can help me, i need monitoring deices (routers, switch, hosts) with different SNMP communities, if that possible on nagios core?.

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 1:30 pm
by tmcdonald
Certainly. Most SNMP plugins use the -C switch to define the community string. You will just need to define that (or whatever switch the plugin may use) per-service when setting up your checks.

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 1:50 pm
by pmpinto
Thanks for your help, i understand that, i use check_snmp and i use "-C public" and works fine but some of my hosts use public, others public2, and some switch and routers use public3. In my check_snmp expression i use "check_snmp!-C public, public2, public3 -o snmpEngineTime.0" and that not work for my. :?:

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 3:05 pm
by mcapra
Here's the usage for check_snmp:
https://nagios-plugins.org/doc/man/check_snmp.html

The plugin is not able to accept multiple SNMP community strings as an argument. You will need to know what the SNMP community string is for a given device and account for that in your command and service definitions.

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 3:10 pm
by pmpinto
mcapra wrote:Here's the usage for check_snmp:
https://nagios-plugins.org/doc/man/check_snmp.html

The plugin is not able to accept multiple SNMP community strings as an argument. You will need to know what the SNMP community string is for a given device and account for that in your command and service definitions.
Thanks a lot man, now i am in troubles :shock: jejejejejeje.

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 3:52 pm
by cdienger
Did you need any further help or are we okay to lock the thread?

Re: Multiple SNMP Communities with NAGIOS

Posted: Mon Apr 10, 2017 3:57 pm
by pmpinto
I am fine, thanks for your help....