Ad Widget

Collapse

[m|ZBX_NOTSUPPORTED] Zabbix 1.6.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bondbig
    Member
    • Jul 2008
    • 68

    #1

    [m|ZBX_NOTSUPPORTED] Zabbix 1.6.1

    Hi!
    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
    I want to monitor Apache hits/s. When i run this command in OS it works:
    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
    but if i try to run agentd, i receive an error:
    Code:
    ddos-victim2:~ # /usr/local/sbin/zabbix_agentd -t apache.hitspersec
    apache.hitspersec                             [m|ZBX_NOTSUPPORTED]
    And zabbix_server receives '0' as a result:


    How can i fix it?
  • smo
    Junior Member
    • Oct 2007
    • 17

    #2
    Apache server-status page has hits per sec too, no need for grep.

    Comment

    • pierre-hoffmann
      Senior Member
      • Jan 2008
      • 133

      #3
      Originally posted by bondbig
      Hi!
      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
      How can i fix it?
      Put this commands on a shell script ... and call this shell !!!

      Regards,
      P.Hoffmann
      System & Network Admin.
      __________________________
      Zabbix version 1.8.1
      Hosts monitored 1300
      OS Novell SLES 10 SP2
      __________________________

      Comment

      • bondbig
        Member
        • Jul 2008
        • 68

        #4
        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.

        Comment

        Working...