Ad Widget

Collapse

Please increase timeout for script execution

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Buck Rogers
    Junior Member
    • Apr 2009
    • 6

    #1

    Please increase timeout for script execution

    Dear zabbix team,

    first of all thank you for you great product.
    I had a few problems the last day with scripts which were executed three times daily. These scripts collect the status of the internal windwos backup and output the unixtime and backupsets.
    Typically this script runs in about 20 seconds without any problems. Sometimes the script does take a lot longer about 90 seconds.

    I have two options:
    1. Write a wrapper arround my powershell script to kill the job after 25 seconds and take the last output as result.

    2. Compile every zabbix agent by my own and change the setting in the source code.

    Logically the easiest way is to have the timout setting in the config file much wider to use scripts which take longer to execute. Is there really any sense to restrict this setting to 30 seconds? Why not 600 seconds?
    I vote for raising this value up to 120 secons at least.

    regards

    Florian
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Instead asking for extending execution time of the scripts you should consider migrate your items from zabbix agent or zabbix agent active to zabbix trapper type.
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • Buck Rogers
      Junior Member
      • Apr 2009
      • 6

      #3
      Indeed that is a corret way to do. Otherwise you have to setup the task planer, mess with "execute batch" job rights and so on.
      So all zabbix related settings and configurations are within one config file.

      Comment

      • tk421
        Junior Member
        • Feb 2016
        • 2

        #4
        If I understand properly zabbix trapper is waiting for the different systems to receive values, isn't it ? Does that mean that you need to, for example, to create a crontab that will send periodically the value ?

        Comment

        • kloczek
          Senior Member
          • Jun 2006
          • 1771

          #5
          Originally posted by tk421
          If I understand properly zabbix trapper is waiting for the different systems to receive values, isn't it ? Does that mean that you need to, for example, to create a crontab that will send periodically the value ?
          "zabbix agent" type of items are for zabbix passive monitoring when zabbix server or proxy is deciding when metric needs to be sampled and you have full control of what and how frequently is sampled. Natural consequence of using this type of items is bottleneck in zabbix server/proxy poller.

          "zabbix agent (active)" type of items are for simillar monitoring except that zabbix agent is only asking zabbix server or proxy about batches of informations about what needs to be monitored on agent and agent is deciding basing on those cfg data when and what needs to be sampled.

          Both variants are kind of synchronous way of monitoring when sampling of the metric is short and does not creates bottlenecks on zabbix server/proxy or agent processes.
          "zabbix trapper" is for anything which needs to be monitored asynchronously or to monitor metrics which obtaining data may take longer.
          Example: metrics marking time when you starting and finishing backups (especially finishing time cannot be deterministic from point of view when it needs to be sampled).
          Many people are using trapper items on processing other types source of monitoring data containing metrics values and timestamps which needs to be first processed and send as batch to zabbix server.
          When you need to process or query some source of metrics data and this process may take relatively long time main problem is about time stamp of sampled value. Is this value needs to be assigned to begin or maybe end of the query process or even to some point in the middle. All those dilemmas could be solved in some civilized way by using some backend trapper script which will be (pre)processing monitoring data assigning to them proper time stamp.
          http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
          https://kloczek.wordpress.com/
          zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
          My zabbix templates https://github.com/kloczek/zabbix-templates

          Comment

          • Buck Rogers
            Junior Member
            • Apr 2009
            • 6

            #6
            Thank you very much for the explenation. I see why the agent should not be bothered with these kind of scripts. I have wrapped these paramaters arround a powershell script which is triggered by the task planer.

            Thank you very much

            Comment

            Working...