In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "how to use zabbix to monitor the php environment". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Vim / usr/local/php/etc/php-fpm.conf add pm.status_path = / phpfpmstatusvim / usr/local/nginx/conf/nginx.conf add server {listen 80; server_name localhost; location ~ ^ / (phpfpmstatus) ${include fastcgi_params; fastcgi_pass 127.0.1 pm.status_path 9000; fastcgi_param SCRIPT_FILENAME $fastcgi_script_name }} vim / usr/local/zabbix/etc/zabbix_agentd.confUnsafeUserParameters=1UserParameter=phpfpm.status.pool,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status poolUserParameter=phpfpm.status.process.manager,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status process_managerUserParameter=phpfpm.status.start.since,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status start_sinceUserParameter=phpfpm.status.accepted.conn,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status accepted_connUserParameter=phpfpm.status.listen.queue / usr/local/zabbix/etc/scripts/monitor_phpfpm_status listen_queueUserParameter=phpfpm.status.max.listen.queue,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status max_listen_queueUserParameter=phpfpm.status.listen.queue.len,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status listen_queue_lenUserParameter=phpfpm.status.idle.processes,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status idle_processesUserParameter=phpfpm.status.active.processes / usr/local/zabbix/etc/scripts/monitor_phpfpm_status active_processesUserParameter=phpfpm.status.total.processes,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status total_processesUserParameter=phpfpm.status.max.active.processes,/usr/local/zabbix/etc/scripts/monitor_phpfpm_status max_active_processesUserParameter=phpfpm.status.max.children.reached / usr/local/zabbix/etc/scripts/monitor_phpfpm_status max_children_reachedvim / usr/local/zabbix/etc/scripts/monitor_phpfpm_status #! / bin/bashsource / etc/bashrc > / dev/null 2 > & 1source / etc/profile > / dev/null 2 > & 1LOG_FILE=/tmp/phpfpmstatus.logcurl http://127.0.0.1/phpfpmstatus > ${LOG_FILE} pool () {awk'/ pool/ {print $NF}'${LOG_FILE} } process_manager () {awk'/ process manager/ {print $NF}'${LOG_FILE}} start_since () {awk'/ start since:/ {print $NF}'${LOG_FILE}} accepted_conn () {awk'/ accepted conn:/ {print $NF}'${LOG_FILE}} listen_queue () {awk'/ listen queue:/ {print $NF}'$ {LOG_FILE}} max_listen_queue () {awk'/ max listen queue:/ {print $NF}'${LOG_FILE}} listen_queue_len () {awk'/ listen queue len:/ {print $NF}'${LOG_FILE}} idle_processes () {awk'/ idle processes:/ {print $NF}'${LOG_FILE} active_processes () {awk'/ active processes:/ {print $NF}'${ LOG_FILE} total_processes () {awk'/ total processes:/ {print $NF}'${LOG_FILE}} max_active_processes () {awk'/ max active processes:/ {print $NF}'${LOG_FILE}} max_children_reached () {awk'/ max children reached:/ {print $NF}'${LOG_FILE}} case "$1 inpool) pool ; process_manager) process_manager;;start_since) start_since;;accepted_conn) accepted_conn;;listen_queue) listen_queue;;max_listen_queue) listen_queue_len;;idle_processes) idle_processes;;active_processes) active_processes;;total_processes) total_processes;;max_active_processes) max_active_processes;;max_children_reached) max_children_reached *) echo "Usage: $0 {pool | process_manager | start_since | accepted_conn | listen_queue | max_listen_queue | listen_queue_len | idle_processes | active_processes | total_processes | max_active_processes | max_children_reached}" esacchmod 755 / usr/local/zabbix/etc/scripts/monitor_phpfpm_status finally restart nginx php-fpm and import php-fpm module, which is associated with the corresponding host.
This is the end of "how to use zabbix to monitor the php environment". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.