ZABBIX Forums  

Go Back   ZABBIX Forums > Zabbix Discussions and Feedback > Zabbix Troubleshooting and Problems

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2017, 06:24
Ritun Ritun is offline
Junior Member
 
Join Date: Dec 2017
Posts: 3
Default 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!!
Reply With Quote
  #2  
Old 06-12-2017, 21:21
nelsonab nelsonab is offline
Senior Member
Zabbix certified professionalZabbix certified specialist
 
Join Date: Sep 2006
Location: Virginia
Posts: 1,213
Default

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

Reply With Quote
  #3  
Old 07-12-2017, 06:50
Ritun Ritun is offline
Junior Member
 
Join Date: Dec 2017
Posts: 3
Default

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

Thanks for the support!!!
Reply With Quote
  #4  
Old 07-12-2017, 17:46
nelsonab nelsonab is offline
Senior Member
Zabbix certified professionalZabbix certified specialist
 
Join Date: Sep 2006
Location: Virginia
Posts: 1,213
Default

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

Reply With Quote
  #5  
Old 08-12-2017, 06:18
Ritun Ritun is offline
Junior Member
 
Join Date: Dec 2017
Posts: 3
Default

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 00:44.