Ad Widget

Collapse

PHP-FPM and Apache by zabbix agent1 - No process running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RedNano
    Junior Member
    • Apr 2017
    • 7

    #1

    PHP-FPM and Apache by zabbix agent1 - No process running

    For some reason, there's a server on which apache and php-fpm are serving two sites (2 virtual hosts on apache), it's gathering apache and php-fpm data but the process number is always zero.
    I've checked via console and there are indeed, more than one service running.

    curl -L 127.0.0.1/status
    curl -L 127.0.0.1/server-status
    curl -L 127.0.0.1/ping

    ps - aux shows apache2 and php-fpm processess...


    All work from console, but zabbix detects no process running... any help?

    EDIT: Maybe it's worth mentioning it's ubuntu 16.04 and the client is the one that comes with the repos..... maybe too old client or some kind of incompatibility issues? It does not detect my filesystems either
    Last edited by RedNano; 03-12-2020, 14:45.
  • RedNano
    Junior Member
    • Apr 2017
    • 7

    #2
    This is also happenning on a newer ubuntu distro... I don't know why it does not detect any apache or php-fpm processess when the other metrics are getting logged..... canyone can help?

    Comment

    • tim.mooney
      Senior Member
      • Dec 2012
      • 1427

      #3
      I haven't used that particular template, is it this one: https://git.zabbix.com/projects/ZBX/.../php-fpm_agent

      Originally posted by RedNano
      curl -L 127.0.0.1/status
      curl -L 127.0.0.1/server-status
      curl -L 127.0.0.1/ping
      The instructions seem to assume nginx, but if your 'curl' commands are working, then you've apparently put the correct Apache httpd proxy entries in place, to proxy the /status and /ping URLs to the same location for the pool?

      Reviewing the template macros, it looks like the template assumes the process name will be 'php-fpm'. Is that the actually process name that Ubuntu is using, or does it name it something like 'php7-fpm' or something else that doesn't match 'php-fpm' exactly? If it's not what the template assumes by default, you have to adjust the macro per-host to whatever the appropriate value is.

      Comment

      • demonspork
        Junior Member
        • Mar 2021
        • 2

        #4
        Basically it's because of this: https://www.zabbix.com/documentation..._mem_num_notes
        php-fpm's actual process name is php-fpm7.1 for php 7.1 and so on. The template uses php-fpm for the $PHP-FPM.PROCESS_NAME which isn't enough. The methods in that article would have to be implemented, but in the meantime simply changing the macro per host to match the installed PHP version is a starting point.

        Comment

        Working...