CentOS 7
Sponsored Link

MRTG : Get httpd Processes2015/06/16

Configure MRTG to display httpd Processes count.
[1] Configure MRTG.
[root@dlp ~]#
vi /etc/snmp/snmpd.conf
# near line 205: add

proc httpd
[root@dlp ~]#
systemctl restart snmpd

[root@dlp ~]#
vi /etc/mrtg/mrtg.cfg
# add follows to the end (replace the "Serverworld" to your comunity name)

Target[httpd]: .
MaxBytes[httpd]: 50
Unscaled[httpd]: dwmy
Options[httpd]: gauge, growright, nopercent
YLegend[httpd]: Count
ShortLegend[httpd]: proc(s).
Title[httpd]: Httpd Processes
LegendI[httpd]: Processes
Legend1[httpd]: Httpd Processes
PageTop[httpd]: <h1>Httpd Processes</h1>

# execute mrtg 3 times (display warnings until 3 times)

[root@dlp ~]#
for (( i=1 ; i <= 3 ; i++ )); do env LANG=C mrtg /etc/mrtg/mrtg.cfg; done

2015-06-16 19:34:41, Rateup WARNING: /usr/bin/rateup could not read the primary log file for httpd
2015-06-16 19:34:41, Rateup WARNING: /usr/bin/rateup The backup log file for httpd was invalid as well
2015-06-16 19:34:41, Rateup WARNING: /usr/bin/rateup Can't rename httpd.log to httpd.old updating log file
# generate index file

[root@dlp ~]#
indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html
[2] Access to the "http://(MRTG hostname or IP address)/mrtg/" from a client with HTTP, then it's possible to see Httpd process count.
Matched Content