Ad Widget

Collapse

httping support

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naim
    Junior Member
    • Jun 2006
    • 13

    #1

    httping support

    httping can measure time for HEAD or GET http requests, its like measuring how fast browsing experience is.I would very much like to see this supported by zabbix agent.
    Please do suggest alternatives if you know any.
  • carl
    Junior Member
    • Aug 2006
    • 28

    #2
    Maybe you could create a script to do the httping and then have zabbix retrieve the result/call the script and do it that way. I'd see that as a better way to implement it into zabbix, maybe you could do it and then provide the code for other users

    Comment

    • mbjoerling
      Member
      • May 2006
      • 52

      #3
      You can use custom commands to use it. I can see if have many parameters that it can receive.

      Is it for a linux installation? or Windows?

      If Windows, then ill put in into the .net version af the agent. I can use it for my work too.

      Comment

      • naim
        Junior Member
        • Jun 2006
        • 13

        #4
        they way i do it

        No script really needed, httping usage is not very complicated.
        oops, first sorry for not including URL

        sorry, linux only. but im sure there is a way to port it to windows, author provides source code.
        since zabbix agent does not have this capability built in, i am using the system.run[command] item.
        like so::
        Code:
        system.run[httping -m -g http://www.google.com ]
        the output im supposed to get is::

        # httping -m -g http://www.google.com
        1581.717968
        1913.561821
        1511.445045
        values in milliseconds

        but i keep getting this error on the machine runnig zabbix_agent, from /var/log/zabbix/zabbix_agentd.log ::

        006485:20060806:211411 RUN_COMMAND runed as WAIT
        006485:20060806:211414 Timeout while answering request
        006484:20060806:211416 RUN_COMMAND cmd = 'system.run[httping -m -g http://www.google.com ]'
        006484:20060806:211416 RUN_COMMAND flag = 'wait'
        006484:20060806:211416 RUN_COMMAND runed as WAIT
        006484:20060806:211419 Timeout while answering request
        006486:20060806:211421 RUN_COMMAND cmd = 'system.run[httping -m -g http://www.google.com ]'
        006486:20060806:211421 RUN_COMMAND flag = 'wait'
        006486:20060806:211421 RUN_COMMAND runed as WAIT
        006486:20060806:211424 Timeout while answering request
        any idea how to fix ?

        Comment

        • mbjoerling
          Member
          • May 2006
          • 52

          #5
          Zabbix is waiting for the program to exit.

          Add -c1 after the -m, then it should work.

          Comment

          • naim
            Junior Member
            • Jun 2006
            • 13

            #6
            on server side

            from /var/log/zabbix/zabbix_server.log

            018245:20060807:164839 The value is not stored in database.
            018245:20060807:164844 Timeout while receiving data from [newnet_test]
            018245:20060807:164844 Getting value of [system.run[httping -m -g http://www.google.com ]] from host [newnet_test] failed
            018245:20060807:164844 The value is not stored in database.
            018245:20060807:164849 Timeout while receiving data from [newnet_test]
            018245:20060807:164849 Getting value of [system.run[httping -m -g http://www.google.com ]] from host [newnet_test] failed
            018245:20060807:164849 The value is not stored in database.
            httping item is defined as follows:

            Item 'newnet_test:check_httping'
            Description:: check_httping
            Type:: ZABBIX agent
            Key:: system.run[httping -m -g http://www.google.com ]
            Type of information:: Numeric(float)
            Units:: ms
            Use multiplier:: Do not use
            Update interval (in sec):: 30
            Keep history (in days):: 90
            Keep trends (in days):: 365
            Status:: monitored
            Store value:: Delta(simple change)
            Applications:: -None-

            Comment

            • naim
              Junior Member
              • Jun 2006
              • 13

              #7
              nop

              i agree, but its still not working for me.

              007223:20060806:214722 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
              007223:20060806:214722 RUN_COMMAND flag = 'wait'
              007223:20060806:214722 RUN_COMMAND runed as WAIT
              007224:20060806:214748 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
              007224:20060806:214748 RUN_COMMAND flag = 'wait'
              007224:20060806:214748 RUN_COMMAND runed as WAIT
              007226:20060806:214818 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
              007226:20060806:214818 RUN_COMMAND flag = 'wait'
              007226:20060806:214818 RUN_COMMAND runed as WAIT
              i had to restart the zabbix agent to apply the new value :S
              Another issue, there are 5 instances of zabbix agent runnig, its because of the default StartAgents=5 being set.
              Why do i need more than one instance of zabbix agent running?

              Comment

              • naim
                Junior Member
                • Jun 2006
                • 13

                #8
                ahh,
                im now getting values. a proper graph

                But im still getting this in the zabbix agent logs
                007226:20060806:220418 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
                007226:20060806:220418 RUN_COMMAND flag = 'wait'
                007226:20060806:220418 RUN_COMMAND runed as WAIT
                007225:20060806:220448 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
                007225:20060806:220448 RUN_COMMAND flag = 'wait'
                007225:20060806:220448 RUN_COMMAND runed as WAIT
                007223:20060806:220518 RUN_COMMAND cmd = 'system.run[httping -m -c1 -g http://www.google.com ]'
                007223:20060806:220518 RUN_COMMAND flag = 'wait'
                007223:20060806:220518 RUN_COMMAND runed as WAIT
                what does that mean ?

                Comment

                • mbjoerling
                  Member
                  • May 2006
                  • 52

                  #9
                  It mean that it waited for httping to exit. I don't know if there is some flag to be set for the item, so it gives a little time to execute

                  Comment

                  • cameronsto
                    Senior Member
                    • Oct 2005
                    • 148

                    #10
                    There is a setting in the zabbix_server.conf that allows you to set how long zabbix will wait for the command to execute. Maybe you need to change this setting.

                    -cameron

                    Comment

                    • naim
                      Junior Member
                      • Jun 2006
                      • 13

                      #11
                      you mean in the file /etc/zabbix/zabbix_agentd.conf
                      the default setting Timeout=3. Well, its a very bad idea to change that to a bigger value just becaue the time to for international requests could be more than 3 seconds. If your zabbix is monitoring local hosts, where we consider anything above 2 seconds to be a network failure, then setting the Timeout value to something like 10 seconds is a bad idea, then it would wait at least 10 seconds for each request, before saying its unreachable.
                      That would add alot of requests to the que.
                      the correct way to do this is to set the time out value for httping. i did like so::

                      httping -m -c1 -t5 -g http://www.google.com
                      Thanks for mbjoerling, for the super fast reply.

                      Comment

                      Working...