Check_MK_Agent.hpux (HPUX)

CMK version: 2.0.0p17 (CRE)
OS version: Centos7

Hi,

I would like to install the check_mk_agent on HPUX B.11.31, i see these agents on Agents - Other Operating Systems:

Regarding the
image

Can some one tell me if i can use this ? and the process to install the agent?

Thank you!!

:christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree: :christmas_tree:

Perhaps not the “right way”, but I setup the host with no agent and set up a rule for “Individual program call instead of agent access”, with an ssh call where the end user (via key in authorized_keys) executes the check_mk_agent.hpux program.

2 Likes

Hi @cjcox

Thank you for the information. could you please show me your configuration ?

And thank you.

Hi @Gustavo,

Were you able to go around setting up check_mk_agent service on your HP-UX node?
I too am struggling to setup one.

I did follow the discussion at - [Check_mk (english)] Installing check_mk agent on HPUX Unix - #7 by Marcel

But, I am unable to discover any services on the HP-UX node, even when I am able to reach port 6556.

Regards,
Abhijit

Hi, yes

I create a SOP for the steps that i use, but with the hpux agent you can do it.

Process/Steps:

Please follow the following steps to install the CMK Agent on OS: HP-UX

First, copy the file check_mk_agent.hpux to:

/usr/bin/ and rename it to check_mk_agent

After that, change the current permission to:

chmod 754 /usr/bin/check_mk_agent

and

chown root:sys /usr/bin/check_mk_agent

Corroborate these two directories on the check_mk_agent, and created if needed and give the current permissions:

export MK_LIBDIR="/usr/lib/check_mk_agent"
chmod 755 /usr/lib/check_mk_agent
chown root:sys /usr/lib/check_mk_agent

export MK_CONFDIR="/etc/check_mk"
chmod 755 /etc/check_mk
chown root:sys /etc/check_mk

To configure inetd, edit the file /etc/inetd.conf adding these lines at the bottom of the file:

#Check_mk
check_mk_agent stream tcp nowait root /usr/bin/check_mk_agent check_mk_agent

Edit the file /etc/services and add this line to listen on TCP port at the bottom of the file:

check_mk_agent 6556/tcp #check_mk agent

Finally, restart Inetd :

/usr/sbin/inetd -c

Test

To corroborate that the agent is already working:

telnet x.x.x.x 6556

Thanks so much for sharing the steps.

Now, when “telnet x.x.x.x 6556” to hp-ux node works fine from cmk server, cmk discovery fails with below error message and accordingly service discovery in checkmk portal times out with “API Error:Your request timed out after 110 seconds.”:

OMD[checkmk]:~$ cmk -d hp-ux01
ERROR [special_vsphere]: Agent exited with code 1: HTTPSConnectionPool(host=‘x.x.x.x’, port=443): Max retries exceeded with url: /sdk (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fea0d691940>: Failed to establish a new connection: [Errno 110] Connection timed out’))
Traceback (most recent call last):
File “/omd/sites/checkmk/lib/python3/urllib3/connection.py”, line 174, in _new_conn
conn = connection.create_connection(
File “/omd/sites/checkmk/lib/python3/urllib3/util/connection.py”, line 96, in create_connection
raise err
File “/omd/sites/checkmk/lib/python3/urllib3/util/connection.py”, line 86, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/omd/sites/checkmk/lib/python3/urllib3/connectionpool.py”, line 699, in urlopen
httplib_response = self._make_request(
File “/omd/sites/checkmk/lib/python3/urllib3/connectionpool.py”, line 382, in _make_request
self._validate_conn(conn)
File “/omd/sites/checkmk/lib/python3/urllib3/connectionpool.py”, line 1010, in _validate_conn
conn.connect()
File “/omd/sites/checkmk/lib/python3/urllib3/connection.py”, line 358, in connect
conn = self._new_conn()
File “/omd/sites/checkmk/lib/python3/urllib3/connection.py”, line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fea0d691940>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/omd/sites/checkmk/lib/python3/requests/adapters.py”, line 439, in send
resp = conn.urlopen(
File “/omd/sites/checkmk/lib/python3/urllib3/connectionpool.py”, line 755, in urlopen
retries = retries.increment(
File “/omd/sites/checkmk/lib/python3/urllib3/util/retry.py”, line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘x.x.x.x’, port=443): Max retries exceeded with url: /sdk (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fea0d691940>: Failed to establish a new connection: [Errno 110] Connection timed out’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/omd/sites/checkmk/lib/python3/cmk/special_agents/agent_vsphere.py”, line 1913, in main
esx_connection = ESXConnection(opt.host_address, opt.port, opt)
File “/omd/sites/checkmk/lib/python3/cmk/special_agents/agent_vsphere.py”, line 1081, in init
self.system_info = self._fetch_systeminfo()
File “/omd/sites/checkmk/lib/python3/cmk/special_agents/agent_vsphere.py”, line 1103, in _fetch_systeminfo
response = self._session.postsoap(SoapTemplates.SYSTEMINFO)
File “/omd/sites/checkmk/lib/python3/cmk/special_agents/agent_vsphere.py”, line 1048, in postsoap
return super(ESXSession, self).post(self._post_url, data=soapdata, verify=self.verify)
File “/omd/sites/checkmk/lib/python3/requests/sessions.py”, line 590, in post
return self.request(‘POST’, url, data=data, json=json, **kwargs)
File “/omd/sites/checkmk/lib/python3/requests/sessions.py”, line 542, in request
resp = self.send(prep, **send_kwargs)
File “/omd/sites/checkmk/lib/python3/requests/sessions.py”, line 655, in send
r = adapter.send(request, **kwargs)
File “/omd/sites/checkmk/lib/python3/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘x.x.x.x’, port=443): Max retries exceeded with url: /sdk (Caused by NewConnectionError(‘<urllib3.connection.HTTPSConnection object at 0x7fea0d691940>: Failed to establish a new connection: [Errno 110] Connection timed out’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/omd/sites/checkmk/share/check_mk/agents/special/agent_vsphere”, line 12, in
sys.exit(main())
File “/omd/sites/checkmk/lib/python3/cmk/special_agents/agent_vsphere.py”, line 1927, in main
return 0 if opt.agent else 1
AttributeError: ‘Namespace’ object has no attribute ‘agent’(!!)
OMD[checkmk]:~$

Sorry @abhiderle

I don’t know why you are seeing that error message, in my case works fine, both cases, telnet and discovery.

If you have another HPUX maybe you can try the same configuration and then see if it’s working well and reply on the first HP-UX.

I’m not an expert in this OS but maybe you can check if you can configure an SNMP configuration without agent and see what happens, but as I said, I’m not an expert, I don’t know to be honest if a SNMP config can be implemented

Please let me know if you can solved and how

Good wishes!

You have the vSphere special agent enabled for that host, which obviously makes no sense on HPUX. That’s what is causing the error.

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.