Page 2 of 4

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 1:08 pm
by CFT6Server
Sorry I am not sure what you mean. All I did was run the discovery, and I can no longer apply any configurations as XI picks up these files that are placed in the nagios folder. I can't add any addition service checks (UCS or not) unless I remove the whole folder.

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 1:22 pm
by ssax
ssax wrote:Yeah, there should not be any quotes on those, they are an illegal character in Nagios.

Try changing all occurences of:

Code: Select all

"UCS admins"
To:

Code: Select all

UCS admins
Then try to verify

I'm still digging through the plugin to figure out where those quotes get added for a fix.
Did you do that?

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 1:55 pm
by CFT6Server
Apologies. I scrolled past that part. I edited the two files and removed the quotes. I am now able to apply configurations.

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 3:38 pm
by lmiltchev
Apologies. I scrolled past that part. I edited the two files and removed the quotes. I am now able to apply configurations.
Great! Is it safe to close the topic and mark it as resolved?

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 3:42 pm
by ssax
Oh, I see, when you installed the plugin it asks for you to provide the contact group name and you must've entered "UCS Admins" with the quotes instead of just UCS Admins, should be fixed permanently now when you made those changes.

You can try another autodiscovery to see if it breaks again.

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 4:26 pm
by CFT6Server
I will rerun the setup, since it is specified during the plugin installation. Looking back at my installation notes, you are correct. Quotation marks were used.

A related question to confirm what I am doing is right - After I run the discovery, even though it puts the files in the /usr/local/nagios/etc folder, all the configurations has to be imported via the XI method? Nothing actually shows in XI until I import. However, there are some xml files, which I dont know where to put these or import....

Code: Select all

drwxrwxr-x 5 apache nagios  4096 Jun  3 11:54 .
drwxrwsr-x 3 apache nagios  4096 Jun  3 11:52 ..
-rw-rw-r-- 1 apache nagios  1063 Jun  3 11:54 cisco_ucs_host.cfg
-rw-rw-r-- 1 apache nagios  1089 May 13 14:01 cisco_ucs_host.cfg_20150513-135508
-rw-rw-r-- 1 apache nagios  1803 Jun  3 11:54 cisco_ucs_service.cfg
-rw-rw-r-- 1 apache nagios  1829 May 13 14:01 cisco_ucs_service.cfg_20150513-135508
-rw-rw-r-- 1 apache nagios   218 Jan  9 09:14 cmd.cfg
-rw-rw-r-- 1 apache nagios  5814 Jun  3 11:52 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios  8903 Jun  3 11:52 .hostextinfo.xml
-rw-rw-r-- 1 apache nagios  8289 Jun  3 11:52 hostgrp.cfg
-rw-rw-r-- 1 apache nagios 10244 Jun  3 11:52 .hostgrp.xml
drwxrwxr-x 2 apache nagios  4096 Jun  3 11:52 kdcbchucs01
drwxrwxr-x 2 apache nagios  4096 Jun  3 11:52 kdcbchucs02
drwxrwxr-x 2 apache nagios  4096 Jun  3 11:52 kdcbchucs03

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 4:59 pm
by ssax
Yeah, if you want them in the XI CCM then you will need to import them.

If you don't care about them being in the XI CCM then you could always have them output to /usr/local/nagios/etc/static.

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 5:41 pm
by CFT6Server
the hostextinfo.cfg file - does this get imported as wel? If so when should that be imported?
.xml files - are these required?

Thanks

Re: Cisco UCSM Plugin Discovery

Posted: Wed Jun 03, 2015 7:33 pm
by CFT6Server
So I went and import the cfg starting with cmd.cfg. It errored with the following complaining that it is a duplicate for the command?

Code: Select all

Error: Could not add object property in file '/usr/local/nagios/etc/cisco/ucsObjs/cmd.cfg' on line 3. 

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: Extinfo objects are deprecated and will be removed in future versions 
Warning: Duplicate definition found for command 'check_cisco_ucs' (config file '/usr/local/nagios/etc/cisco/ucsObjs/cmd.cfg', starting on line 2) 
Error: Could not add object property in file '/usr/local/nagios/etc/cisco/ucsObjs/cmd.cfg' on line 3. 
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. 

Code: Select all

# cat /usr/local/nagios/etc/cisco/ucsObjs/cmd.cfg
# 'check_cisco_ucs' command definition
define command{
        command_name    check_cisco_ucs
        command_line    $USER1$/cisco_ucs_nagios -u $ARG1$ --passEnc $ARG2$ -H $HOSTADDRESS$ -t $ARG3$ -q $ARG4$ $ARG5$
 }

Re: Cisco UCSM Plugin Discovery

Posted: Thu Jun 04, 2015 9:08 am
by ssax
When you are doing the import, are you selecting the option to overwrite database?

We don't have any UCS servers to test that plugin on here so I'm not sure what those files contain. You could always zip up your /usr/local/nagios/etc/cisco directory and PM it to me so I can take a look at what those contain.

Edit: Received files and placed in shared support directory