1
0
mirror of https://github.com/ranl/monitor-utils.git synced 2024-11-14 03:53:42 +01:00
monitor-utils/zabbix/user_param/apache.conf
2013-12-02 15:24:24 +02:00

22 lines
901 B
ApacheConf

####################
### Apache HTTPD ###
####################
# get data from mod_status
# $1 - Variable name
UserParameter=apache.server-status[*],data=$(wget --no-check-certificate http://localhost/server-status?auto -O - -q --timeout=3 -t 1 | grep ^"$1:" | awk '{print $NF}') ; [ "$data" == "" ] && data=0 ; echo $data | sed 's/^\./0./'
# count a scoreboard status from mod_status
# $1 :
# "_" Waiting for Connection
# "S" Starting up
# "R" Reading Request
# "W" Sending Reply
# "K" Keepalive (read)
# "D" DNS Lookup
# "C" Closing connection
# "L" Logging
# "G" Gracefully finishing,
# "I" Idle cleanup of worker
# "." Open slot with no current process
UserParameter=apache.scoreboard[*],wget --no-check-certificate http://localhost/server-status?auto -O - -q --timeout=3 -t 1 | grep ^Scoreboard: | awk '{print $NF}' | grep -o '\'$1 | wc -l