서버/리눅스

collectd-apache 설치하기 - CentOS

사악신 2013. 5. 2. 19:32


#yum install collectd-apache


yum 으로 모듈을 설치한 후, 설정 파일(/etc/collectd.d/apache.conf)을 수정한다.


LoadPlugin apache

<Plugin apache>

        URL "http://localhost/server-status?auto"

#       User "www-user"

#       Password "secret"

#       CACert "/etc/ssl/ca.crt"

</Plugin>


그리고 아파치 설정파일(httpd.conf)의 server-status 부분을 다음과 같이 수정한다.


#

# Allow server status reports generated by mod_status,

# with the URL of http://servername/server-status

# Change the ".example.com" to match your domain to enable.

#

<Location /server-status>

    SetHandler server-status

    Order deny,allow

    Deny from all

    Allow from 127.0.0.1

</Location>


아파치와 collectd 데몬을 재실행한다. 아래와 같이 apache 항목이 추가되고 그래프가 출력되는지 확인한다.



반응형