Hi!
I've met a problem using zabbix_agentd "UserParameter":
I want to monitor Apache hits/s. When i run this command in OS it works:
but if i try to run agentd, i receive an error:
And zabbix_server receives '0' as a result:

How can i fix it?
I've met a problem using zabbix_agentd "UserParameter":
Code:
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
Code:
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
Code:
ddos-victim2:~ # /usr/local/sbin/zabbix_agentd -t apache.hitspersec apache.hitspersec [m|ZBX_NOTSUPPORTED]

How can i fix it?
Comment