Ad Widget

Collapse

UserParameter help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mozzi
    Junior Member
    • Aug 2007
    • 27

    #1

    UserParameter help

    Heya all

    I adressed this in another thread but I am really having a problem here.
    @ the bottom of zabbix_agentd.conf and zabbix_agent.conf you see this
    #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
    as 1 of the checks.

    If I enable this how do I get to the data?
    I want to put my own stuff in there and I can't find much in the documentation on this.

    Mozzi
  • gryphius
    Member
    • Aug 2007
    • 30

    #2
    Create an item for that host in your zabbix gui with the same key same as in the zabbix_agentd.conf, make sure you choose the correct datatype. Then you should be able to see the data.

    Comment

    • mozzi
      Junior Member
      • Aug 2007
      • 27

      #3
      UserParameter

      Heya

      Still no luck.
      I have this in my agentd.conf.
      UserParameter=barracuda.latency,/usr/bin/curl -s http://192.168.69.25:8000/cgi-bin/stats.cgi | egrep -e "latency" | sed s/[^0-9]//g

      Running it manually as user root and user zabbix gives me the correct answer.
      root@mozzi:/etc/zabbix# zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf -t barracuda.latency
      barracuda.latency [t|2]

      Yet going to latest data the graph shows me [no data].
      I created the item for my host with the key barracuda.latency and type of information Numeric (integer 64bit).
      When I klick on the select button for key, it doesn't show up there.
      I used zabbix agent as type.

      I don't see anything in the logs either.

      Mozzi

      Comment

      • gryphius
        Member
        • Aug 2007
        • 30

        #4
        When I klick on the select button for key, it doesn't show up there.
        I think that's normal. The UserParameters don't show up in the popup, just write them in manually.

        What does
        Code:
        zabbix_get -s<ip of your agent> -k barracuda.latency
        return? (When you run it from the zabbix server)

        If this returns ZBX_NOTSUPPORTED, then something wrong on the agent side, try setting the agent logs to debug level to find out.

        If this returns a value then it's a problem in the gui configuration (wrong key, wrong datatype, item disabled on that particular host, ...)

        Comment

        • mozzi
          Junior Member
          • Aug 2007
          • 27

          #5
          zabbix_get

          Heya dude

          zabbix@mozzi:~$ /usr/sbin/zabbix_get -s127.0.0.1 -k barracuda.latency
          3
          zabbix@mozzi:~$

          Noooooooooooooooooooo!!
          So it seems to be my problem.
          Okay I'll look again

          Mozzi

          Comment

          • gryphius
            Member
            • Aug 2007
            • 30

            #6
            Go to the configuration->items tab, select the host(not the template!), then check what the barracuda item displays. Sometimes those items get disabled while playing around(because the agend returns ZBX_NOTSUPPORTED for any reason) and then not enabled automatically when you fixed your errors.

            Comment

            • mozzi
              Junior Member
              • Aug 2007
              • 27

              #7
              [Solved] UserParameter

              Okay

              The trick is to not create the item for the remote host but the host you are running the UserParameter on! In this case the zabbix server.
              This will solve your problem, logical actually, but took me a couple of days :-)

              Mozzi

              Comment

              Working...