Announcement

Collapse
No announcement yet.

Script is failing because of externalscript timeout of max 30secs

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Script is failing because of externalscript timeout of max 30secs

    Hello All,

    I am configuring an Item and using an ExternalScript to copy some files from the other machine. But sometimes my script takes more than 30 seconds, and thus the zabbix user is killing the process.

    I tried by running the script in background by invoking it from a parent script. But this too didnt helped.

    So, is there any way to increase the timeout more than 30seconds? Or how can I handle this situation. Please help me with your inputs. Thanks in advance!!

    #2
    You could patch the source to change the max timeout, but that brings other pain points with it.

    Alternatively you could use the "at" command as ourlined here: https://www.zabbix.org/wiki/Escaping_timeouts_with_atd

    The second choice however means you won't get failure information in the UI should the script fail.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment


      #3
      Can you help on telling me, on where to patch the source code?

      Thanks for the support!!!

      Comment


        #4
        Forgive me, but if you're asking where to patch the code, it would be better to start with the alternative suggested. Patching the code while straight forward brings with it it's own complexities later (such as needing to repatch for future versions).
        RHCE, author of zbxapi
        Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
        Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

        Comment


          #5
          Thanks for the quick support!!
          Will surely try with the at commands now.

          Comment

          Working...
          X