Hello all:
Here is the first of what I hope to be many scripts that improve and extend the functionality of the Zabbix system, this one is a rather trivial example but I find it useful and hopefully someone else will as well. Here are instructions for installation and useage:
# apachestats Zabbix UserAgent Script
#
# 20070206 [email protected] original version this has only been tested on Zabbix 1.3.2
#
# INSTALLATION AND USAGE:
# (1) This requires mod_status apache module to be installed and configured for access by 127.0.0.1
# in httpd.conf something like:
# LoadModule status_module modules/mod_status.so
# ExtendedStatus On
# <Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# </Location>
#
# (2) Place this script in your Zabbix Scripts path, on RH usually /usr/lib/zabbix/
#
# (3) Place the following UserParameters in your zabbix_agent.conf or zabbix_agentd.conf
# make sure you change the path if necessary
# UserParameter=apache.ttl_accesses,/usr/lib/zabbix/zabbix_apachestats.pl -p ttl_accesses
# UserParameter=apache.ttl_traffic,/usr/lib/zabbix/zabbix_apachestats.pl -p ttl_traffic
# UserParameter=apache.cpu_load,/usr/lib/zabbix/zabbix_apachestats.pl -p cpu_load
# UserParameter=apache.uptime,/usr/lib/zabbix/zabbix_apachestats.pl -p uptime
# UserParameter=apache.req_sec,/usr/lib/zabbix/zabbix_apachestats.pl -p req_sec
# UserParameter=apache.bytes_sec,/usr/lib/zabbix/zabbix_apachestats.pl -p bytes_sec
# UserParameter=apache.bytes_req,/usr/lib/zabbix/zabbix_apachestats.pl -p bytes_req
# UserParameter=apache.busy_workers,/usr/lib/zabbix/zabbix_apachestats.pl -p busy_workers
# UserParameter=apache.idle_workers,/usr/lib/zabbix/zabbix_apachestats.pl -p idle_workers
#
# (4) Import the templates into your zabbix server
#
# (5) for each host, add the template that have apache running
Let me know if you find it useful or find any problems!
/Chris
Here is the first of what I hope to be many scripts that improve and extend the functionality of the Zabbix system, this one is a rather trivial example but I find it useful and hopefully someone else will as well. Here are instructions for installation and useage:
# apachestats Zabbix UserAgent Script
#
# 20070206 [email protected] original version this has only been tested on Zabbix 1.3.2
#
# INSTALLATION AND USAGE:
# (1) This requires mod_status apache module to be installed and configured for access by 127.0.0.1
# in httpd.conf something like:
# LoadModule status_module modules/mod_status.so
# ExtendedStatus On
# <Location /server-status>
# SetHandler server-status
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# </Location>
#
# (2) Place this script in your Zabbix Scripts path, on RH usually /usr/lib/zabbix/
#
# (3) Place the following UserParameters in your zabbix_agent.conf or zabbix_agentd.conf
# make sure you change the path if necessary
# UserParameter=apache.ttl_accesses,/usr/lib/zabbix/zabbix_apachestats.pl -p ttl_accesses
# UserParameter=apache.ttl_traffic,/usr/lib/zabbix/zabbix_apachestats.pl -p ttl_traffic
# UserParameter=apache.cpu_load,/usr/lib/zabbix/zabbix_apachestats.pl -p cpu_load
# UserParameter=apache.uptime,/usr/lib/zabbix/zabbix_apachestats.pl -p uptime
# UserParameter=apache.req_sec,/usr/lib/zabbix/zabbix_apachestats.pl -p req_sec
# UserParameter=apache.bytes_sec,/usr/lib/zabbix/zabbix_apachestats.pl -p bytes_sec
# UserParameter=apache.bytes_req,/usr/lib/zabbix/zabbix_apachestats.pl -p bytes_req
# UserParameter=apache.busy_workers,/usr/lib/zabbix/zabbix_apachestats.pl -p busy_workers
# UserParameter=apache.idle_workers,/usr/lib/zabbix/zabbix_apachestats.pl -p idle_workers
#
# (4) Import the templates into your zabbix server
#
# (5) for each host, add the template that have apache running
Let me know if you find it useful or find any problems!
/Chris
Comment