rvalitov / zabbix-php-fpm

PHP-FPM status monitoring template for Zabbix with auto discovery (LLD), support for multiple pools and ISPConfig
GNU General Public License v3.0
69 stars 20 forks source link

Problems to retrieve php-fpm data #34

Closed paydaycay closed 4 years ago

paydaycay commented 4 years ago

Hi, I succeeded to install everything thanks to your awesome explanations in the Wiki.

Unfortunatly, I can't retrieve a lot of php-fpm data like php-fpm.cpu, php-fpm.max_active_processes, etc..

If I try to run it with zabbix_get I can see it's an unsupported item key.

If we take a look in the userparameter_php_fpm.conf, we can see that there isn't any UserParameter for all theses commands.

So, how do you make it work ? Did I miss something ?

rvalitov commented 4 years ago

Parameters like CPU usage is retrieved using standard built-in native functions of Zabbix. That's why there's no need to specify them inside UserParameter. What version of Zabbix agent and OS do you use? Do you use it in some special potentially limited environment like Raspberry PI?

paydaycay commented 4 years ago

Oops sorry, php-fpm.cpu works but I can't get a lot of other values (php-fpm.slow_requests, php-fpm.active_processes, php-fpm.accepted_conn, php-fpm.idle_processes, php-fpm.listen_queue, etc...). Zabbix agent version is 4.4.9 and OS is Ubuntu 16.04. I don't use any limited environment.

rvalitov commented 4 years ago

Did you test what data actually is reported by PHP? Can you open the status page from the server?

paydaycay commented 4 years ago

Yes here is what I retrieve from status page : curl -L 127.0.0.1/php-fpm-status pool: www process manager: dynamic start time: 18/Jun/2020:02:00:13 +0200 start since: 23873 accepted conn: 17289 listen queue: 0 max listen queue: 0 listen queue len: 0 idle processes: 2 active processes: 1 total processes: 3 max active processes: 4 max children reached: 0 slow requests: 0

What I retrieve from zabbix_get : zabbix_get -s IP_HOST_FPM -k php-fpm.active_processes[/run/php/php7.2-fpm.sock] ZBX_NOTSUPPORTED: Unsupported item key.

Here what I have in Zabbix for my pool :

image

And for PHP-FPM :

image

rvalitov commented 4 years ago

Thank you for your info! I will come back to you soon.

paydaycay commented 4 years ago

ok @rvalitov Thank you for your help :)

rvalitov commented 4 years ago

I published a new release, can you test it please? You need to update the file userparameter_php_fpm.conf. There was a problem with sudo access rights to the status script #32. I also updated the the Wiki, see section https://github.com/rvalitov/zabbix-php-fpm/wiki/Installation#13-root-privileges Please follow the instructions there. Thank you!

rvalitov commented 4 years ago

/remind me this issue in 10 days

reminders[bot] commented 4 years ago

@rvalitov set a reminder for Jul 11th 2020

reminders[bot] commented 4 years ago

:wave: @rvalitov, this issue