Lenovo Xclarity SNMP

Hi,

I have this version of Check_mk 2.1.0p33 CRE, and i’m here to ask how monitor my XClarity server in Check_mk.

I’ve already tried doing something, like configuring user and password in both envirorment, Check_mk GUI and BCC on XClarity, but when i try to contact the server obtian this:

OMD[fenice]:~$ cmk --debug -vvI hostname
Discovering services and host labels on: hostname
hostname:
+ FETCHING DATA
  Source: SourceType.MANAGEMENT/FetcherType.SNMP
[cpu_tracking] Start [7f57b2d225e0]
[SNMPFetcher] Fetch with cache settings: SNMPFileCache(hostname, base_path=/omd/sites/fenice/tmp/check_mk/data_source_cache/mgmt_snmp, max_age=MaxAge(checking=0, discovery=120, inventory=120), disabled=False, use_outdated=False, simulation=False)
Not using cache (Too old. Age is 606641 sec, allowed is 120 sec)
[SNMPFetcher] Execute data source
  SNMP scan:
       Getting OID .1.3.6.1.2.1.1.1.0: Running 'snmpget -v1 -c public -m "" -M "" -On -OQ -Oe -Ot 10.1.1.10 .1.3.6.1.2.1.1.1.0'
ERROR: SNMP error
Timeout: No Response from 10.1.1.10.

failed.
[cpu_tracking] Stop [7f57b2d225e0 - Snapshot(process=posix.times_result(user=0.010000000000000009, system=0.0, children_user=0.0, children_system=0.0, elapsed=6.050000000745058))]
  Source: SourceType.HOST/FetcherType.SNMP
[cpu_tracking] Start [7f57b2fcf820]
[SNMPFetcher] Fetch with cache settings: SNMPFileCache(hostname, base_path=/omd/sites/fenice/tmp/check_mk/data_source_cache/snmp, max_age=MaxAge(checking=0, discovery=120, inventory=120), disabled=False, use_outdated=False, simulation=False)
Not using cache (Too old. Age is 606647 sec, allowed is 120 sec)
[SNMPFetcher] Execute data source
  SNMP scan:
       Using cached OID .1.3.6.1.2.1.1.1.0: None
[cpu_tracking] Stop [7f57b2fcf820 - Snapshot(process=posix.times_result(user=0.010000000000000009, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
  Source: SourceType.HOST/FetcherType.PIGGYBACK
[cpu_tracking] Start [7f57b2fcfa30]
[PiggybackFetcher] Fetch with cache settings: NoCache(hostname, base_path=/omd/sites/fenice/tmp/check_mk/data_source_cache/piggyback, max_age=MaxAge(checking=0, discovery=120, inventory=120), disabled=True, use_outdated=False, simulation=False)
Not using cache (Cache usage disabled)
[PiggybackFetcher] Execute data source
No piggyback files for 'hostname'. Skip processing.
No piggyback files for '10.1.1.10'. Skip processing.
Not using cache (Cache usage disabled)
[cpu_tracking] Stop [7f57b2fcfa30 - Snapshot(process=posix.times_result(user=0.0, system=0.0, children_user=0.0, children_system=0.0, elapsed=0.0))]
+ PARSE FETCHER RESULTS
  Source: SourceType.MANAGEMENT/FetcherType.SNMP
  -> Not adding sections: Cannot fetch system description OID .1.3.6.1.2.1.1.1.0. Please check your SNMP configuration. Possible reason might be: Wrong credentials, wrong SNMP version, Firewall rules, etc.
  Source: SourceType.HOST/FetcherType.SNMP
  -> Not adding sections: Cannot fetch system description OID .1.3.6.1.2.1.1.1.0. Please check your SNMP configuration. Possible reason might be: Wrong credentials, wrong SNMP version, Firewall rules, etc.
  Source: SourceType.HOST/FetcherType.PIGGYBACK
No persisted sections
  -> Add sections: []
Received no piggyback data
Received no piggyback data
+ ANALYSE DISCOVERED HOST LABELS
Trying host label discovery with:
Trying host label discovery with:
SUCCESS - Found no new host labels
+ ANALYSE DISCOVERED SERVICES
+ EXECUTING DISCOVERY PLUGINS (0)
  Trying discovery with:
SUCCESS - Found no new services

Can someone help me?
I can share everything if can help it!

Thanks Regards

For XClarity you have only two options.
My legacy SNMP checks here.

Or the more modern Redfish REST API checks here.

For the first one you need to configure SNMP credentials on the XClarity and for the Redfish one you need an read only user account on XClarity.

Hi @andreas-doehler thank you for reply.

Since i’m newest in check_mk’s world, from url you share me, can u tell me the difference between the two. And How can i “install” mkp file? can i do that in my check_mk version (2.1.0p33 CRE)?

Thanks in advance

The first link is a mkp what includes checks over SNMP, that means you need to configure the SNMP service on your XClarity controller with a community or v3 credentials.
The second one is a mkp that includes checks over the HTTPS Redfish REST API of the XClarity controller. To use this method you need a user account and password from the XClarity with minimal read access.

For booth packages the install is done on the command line.
The complete description of mkp handling can be found here.

2 Likes

Hi @andreas-doehler,

I’m trying with first option and i get this error:

OMD[host]:~$ mkp add lenovo_xclarity_snmp-1.0.mkp
Invalid packaging command. Allowed are: create, disable, disable-outdated, enable, find, install, list, pack, release, remove and show.
OMD[host]:~$ mkp list
Name Version Title Author Req. Version Until Version Files State
---- ------- ----- ------ ------------ ------------- ----- -----
OMD[host]:~$ mkp install lenovo_xclarity_snmp-1.0.mkp 
Traceback (most recent call last):
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1691, in gzopen
    t = cls.taropen(name, mode, fileobj, **kwargs)
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1668, in taropen
    return cls(name, mode, fileobj, **kwargs)
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1531, in __init__
    self.firstmember = self.next()
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 2363, in next
    raise e
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 2336, in next
    tarinfo = self.tarinfo.fromtarfile(self)
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1121, in fromtarfile
    buf = tarfile.fileobj.read(BLOCKSIZE)
  File "/omd/sites/fenice/lib/python3.9/gzip.py", line 300, in read
    return self._buffer.read(size)
  File "/omd/sites/fenice/lib/python3.9/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/omd/sites/fenice/lib/python3.9/gzip.py", line 487, in read
    if not self._read_gzip_header():
  File "/omd/sites/fenice/lib/python3.9/gzip.py", line 435, in _read_gzip_header
    raise BadGzipFile('Not a gzipped file (%r)' % magic)
gzip.BadGzipFile: Not a gzipped file (b'{"')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/fenice/bin/check_mk", line 92, in <module>
    exit_status = modes.call(mode_name, mode_args, opts, args)
  File "/omd/sites/fenice/lib/python3/cmk/base/modes/__init__.py", line 69, in call
    return handler(*handler_args)
  File "/omd/sites/fenice/lib/python3/cmk/base/modes/check_mk.py", line 744, in mode_packaging
    cmk.base.packaging.do_packaging(args)
  File "/omd/sites/fenice/lib/python3/cmk/base/packaging.py", line 95, in do_packaging
    f(args)
  File "/omd/sites/fenice/lib/python3/cmk/base/packaging.py", line 327, in package_install
    package = packaging.store_package(fh.read())
  File "/omd/sites/fenice/lib/python3/cmk/utils/packaging.py", line 330, in store_package
    with tarfile.open(fileobj=BytesIO(file_content), mode="r:gz") as tar:
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1638, in open
    return func(name, filemode, fileobj, **kwargs)
  File "/omd/sites/fenice/lib/python3.9/tarfile.py", line 1695, in gzopen
    raise ReadError("not a gzip file")
tarfile.ReadError: not a gzip file

Any suggests?

Thanks in advance

@andreas-doehler, excuse me, can you help me with this issue!

It’s my fault to digit something wrong or i can’t install it?

Thanks in advance

At the moment I cannot look at the GitHub download. This file you should check with your favourite compression tool that can handle tar.gz files. One mkp is nothing else than a tar.gz. The file must be a valid archive.