설정

설정

PHP-FPM 플러그인을 설정했습니다

세 개의 차트를 제외한 모든 차트가 작동합니다.

  • PHP5-FPM 평균 프로세스 크기

  • PHP5-FPM 메모리 사용량

  • PHP5-FPM 프로세스

설정

/etc/munin/plugin-conf.d/munin-node

[phpfpm_*]
env.url http://127.0.0.1/status
env.ports 80
env.phpbin php5-fpm
env.phppool www

명령줄

apt-get install libwww-perl
cd /usr/share/munin/plugins
git clone git://github.com/tjstein/php5-fpm-munin-plugins.git
chmod +x php5-fpm-munin-plugins/phpfpm_*
ln -s /usr/share/munin/plugins/php5-fpm-munin-plugins/phpfpm_average /etc/munin/plugins/phpfpm_average
ln -s /usr/share/munin/plugins/php5-fpm-munin-plugins/phpfpm_connections /etc/munin/plugins/phpfpm_connections
ln -s /usr/share/munin/plugins/php5-fpm-munin-plugins/phpfpm_memory /etc/munin/plugins/phpfpm_memory
ln -s /usr/share/munin/plugins/php5-fpm-munin-plugins/phpfpm_status /etc/munin/plugins/phpfpm_status
ln -s /usr/share/munin/plugins/php5-fpm-munin-plugins/phpfpm_processes /etc/munin/plugins/phpfpm_processes
/etc/init.d/munin-node restart

/var/ini/php/pools/www-php.conf

pm.status_path = /status

nginx.conf

server {
    listen  80;
    server_name  127.0.0.1;
    
    location ~ ^/(status|ping)$ {
        include  fastcgi_params;
        fastcgi_pass  php;
        fastcgi_param  SCRIPT_FILENAME  $fastcgi_script_name;
        allow  127.0.0.1;
        deny  all;
    }
}

시험

cd /etc/munin/plugins && munin-run phpfpm_status

관련 정보