I've install the UCS plugin and addon. Trying to run the Auto discovery which places cfg files in /usr/local/nagios/etc/cisco/ucsObjs/. However once it does that, I can no longer verify the configurations. It is complaining about a contactgroup that it cannot find. I created the contactgroup and made sure it was there. Any idea what is happening here? I ran some tests with an earlier version of Nagios XI before with this plugin and didn't run into this problem. I however at the time did have to manually import the host/servers cfg and the service groups, which I get why. But I can no longer get the configuration working and I suspect it has something to do with the plugin directly placing files in the Nagios configuration folders?
Right after I run the discovery, I get errors when I click on Verify Configuration in the Write Config Files section.
Error: Contactgroup '"UCS admins"' is not defined anywhere
Error: Could not add contactgroup '"UCS admins"' to host (config file '/usr/local/nagios/etc/cisco/ucsObjs/kdcbchucs03/kdcbchucs03_fi_A.cfg', starting on line 1)
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
WARNING: Extinfo objects are deprecated and will be removed in future versions
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in host type objects (config file '/usr/local/nagios/etc/cisco/ucsObjs/cisco_ucs_host.cfg', starting at line 1)
Warning: failure_prediction_enabled is obsoleted and no longer has any effect in service type objects (config file '/usr/local/nagios/etc/cisco/ucsObjs/cisco_ucs_service.cfg', starting at line 1)
Error: Contactgroup '"UCS admins"' is not defined anywhere
Error: Could not add contactgroup '"UCS admins"' to host (config file '/usr/local/nagios/etc/cisco/ucsObjs/ucs03/ucs03_fi_A.cfg', starting on line 1)
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
My contact groups:
contact groups.JPG
Any suggestions? Perhaps I have to move all the configuration files from the Nagios folder and import everything?
You do not have the required permissions to view the files attached to this post.
That didn't show it but what I'm seeing is that contact group it's actually looking for is called "UCS admins" (with the quotes).
After you run the autodiscovery post that file, don't try to apply/verify/or anything in between. Just do a autodiscovery so it writes the configs, then paste the contents of the file. I will look through the plugin while you do that.
# cat cisco_ucs_host.cfg
define host{
name cisco-ucs-host ; The name of this host template
notifications_enabled 1 ; Host notifications are enabled
event_handler_enabled 1 ; Host event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
failure_prediction_enabled 1 ; Failure prediction is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
check_command check-host-alive
max_check_attempts 10
notification_interval 0
notification_period 24x7
notification_options d,u,r
contact_groups "UCS admins"
register 0 ;
}
These are all generated from the autodiscovery plugin.