CheckMK HPE StoreOnce API use Hostname instead of the IP address during autodiscovery

CMK version: 2.2.0
OS version: Debian 11

When I try to add an HPE StoreOnce host, which uses the “HPE StoreOnce via REST API 4.x” integration, during autodiscovery, it fails because it uses the hostname instead of the IP.
I don’t see any settings to change that, and I don’t want to put the IP or the FQDN as the hostname.
An idea ?

The host properties :

The process :

cmk        23295  0.7  2.5 260672 208544 ?       Ss   15:59   0:00 /usr/sbin/apache2 -f /omd/sites/cmk/etc/apache/apache.conf
cmk        23324 83.0  1.2 108416 97976 ?        S    15:59   0:01  \_ python3 /omd/sites/cmk/bin/check_mk --automation service-discovery-preview storeonce1
cmk        23394  0.0  0.0   2492   576 ?        S    16:00   0:00      \_ /bin/sh -c /omd/sites/cmk/share/check_mk/agents/special/agent_storeonce4x user password  storeonce1
cmk        23395  0.0  0.2  28316 18780 ?        R    16:00   0:00          \_ python3 /omd/sites/cmk/share/check_mk/agents/special/agent_storeonce4x user password storeonce1

Quick solution.
Copy the file “~/share/check_mk/checks/agent_storeonce4x” to “~/local/share/check_mk/checks/agent_storeonce4x”
edit line 15 from



        ipaddress or hostname,

After this check with cmk -D storeonce1 if you see now in the agent command line the IP.

1 Like

It works ! Thanks.
Do you know if it will persist after update?
Given where it is, I guess so, but I prefer to ask the question :smiley:

If the file is inside “~/local/…” then it will be update safe.

1 Like

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.