Page 1 of 1
Creating service templates
Posted: Tue Oct 19, 2010 11:09 am
by jpipitone
We have a variety of services running for our BackupExec servers. I'd like to create a service template to monitor 5 services which can then be applied to a host that is added via the config manager.
I understand that the Configuration Wizard allows me to add a Windows host, however I'd like to create a service template which will automatically populate fields and perform service checks for 5 specific services.
Is there some documentation on the Nagios Exchange or Library that can help me create these service templates? I wasn't able to find any.
When creating a Service Template, it isn't clear to me where I would add the commands to check these Windows services.
I've taken a look at the service check that the wizard created, and it looks like the following:
Code: Select all
check_xi_service_nsclient!!SERVICESTATE!-l BackupExecAgentAccelerator -d SHOWALL!!!!!
However, in the CCM, when I create a new command, the check_nt command looks like:
Code: Select all
$USER1$/check_nt -H $HOSTADDRESS$ -p $USER7$ -s $USER8$ -v $ARG1$ $ARG2$
Just wondering what syntax is proper.
Thanks for any help.
Re: Creating service templates
Posted: Tue Oct 19, 2010 11:37 am
by mmestnik
For this you could create some services, perhaps sharing a common template, and assign them to a host group. Add each host to that hostgroup instead of each service to each host.
Templates create individual objects, but they don't have a multiplication function... That is a template is used to define many objects similarly, but not to define many objects.
Re: Creating service templates
Posted: Tue Oct 19, 2010 2:43 pm
by jpipitone
Ah ha.....that would explain why each and every time I assign a host to a host group, services are automatically added that I did not manually add during the Monitoring Wizard....
Am I correct in thinking that?
thank you
Re: Creating service templates
Posted: Tue Oct 19, 2010 2:52 pm
by jpipitone
OK - we're having a strange problem.
I haven't created any templates of any kind - I simply ran the Configuration Wizard and manually added a few services for one host.
I then ran the Configuration Wizard again, and added a few more hosts with only one custom service check each.
After applying the configuration and viewing the Home screen, NagiosXI shows all of the newly created hosts with ALL of the custom service checks, rather than the one I added.
When I click on Services under Monitoring in CCM, I don't see those services for the specified host - is there a template applied somewhere when you create new custom service checks in the wizard?
I've also noticed that certain drives I have chosen to monitor such as D and X are ALWAYS automatically added to hosts regardless of whether or not I have chosen them in the wizard, it seem as though these services are being added to all hosts and there's no way for me to delete them as they are not displaying when I am in CCM under Services.
Re: Creating service templates
Posted: Tue Oct 19, 2010 3:12 pm
by jpipitone
UPDATE: It seems to be the host group - once I removed the host from the hostgroup, the services went away and only displayed the ones I chose to add to the host.
Any help as far as why those services are being added would be appreciated!
Re: Creating service templates
Posted: Tue Oct 19, 2010 3:33 pm
by jpipitone
I've figured it out - the services were assigned to the wrong hostgroup and any server that I added to that hostgroup was automatically applied those services.
Sorry for all the posts!
Re: Creating service templates
Posted: Wed Oct 20, 2010 9:17 am
by mguthrie
No worries, glad it's working for you! Let us know if you hit any other problems.
Re: Creating service templates
Posted: Wed Oct 20, 2010 11:18 am
by mmestnik
Another problem with the CCM to keep in mind is that services are listed by description and *file name, not by host name. So looking for a service belonging to a specific host can be time consuming.
* Where file name is the name of the file the service is defined in or was uploaded as. There is no uniq key for services, but adding the same service description to a single host causes only one service to be created.