PDA

View Full Version : [m|ZBX_NOTSUPPORTED] Zabbix 1.6.1


bondbig
13-11-2008, 09:36
Hi!
I've met a problem using zabbix_agentd "UserParameter":
UserParameter=apache.hitspersec,BASE=`date +%d/%b/%Y:%H:%M --date "now -1 minutes"`;HITS=`grep $BASE /var/log/apache2/access_log | wc -l`; echo "scale=1; $HITS / 60.0" | bc
I want to monitor Apache hits/s. When i run this command in OS it works:
ddos-victim2:~ # BASE=`date +%d/%b/%Y:%H:%M --date "now -1 minutes"`;HITS=`grep $BASE /var/log/apache2/access_log | wc -l`; echo "scale=1; $HITS / 60.0" | bc
68.2
but if i try to run agentd, i receive an error:
ddos-victim2:~ # /usr/local/sbin/zabbix_agentd -t apache.hitspersec
apache.hitspersec [m|ZBX_NOTSUPPORTED]
And zabbix_server receives '0' as a result:
http://img239.imageshack.us/img239/3521/chartlb4.png

How can i fix it?

smo
13-11-2008, 09:43
Apache server-status page has hits per sec too, no need for grep.

pierre-hoffmann
13-11-2008, 09:49
Hi!
I've met a problem using zabbix_agentd "UserParameter":
UserParameter=apache.hitspersec,BASE=`date +%d/%b/%Y:%H:%M --date "now -1 minutes"`;HITS=`grep $BASE /var/log/apache2/access_log | wc -l`; echo "scale=1; $HITS / 60.0" | bc
How can i fix it? Put this commands on a shell script ... and call this shell !!!

Regards,

bondbig
13-11-2008, 12:52
thanks for reply.
I tried, it didn't help.
Nevertheless i solved the problem. The problem was that zabbix user had no rights to read apache log.