ZABBIX Forums

ZABBIX Forums (http://www.zabbix.com/forum/index.php)
-   Zabbix Troubleshooting and Problems (http://www.zabbix.com/forum/forumdisplay.php?f=5)
-   -   Script is failing because of externalscript timeout of max 30secs (http://www.zabbix.com/forum/showthread.php?t=60058)

Ritun 06-12-2017 06:24

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!!

nelsonab 06-12-2017 21:21

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.

Ritun 07-12-2017 06:50

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

Thanks for the support!!!

nelsonab 07-12-2017 17:46

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).

Ritun 08-12-2017 06:18

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


All times are GMT +2. The time now is 15:04.