[Nagiosplug-devel] SNMP community in host configuration

Patrick Proy nagios at proy.org
Sun Dec 19 14:29:12 CET 2004


Hi, 

Thanks for your feedback ! It was a long post...

> [mailto:nagiosplug-devel-admin at lists.sourceforge.net] De la 
> part de Andreas Ericsson
> It should have been there from the beginning. I'm 
> cross-posting to nagios-devel now. Please continue there, as 
> Ethan doesn't read the nagiosplug lists as carefully as he 
> does the nagios-devel one.
> 
So last cross posting at nagiosplug-devel, thread will continue at
nagios-devel only. (It made sense at the beginning to put it in
nagiosplug-devel...)

> Why not throw in snmp_community as well, and save the users 
> the need to ask where to put it (users don't read 
> documentation; That's just the way it is).

Good idea (and not much work, so great idea !).
 
> I don't think it's a very good idea to involve snmp 
> configuration in the nagios.cfg file, for a couple of reasons.
> 1) It will fail miserably if the address field consists of a 
> hostname instead of an ip-address. 
>[....]

I agree with this, but there could be some examples in nagios.cfg-template
so nobody will put host names.

> 2) The syntax is a bit stupid. Why add a config file entry 
> for 65535 hosts in one place when it could just as easily be 
> in a template? With that many hosts using roughly the same 
> settings you would most likely want to set up the templates 
> good and properly anyways.

The first idea is that large network ranges have the same snmp community
except some hosts or networks, and that case is also being taken care of. 
The second is that I think it's easy to do like this instead of using
templates. The templates are only here as bonus (the way it's done by
xodtemplate.c makes it automatic), and I like this way of doing it.  

> 3) If nagios ever decides to add it's own MIB so that other 
> programs can query it via SNMP, it will cause legacy clashes 
> and users won't know where to configure what.

In this case, the label "snmp_login" can be changed to more explicit one.
 
> I believe it would be prudent to simply drop this second way 
> of configuring things and sticking to keeping it in the host 
> object definition (which is a very good idea).

I also believe it's a very good idea :-) , and I think it makes sense to be
able to do it both ways.

> The intuitive connection between the name 'hostuser' and what 
> I think it would most likely represent clashes a bit with the 
> way contacts work (john, mike and joe are users, and they're 
> responsible for the web-* servers, f.e.). I would really 
> prefer if they were named "hostmacro" instead.

That's true, and can be easely changed (so another great idea). 

> Ofcourse, the presence of hostmacros sort of voids the 
> necessity for the snmp_* variables [....]

I first wanted only to do HOSTUSER (or snmp_*) macros, but the main work was
to follow the configuration in Nagios, so I did both, and now I'm waiting
for feedback from users and fomr Nagios developpers.
As my first aim was to do something with snmp, I've done something more
specific with it.

> 
> 1->10 is cleaner and consistent with how things work now.

It's in the TODO. I'm waiting for feedbacks (from users and nagios
developpers) before going further on.


Patrick
nagios AT proy.org





More information about the Devel mailing list