new service not showing up in the cfg file
new service not showing up in the cfg file
I created a host using the Windows server Wizard. That went OK. The services created included a disk check of C: drive. This server also has a D: drive that I would like to monitor. So I made another service and copied the C: drive service, except for the drive letter which I made D. I tested with the Check Command button and it worked fine. Then I saved it and Applied the Configuration. That caused an error. No host or service description in /usr/local/nagios/etc/services/mfs2.macomb.local.cfg. When I looked at the configuration file, there was no entry at all for this service. It failed to add the service to that file. Any idea why this is happening. Can I not add a service to a host that was added with a wizard?
Re: new service not showing up in the cfg file
When you click on the "Copy" actions button, a new service named "<config name__copy_1" should be created (set as "inactive"). Next, you need to find/select "<config name__copy_1" from the "Filter by Config Name" drop-down menu and click on it to modify it. Modify the "Config Name" to match the "original" config by removing the _copy_1" portion of the name. Change the "Description" for example from "Drive C: Disk Usage" to "Drive D: Disk Usage". Click on "Manage Hosts" to double check if the service is added to the correct host (it should be, but never hurts to check). You can check other things if you want but this service should be an identical copy of the first one, so you should be fine. Select the "Active" check box to make the service active and click on "Apply Configuration".
Note: Before you perform the above steps, resolve the config errors but deleting or deactivating the "offending" service.
Note: Before you perform the above steps, resolve the config errors but deleting or deactivating the "offending" service.
Be sure to check out our Knowledgebase for helpful articles and solutions!