SNMPv3 and API for Netapp

Hello,

I’m on Check_mk Raw edition 2.1.0
OS : Debian 10

I try to add a NAS Netapp on check_mk with SNMPv3

I think my basic configuration is ok because the snpwalk works (from check_mk server to the Netapp).

root@CMK01:~# snmpwalk -v 3 -u snmpv3user -a SHA -A Password! -x DES -X Password! -l authPriv 172.20.1.7 .1
iso.3.6.1.2.1.1.1.0 = STRING: "NetApp Release 9.10.1P4: Mon May 09 22:11:44 UTC 2022"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.789.2.5
iso.3.6.1.2.1.1.3.0 = Timeticks: (1173384307) 135 days, 19:24:03.07
iso.3.6.1.2.1.1.4.0 = STRING: "*********"
iso.3.6.1.2.1.1.5.0 = STRING: "AFFA200"
iso.3.6.1.2.1.1.6.0 = STRING: "*******"
iso.3.6.1.2.1.1.7.0 = INTEGER: 72
iso.3.6.1.4.1.789.1.1.1.0 = INTEGER: 2
iso.3.6.1.4.1.789.1.1.2.0 = STRING: "NetApp Release 9.10.1P4: Mon May 09 22:11:44 UTC 2022"
......

I have 144 lines.

On check_mk, I try 2 things:

And… That works good, but I have only 17 Services:

I remember on other Netapp where I have near 70 or 80 services.

So why only this service ? I have lot of more result with SNMWALK.

I Try API with user monitoring:

So with that I Try to had API User option:

checkmk_bug_08

But I have this error:

Any ideas ?

Regards.

This is normally the only way to monitor a Netapp.
After you configured the special agent you can view the created command on the shell with “cmk -D hostname”. If you execute the special agent command manually it is possible that you get more output than the “exit code 1”

Hello,
Thank you for answer.

With SNMPv3, when I do the cmk -D nas, I see that:

If I try with only API :

Check_mk see 0 service.

Thank you.

What happens if you execute the command shown at → Type of agent: → Program: ?
The SNMP output is fine but not relevant for the real monitoring of the Netapp.

Hello,
Thank you for you availability,
I don’t understand “if you execute the command shown at → Type of agent: → Program: ?”
However, I try this check to exclude a mistake :

root@CMK01:~# curl -skL -w "%{http_code}" "https://@ip/sysmgr/v4/" -o /dev/null
200

So we are sure check_mk can go on API.

Regards.


This command from your screenshot.

1 Like

Hello,

OMD[***]:~$ /omd/sites/***/share/check_mk/agents/special/agent_netapp '***' 'monitoring' '***' '--no_counters'
<<<netapp_api_connection>>>
Agent Exception (contact developer): Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.

Now with debug:

OMD[***]:~$ /omd/sites/***/share/check_mk/agents/special/agent_netapp '172.20.1.7' 'monitoring' '*** '--no_counters' --debug
Running in optimized mode
######## START QUERY ########
<?xml version="1.0" ?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.8" nmsdk_language="Python" nmsdk_version="5.2">
	<system-get-version/>
</netapp>

######## GOT RESPONSE #######
<?xml version="1.0" ?>
<results xmlns="http://www.netapp.com/filer/admin" status="passed">
	<build-timestamp>1652134304</build-timestamp>
	<is-clustered>true</is-clustered>
	<version>NetApp Release 9.10.1P4: Mon May 09 22:11:44 UTC 2022</version>
	<version-tuple>
		<system-version-tuple>
			<generation>9</generation>
			<major>10</major>
			<minor>1</minor>
		</system-version-tuple>
	</version-tuple>
</results>

######## START QUERY ########
<?xml version="1.0" ?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.8" nmsdk_language="Python" nmsdk_version="5.2">
	<license-list-info/>
</netapp>

######## GOT RESPONSE #######
Error: Unable to parse content of response:
Unable to find API: license-list-info
######## START QUERY ########
<?xml version="1.0" ?>
<netapp xmlns="http://www.netapp.com/filer/admin" version="1.8" nmsdk_language="Python" nmsdk_version="5.2">
	<license-v2-list-info/>
</netapp>

<<<netapp_api_connection>>>
Agent Exception (contact developer): Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
Traceback (most recent call last):
  File "/omd/sites/***/lib/python3/cmk/special_agents/agent_netapp.py", line 424, in __init__
    tree = ET.fromstring(response.content)
  File "src/lxml/etree.pyx", line 3252, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1912, in lxml.etree._parseMemoryDocument
  File "src/lxml/parser.pxi", line 1800, in lxml.etree._parseDoc
  File "src/lxml/parser.pxi", line 1141, in lxml.etree._BaseParser._parseDoc
  File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
  File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
  File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
  File "<string>", line 4
lxml.etree.XMLSyntaxError: Input is not proper UTF-8, indicate encoding !
Bytes: 0xFD 0x17 0x08 0x37, line 4, column 314

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/omd/sites/***/share/check_mk/agents/special/agent_netapp", line 12, in <module>
    sys.exit(main())
  File "/omd/sites/**/lib/python3/cmk/special_agents/agent_netapp.py", line 1743, in main
    licenses = fetch_license_information(args, server)
  File "/omd/sites/***/lib/python3/cmk/special_agents/agent_netapp.py", line 891, in fetch_license_information
    licensev2_info = query(args, server, "license-v2-list-info")
  File "/omd/sites/***/lib/python3/cmk/special_agents/agent_netapp.py", line 674, in query
    response = server.get_response([what])
  File "/omd/sites/***/lib/python3/cmk/special_agents/agent_netapp.py", line 304, in get_response
    netapp_response = NetAppResponse(response, self.debug)
  File "/omd/sites/***/lib/python3/cmk/special_agents/agent_netapp.py", line 426, in __init__
    tree = ET.fromstring(NetAppResponse.INVALID_XML.sub("", response.text))
  File "src/lxml/etree.pyx", line 3252, in lxml.etree.fromstring
  File "src/lxml/parser.pxi", line 1907, in lxml.etree._parseMemoryDocument
ValueError: Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration.
OMD[***]:~$

That look like this problem (2.1.0b5):

Is it a bug from my RAW 2.1.0 ?

Regards.

Hello again,

To follow up on the previous message, I try on older Check_mk server : 2.0.0p16 (CRE)
And it works good. I have 150 metrics.

So we can deduce my manipulations on RAW 2.1.0 are good. So maybe we have a bug on 2.1.0 or my version is corrupted.

Any ideas to fix it ?

Thank you.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.