- 論壇徽章:
- 0
|
Apache.jpg (57.44 KB, 下載次數(shù): 67)
下載附件
2013-05-16 16:28 上傳
Apache配置mod_status
要啟用 server-status 必須首先加載 server-status 模塊,你可以用以下命令查看是否已經(jīng)加載了模塊:
/usr/local/apache/bin/httpd -l | grep mod_status.c
如果沒有安裝這個模塊,那么就需要您重新編譯這個模塊了,進入 apache 的源碼目錄:
cd /usr/local/src/httpd-2.2.14/modules/generators
/usr/local/apache/bin/apxs -cia mod_status.c
這樣模塊就編譯好了。查看一下 apache 的配置文件里已經(jīng)增加了以下代碼:
LoadModule status_module modules/mod_status.so
啟動 server-status 功能,在 apache 的配置文件中增加一下配置代碼:
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from IP
</Location>
請注意,您需要將OSA的IP加入到Allow from訪問列表,確保能正確獲取到監(jiān)控數(shù)據(jù)。
打開查看的話就使用 http://IP/server-status 來訪問,如果需要自動更新, 可以用 http://IP/server-status?refresh=N , N是更新時間,默認是秒。
Apache自定義告警指標
Apache并發(fā)連接數(shù)(單位:數(shù)值)
Apache吞吐量(單位: reqs/s)
|
|