Nagios Host/Service Templates

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Nagios Host/Service Templates

Post by rbuckle »

Good morning,

My network has a lot of pieces of the same equipment, with the same services, same brand etc....

It is possible to create a host template with services, example would be a switch, to add a new switch to nagios of the same make/model you would just have to select the "HOST Template" and it would already create/have the services template for what you want monitored.

I would then be able to create 1 template for 300 or so devices that can be edited/updated/added to without having to create the host and then 10 services for EACH ONE.

If more clarification of what i am asking is need, just let me know.
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios Host/Service Templates

Post by dwhitfield »

Yes, under the CCM, on the left panel, under templates, you will see Host Templates and Service Templates.

More info at https://assets.nagios.com/downloads/nag ... gement.pdf

If that's not what you want, please describe what you want in more detail.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Host/Service Templates

Post by gormank »

I use hostgroups to do exactly what you ask. I also use host and service templates to keep monitoring info out of host and service definitions. Hostgroups are attached to services, and when a host is added to a hostgroup, the host monitoring is already configured.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Nagios Host/Service Templates

Post by dwhitfield »

For clarity, the document I provided above also discusses hostgroups.
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios Host/Service Templates

Post by rbuckle »

what i am asking is, is it possible to have 1 "group" of services for a device type.... then i could:

Template
{SERVICE GROUP} == RSSI,BANDWIDTH,STATUS,PING

Host Association
{HOST} + {SERVICE GROUP}

and nagios will automatically create a host with the listed services

Host - RSSI
- BANDWIDTH
- STATUS
- PING
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios Host/Service Templates

Post by gormank »

Nagios creates no hosts automagically. You can do it in puppet for example.
Can you provide the config/files where said syntax is defined?
While the logic is somewhat different, what you ask for is provided by hostgroups.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios Host/Service Templates

Post by mcapra »

As @gormank pointed out, what you are trying to do is possible with host groups.

Say I have the following devices with common services:
  • LAMP application servers
    • Apache
    • MySQL
  • MEAN application servers
    • Node
    • MongoDB
  • Cisco SG300 Switches
    • Common SNMP bandwidth checks for bandwidth
    • An OID for a super secret Cisco metric
    • Temperature, system metrics, etc
  • Windows Servers
    • C: Drive Check
    • CPU/MEM checks
    • IIS Application Pool Checks
If I wanted to save myself the time of hand-configuring the following checks on all my Windows machines:
  • C: Drive Check
  • CPU/MEM checks
  • IIS Application Pool Checks
The simplest way to achieve this would be to lump all my Windows Servers into a dedicated host group (say windows-servers) and then, rather than assigning the individual service checks to specific hosts, I would assign them to my fancy newq windows-servers host group I just made. From the Core Config Manager:
2017_02_23_09_59_49_CCM_Nagios_XI.png
2017_02_23_10_00_48_CCM_Nagios_XI.png
Now, whenever I add a host to my windows-servers hostgroup, it will inherit the "Drive C: Disk Usage" service definition I made.
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
https://www.mcapra.com/
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios Host/Service Templates

Post by rbuckle »

So I have created a group for SNMP checks for a wireless radio... I have tried assigning services/service templates to the group but when i add a host to the group it does nothing but group the hosts together.

I seem to still have to manually create each service again and associate it with the new host.
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
rbuckle
Posts: 146
Joined: Tue Aug 04, 2015 12:25 pm
Location: Idaho
Contact:

Re: Nagios Host/Service Templates

Post by rbuckle »

OK, I found your guys video on inheritance and hostgroups... I think that i have it working now :)

Thank you

You may close the ticket
----------------------------------
Running:
Installed Version: 5.8.3
OS: CentOS 7
Nagios XI
Enterprise License
Locked