NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Practi

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Practi

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr

Post 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?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
mlopez
Posts: 62
Joined: Fri Oct 19, 2012 11:35 am

Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr

Post 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.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: NagiosXI SNMP Service (Hostgroup / Servicegroup) Best Pr

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked