Ad Widget

Collapse

PHP-FPM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rperez
    Junior Member
    • Nov 2018
    • 4

    #1

    PHP-FPM

    Hi Guys,

    Kindly help. I need to monitor php-fpm on my web server. I need to get its status. running / stop. Im running my server on centos 7 with zabbix 4.0. If there is any tutorials it will be a big help guys.

    Thanks.
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome to Zabbix forums!

    Here is a trigger I am using for this purpose.
    Code:
    {Template Nginx for Zabbix:proc.num[,,,php-fpm:].last()}=0

    Comment

    • kloczek
      Senior Member
      • Jun 2006
      • 1771

      #3
      Originally posted by rperez
      Hi Guys,

      Kindly help. I need to monitor php-fpm on my web server. I need to get its status. running / stop. Im running my server on centos 7 with zabbix 4.0. If there is any tutorials it will be a big help guys.

      Thanks.
      https://github.com/kloczek/zabbix-te...vice%20php-fpm
      Just in case .. I'm using only nginx so this is why on the page are only details about nginx cfg. If someone has similar details about apache cfg I can add those details to the page and template description as well.
      Last edited by kloczek; 28-11-2018, 14:43.
      http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
      https://kloczek.wordpress.com/
      zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
      My zabbix templates https://github.com/kloczek/zabbix-templates

      Comment

      • rperez
        Junior Member
        • Nov 2018
        • 4

        #4
        thanks i think this is what i need. Could i download the template?

        Comment

        • rperez
          Junior Member
          • Nov 2018
          • 4

          #5
          Good Day.

          Hi Sir kloczek, i tried to copy the template and use it by adding to templates. I can't understand which of the items will indicate if the service is up and running.

          In addition can you please explain how this is suppose to happen.

          Thank you very much. im looking forward to implement zabbix as our corporate monitoring tool.
          Last edited by rperez; 29-11-2018, 10:19.

          Comment

          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #6
            Do not have now access to the zabbix with imported this template so will grab fragments from raw xml file:

            Code:
              <triggers>
                <trigger>
                  <expression>{Service php-fpm:proc.num[{$SVC_PHP_FPM_PROC}].last()}=0</expression>
                  <recovery_mode>0</recovery_mode>
                  <recovery_expression/>
                  <name>PROC::php-fpm is DOWN</name>
                  <correlation_mode>0</correlation_mode>
            Here is begin of the trigger definition which bases on number of running php-fpm processes to raise alarm that php-fpm service is down. if there is 0 such processes alarm activated.
            http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
            https://kloczek.wordpress.com/
            zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
            My zabbix templates https://github.com/kloczek/zabbix-templates

            Comment


            • rperez
              rperez commented
              Editing a comment
              Hi Sir,
              Im sorry if im getting your point so slow but while i try to create a template > application > item > triggers i have encountered this.

              Incorrect item key "proc.num[{$SVC_PHP_FPM_PROC}]" provided for trigger expression on "Template App PHP-FPM Service".
          • rperez
            Junior Member
            • Nov 2018
            • 4

            #7
            Hi Sir,

            while still checking i found myself in different error message. Kindly see screenshot for your reference.

            Comment

            • R0m
              Junior Member
              • Jan 2020
              • 2

              #8
              Hello! I would like to suggest this open-source project https://github.com/rvalitov/zabbix-php-fpm
              This is a template for Zabbix 4.0+:
              • Provides auto discovery of PHP-FPM pools (LLD)
              • Detects pools that listen via socket and via TCP
              • Supported types of PHP process manager:
                • dynamic
                • static
                • ondemand. Such pools are invisible (undiscoverable) if they are not active because of their nature, i.e. when no PHP-FPM processes related to the pools spawned during the discovery process of Zabbix agent. After a pool has been discovered for the first time, it becomes permanently visible for Zabbix. Regular checks performed by Zabbix agent require at least one active PHP-FPM process that can report the status, and if such process does not exist, then it will be spawned. As a result, Zabbix agent will always report that there's at least one active PHP-FPM process for the pool. Besides, there's a chance that such behaviour may have a negative impact on the pool's performance and you may consider changing to another type of process manager, for example, dynamic.
              • Supports multiple PHP versions, i.e. you can use PHP 7.2 and PHP 7.3 on the same server and we will detect them all
              • Easy configuration
              • Supports ISPConfig
              • Script is in pure bash: no need to install Perl, Go or other languages.
              • Provides all important items, graphs, triggers and screens.
              I hope this helps!

              Comment

              Working...