Hello everyone!
This morning I decided to install this Checkmk Exchange
But I am facing a few problem.
I am running a Ubuntu20.04 cmk server and I am under the version 2.0.0p4.
I added the check on the host I want to monitor under
/usr/lib/check_mk_agent/plugins/php_fpm_pools
I also added the config under
cat /etc/check_mk/php_fpm_pools.cfg
php_fpm = [
{“socket”: “/var/run/php/php7.3-fpm.sock”, “path”: “/status”}
]
Under ubuntu20.04 it seems that by default there is no python but there is python3 so I had to modify the start of the script to say
#!/usr/bin/env python3
Executing the file now gives me a
Traceback (most recent call last):
File “./php_fpm_pools”, line 140, in
execfile(config_file)
NameError: name ‘execfile’ is not defined
So I modified line 140 from
execfile(config_file)
to
exec(open(“/etc/check_mk/php_fpm_pools.cfg”).read())
I now get the desired output on the server be it from the script directly of from the check_mk_agent
<<<php_fpm_pools>>>
www dynamic start_time 1636382097
www dynamic start_since 7680
www dynamic accepted_conn 14413
www dynamic listen_queue 0
www dynamic max_listen_queue 0
www dynamic listen_queue_len 0
www dynamic idle_processes 149
www dynamic active_processes 1
www dynamic total_processes 150
www dynamic max_active_processes 200
www dynamic max_children_reached 1
www dynamic slow_requests 0
Now when I go to check_mk under wato and rescan the host. I don’t see anything php-fpm related appear. And this is where I am stuck. If someone had the chance to play with this.
Thanks in advance
