Ad Widget

Collapse

external script wait time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BusteR81
    Senior Member
    • Apr 2007
    • 150

    #1

    external script wait time

    hi

    i had ran a script successfully from zabbix 1.4.2

    when host is healthy it will return value >0
    ELSE
    -1

    problem: when running script from SSH zabbix server and when system is healthy, the value (>0) will be returned instantly
    BUT
    if system is unhealthy, the value '-1' tends to return after 15-20 sec. Therefore zabbix_server.log shows timeout has occurs on reading the ITEM value from this script.

    Question: how can i INCREASE the external scripts WAIT time so that it will NOT timeout while waiting for a (-ve) value in my case ?

    cheer
  • BusteR81
    Senior Member
    • Apr 2007
    • 150

    #2
    did a search on forums



    Type must be set to ZABBIX Agent and ZABBIX Agent (active). Make sure that your script is fast enough, ZABBIX won't wait longer than 3 seconds by default.

    HOW can i increase the 3 sec

    Comment

    • BusteR81
      Senior Member
      • Apr 2007
      • 150

      #3
      answers?

      no answers ? i did a turn around and tried using zabbix_trapper + zabbix_sender to obtain my Radius dB status data. but the SAD thing is trapper does not accpet negative (value) even in 1.4.2 and my alarm TRIGGERs at -(values)

      Comment

      • ptietjens
        Junior Member
        • May 2008
        • 5

        #4
        Argh

        Too bad this was never answered. I too, now am stuck in a conundrum where I need to check that routes are up in my WAN - there is no function to do so in Zabbix, and no script I write is going to be able to transverse long routes in under 3 seconds.



        back to nagios, perhaps

        Comment

        • BusteR81
          Senior Member
          • Apr 2007
          • 150

          #5
          well good news for you, yes zabbix server wait only 3 sec to get a answer (int, float, char etc) from the script but after 3sec, the script will still be run in the background. that is, eg. (the script must return a value in 3 sec and thereafter the script may do a trace route of 1-2 min and send it the the NOC)

          for your case, u can return the value after " transverse long routes" by using zabbix_sender (trapper). look at zabbix_sender for details in the zabbix manual

          cheers


          Originally posted by ptietjens
          Too bad this was never answered. I too, now am stuck in a conundrum where I need to check that routes are up in my WAN - there is no function to do so in Zabbix, and no script I write is going to be able to transverse long routes in under 3 seconds.



          back to nagios, perhaps

          Comment

          • ptietjens
            Junior Member
            • May 2008
            • 5

            #6
            Trapper

            Yeah, that's the solution I arrived at, only I didn't bother with the external check, I just have those few (10) traceroutes done and sent to Trapper via CRON and it works fairly well.

            Perhaps a note about the three second limitation should be somewhere in the docs, eh?
            Last edited by ptietjens; 12-06-2008, 15:43.

            Comment

            • lamont
              Member
              • Nov 2007
              • 89

              #7
              scanning through the sources, i suspect that the "Timeout=" variable in zabbix_server.conf applies to external checks as well as agent checks... not positive, however....

              Comment

              • lamont
                Member
                • Nov 2007
                • 89

                #8
                I just bumped my Timeout= up to 10 and in the config table in the database decreased refresh_unsupported down to 60. I also took my external script and wrapped the whole thing with an alarm timeout (and validated that the libraries that i'm using call select() for a timeout and don't use SIGARLM themselves).

                Comment

                Working...