ktelep / EMC-Zabbix-Integration

Integration for Zabbix and the EMC ECOM server for VNX1/VNX2 Monitoring
MIT License
35 stars 13 forks source link

ValueError. Zabbix 3.0 #11

Closed LinAdm closed 8 years ago

LinAdm commented 8 years ago

Hi! My config: CentOS 7 on VMware \ Zabbix 3.0 \ Python 2.7 \ EMC VNX5500 ECOM Server works local on Zabbix server machine. I'v got a problems in Web interface Zabbix:

Traceback (most recent call last):
  File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 628, in <module>
    main()
  File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 620, in main
    args.ecom_user, args.ecom_pass)
  File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 350, in hardware_healthcheck
    dev_instance = ecom_conn.Associators(array, ResultClass=device)
  File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 701, in Associators
    params = self._add_objectname_param(params, ObjectName)
  File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 672, in _add_objectname_param
    raise ValueError('Expecting a classname, CIMClassName or '
ValueError: Expecting a classname, CIMClassName or CIMInstanceName object

In terminal scripts emc_vnx_discovery.py emc_vnx_stats.py work well, I see data. And in log file /tmp/emc_vnx_discovery.log

2016-04-22 08:52:03,801 INFO 28422 Building WBEM Connection to http://127.0.0.1:5989
2016-04-22 08:52:03,802 INFO 28422 Disk discovery started
2016-04-22 08:52:05,092 INFO 28422 Generating output
2016-04-22 08:52:05,096 INFO 28422 Discovery Complete

When Zabbix server starts scripts in log file I see

2016-04-22 08:54:54,253 INFO 29036 Building WBEM Connection to http://127.0.0.1:5989
2016-04-22 08:54:54,253 INFO 29036 Disk discovery started
2016-04-22 08:54:54,263 ERROR 29036 Uncaught exception: Expecting a classname, CIMClassName or CIMInstanceName object
None

Help me please!

ktelep commented 8 years ago

What make/model of VNX are you running against? This looks like it may be a VNXe which is not yet supported.... On Fri, Apr 22, 2016 at 12:31 AM LinAdm notifications@github.com wrote:

Hi! My config: CentOS 7 on VMware \ Zabbix 3.0 \ Python 2.7 ECOM Server works local on Zabbix server machine. I'v got a problems in Web interface Zabbix:

Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 628, in main() File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 620, in main args.ecom_user, args.ecom_pass) File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 350, in hardware_healthcheck dev_instance = ecom_conn.Associators(array, ResultClass=device) File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 701, in Associators params = self._add_objectname_param(params, ObjectName) File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 672, in _add_objectname_param raise ValueError('Expecting a classname, CIMClassName or ' ValueError: Expecting a classname, CIMClassName or CIMInstanceName object

In terminal scripts emc_vnx_discovery.py emc_vnx_stats.py work well, I see data. And in log file /tmp/emc_vnx_discovery.log

2016-04-22 08:52:03,801 INFO 28422 Building WBEM Connection to http://127.0.0.1:5989 2016-04-22 08:52:03,802 INFO 28422 Disk discovery started 2016-04-22 08:52:05,092 INFO 28422 Generating output 2016-04-22 08:52:05,096 INFO 28422 Discovery Complete

When Zabbix server starts scripts in log file I see

2016-04-22 08:54:54,253 INFO 29036 Building WBEM Connection to http://127.0.0.1:5989 2016-04-22 08:54:54,253 INFO 29036 Disk discovery started 2016-04-22 08:54:54,263 ERROR 29036 Uncaught exception: Expecting a classname, CIMClassName or CIMInstanceName object None

Help me please!

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ktelep/EMC-Zabbix-Integration/issues/11

ktelep commented 8 years ago

Ignore my previous I see that it does in fact work from terminal but not from execution from within Zabbix. Can you confirm you've set the user macros correctly in the host definition within Zabbix? Might be as simple as an incorrect serial number or leading/trailing space.

On Fri, Apr 22, 2016 at 7:27 AM Kurt Telep ktelep@gmail.com wrote:

What make/model of VNX are you running against? This looks like it may be a VNXe which is not yet supported.... On Fri, Apr 22, 2016 at 12:31 AM LinAdm notifications@github.com wrote:

Hi! My config: CentOS 7 on VMware \ Zabbix 3.0 \ Python 2.7 ECOM Server works local on Zabbix server machine. I'v got a problems in Web interface Zabbix:

Traceback (most recent call last): File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 628, in main() File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 620, in main args.ecom_user, args.ecom_pass) File "/usr/lib/zabbix/externalscripts/emc_vnx_stats.py", line 350, in hardware_healthcheck dev_instance = ecom_conn.Associators(array, ResultClass=device) File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 701, in Associators params = self._add_objectname_param(params, ObjectName) File "/usr/lib/python2.7/site-packages/pywbem/cim_operations.py", line 672, in _add_objectname_param raise ValueError('Expecting a classname, CIMClassName or ' ValueError: Expecting a classname, CIMClassName or CIMInstanceName object

In terminal scripts emc_vnx_discovery.py emc_vnx_stats.py work well, I see data. And in log file /tmp/emc_vnx_discovery.log

2016-04-22 08:52:03,801 INFO 28422 Building WBEM Connection to http://127.0.0.1:5989 2016-04-22 08:52:03,802 INFO 28422 Disk discovery started 2016-04-22 08:52:05,092 INFO 28422 Generating output 2016-04-22 08:52:05,096 INFO 28422 Discovery Complete

When Zabbix server starts scripts in log file I see

2016-04-22 08:54:54,253 INFO 29036 Building WBEM Connection to http://127.0.0.1:5989 2016-04-22 08:54:54,253 INFO 29036 Disk discovery started 2016-04-22 08:54:54,263 ERROR 29036 Uncaught exception: Expecting a classname, CIMClassName or CIMInstanceName object None

Help me please!

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/ktelep/EMC-Zabbix-Integration/issues/11

LinAdm commented 8 years ago

all data is correct, I have done according to the instructions

ktelep commented 8 years ago

Does the emc_vnx_discovery.py also fail when running from Zabbix? Are you getting objects at least being created during discovery and just the stats script is failing?

LinAdm commented 8 years ago

The discovery is working normaly and .tmp files (Disks_data.tmp, SP_data.tmp ...) were created in /tmp It seems thats scripts stats.py isn't working.

ktelep commented 8 years ago

Okay, working on narrowing it down. The stats script doens't have as good of logging unfortunately. Do all of the emc_vnx_stats.py calls fail?

In each Application in Zabbix under the Array, you'll see an item called ' Stats Collection' Can you check the output of each one and see if there is a specific one that is failing.

The traceback you posted points to collecting the array physical hardware, which would include Fans, Batteries, LCC cards, etc. All of which technically should exist. If only this one is failing, then maybe your array doesn't have one of the 5 components being checked for, and the CIM object never gets created within ECOM, which would explain the error. If all of them are failing, then it would be an issue in Enumerating the actual storage array, which is weird because discovery is working...

ktelep commented 8 years ago

I know it sounds redundant but can you do me a favor and 100% validate that the Serial number listed in the Host inventory tab is EXACTLY correct. So far this is the only way I've been able to cause this failure.

If it is, I'd like to setup a webex that we can jump on so I can debug the issue further. Email me at Kurt.Telep@emc.com if you'd like to go down that route.

ktelep commented 8 years ago

From one of my Zabbix 2 instances, but the idea is the same, it should look like this.

image

ktelep commented 8 years ago

I've added additional logging to the emc_vnx_stats.py script.

If you pull down the latest version, edit the emc_vnx_stats.py script and change logging.INFO to logging.DEBUG on line 14, it will now create a file in /tmp called emc_vnx_stats.log (similar to discovery)

It will then dump the actual arguments passed to it as a log entry, that can be used to validate that the right info is being handed off from Zabbix to the script. Let me know if this provides any additional clues.

2016-04-22 10:53:27,459 DEBUG 27233 Arguments parsed: Namespace(array=True, disks=False, ecom_ip='10.5.36.50', ecom_pass='#1Password', ecom_user='admin', poolperf=None, pools=False, procs=False, serial='APM00111903059', volumes=False)

LinAdm commented 8 years ago

emc_vnx_stats.log helped me to find mistake. tmp

originally I create host with name ARRAY SERIAL old_version

and in Host Inventory I pointed Serial number host_inventory

I changed host name ARRAY SERIAL on "serial number" of storage. host name

Script started working! Thanks a lot!