Мы уже рассматривали метод мониторинга веб-сервера NGinx на CentOS, но мунин умеет нативно снимать статистику и с апача на фряхе:
# munin-node-configure --suggest | grep apache apache_accesses | no | no [apache server-status not found. check if mod_status is enabled] apache_processes | no | no [apache server-status not found. check if mod_status is enabled] apache_volume | no | no [apache server-status not found. check if mod_status is enabled]
Исправляем:
в /usr/local/etc/apache22/httpd.conf добавляем
<Location /server-status/> SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 </Location>
Так же необходимо раскоментировать строку
ExtendedStatus On
Проверяем конфиг:
# apachectl configtest Performing sanity check on apache22 configuration: Syntax OK # apachectl graceful Performing sanity check on apache22 configuration: Syntax OK Performing a graceful restart
Снова смотрим в мунин:
# munin-node-configure --suggest | grep apache apache_accesses | no | yes apache_processes | no | yes apache_volume | no | yes
Отлично, апач завёлся. Добавляем
# munin-node-configure --shell | grep apache | sh -x + ln -s /usr/local/share/munin/plugins/apache_accesses /usr/local/etc/munin/plugins/apache_accesses + ln -s /usr/local/share/munin/plugins/apache_processes /usr/local/etc/munin/plugins/apache_processes + ln -s /usr/local/share/munin/plugins/apache_volume /usr/local/etc/munin/plugins/apache_volume
Перезапускаем ноду и проверяем доступность плагинов
# service munin-node restart Stopping munin_node. Waiting for PIDS: 91884. Starting munin_node. # telnet localhost 4949 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. # munin node at mail.tradenark.com.ua list apache_accesses apache_processes apache_volume ... quit Connection closed by foreign host.