Page 1 of 1
NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Practi
Posted: Sat Mar 29, 2014 12:15 am
by mlopez
Hi All,
I'm setting up a pretty large scale host / services and wondering if I could have some guidance on best practice to help ease the pain.
I have 1,000 hosts and 45 services (SNMP TRAPS) per hosts, all services are SNMP Trap Services and all newly added hosts will always be for SNMP Traps. The biggest concern is if I have to add a new SNMP Trap and then I would need to add it to each one of these hosts, I guess I could just utilize awk and sed for mass modification to populate all the configs but wondering how you would recommend in doing this.
Right now I have made 1 host group and 1 service group and applied all the hosts / services.
Below are some scenarios I would like to find out for best practice so simplify my life when doing large scale modifications:
- Add a new service and apply to existing hosts.
- Modify specific service settings and apply to all hosts.
Any information would be greatly appreciated.
Sincerely,
Michael
Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr
Posted: Mon Mar 31, 2014 11:49 am
by sreinhardt
Before we get into the nagios configurations directly. I want to clarify exactly what you have\expect to have happen.
Do you have multiple hosts sending snmp traps for different services?
Are these services sending traps on their own, or via a central daemon?
How are you differentiating these within the snmptt.conf file or the added mib files to determine what service in nagios should be updated?
Maybe you could PM me a profile.zip and your snmptt.conf file, so that I may take a look and see what you have done so far?
Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr
Posted: Wed Apr 02, 2014 3:21 pm
by mlopez
Hi Spenser,
Q:Do you have multiple hosts sending snmp traps for different services?
A: I do, I have around 1,000 hosts sending 45 different traps each (I've configured each trap as it's own SNMP Trap Service per host)
Q:Are these services sending traps on their own, or via a central daemon?
A:Each one of these hosts have a central daemon per location and have a unique identifier per site.
Q:How are you differentiating these within the snmptt.conf file or the added mib files to determine what service in nagios should be updated?
A:The unique identifier being $1 helped me map all the hosts approprietly in Nagios and Nagios XI is perfectly configured to my liking. Meaning Traps are being received and displayed and mapped to the appropriate services through snmptt I used the following EXEC /usr/local/bin/snmptraphandling.py "$1" "NAGIOS-SERVICE-NAME" "$s" "$@" "$-*" "xxxxxxxxxx"
Q:The only issue is I have a fairly large NagiosXI installation now with 50,000 services but this was expected but I was wondering if there is a way if I change any settings on a host or a specific service it would clone host / service wide depending if they are part of the same hostgroup / servicegroup.
Thanks again Spenser for all your help,
Sincerely,
Michael
Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr
Posted: Thu Apr 03, 2014 12:26 pm
by scottwilkerson
mlopez wrote:
Q:The only issue is I have a fairly large NagiosXI installation now with 50,000 services but this was expected but I was wondering if there is a way if I change any settings on a host or a specific service it would clone host / service wide depending if they are part of the same hostgroup / servicegroup.
This would work if you have a single service configuration with a hostgroup added (instead of a host), this scenario would add the service to EVERY host in the hostgroup, and the changes to the configuration would apply to ALL of the services.
Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr
Posted: Thu Apr 03, 2014 12:42 pm
by sreinhardt
OK that makes a whole lot more sense with some background. Yes you absolutely can do this, in several different ways depending on the granularity of control you want. You could do a single service template for each service that you wish to have, and apply them to appropriate host groups, however this would force all settings to be the exact same for them all. If you wanted more granular control, creating a base template that has most options, inherit that with several more templates that apply more specific settings per template, and finally onto hosts or hostgroups to get them added. These two examples among many other possibilities could be used to achieve this.
Best practices, however are a bit more of a case by case basis. I would suggest looking at how you want to lay this out, how many different cases of each template or set of templates you might need, and how you would like to apply those to individual host and host groups. I would say you are absolutely on the right track doing it this way instead of manually, but how you wish to implement it in the end really depends on your environment.