Ad Widget

Collapse

SQL discovery timeouts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yishai8
    Junior Member
    • Aug 2019
    • 2

    #1

    SQL discovery timeouts

    Hi,

    I'm running a 2 steps discovery:

    1) SQL query runs on the server( where the agent is) and sends a json using zabbix sender to zabbix where a trapper catches it.
    2) LLD uses the JSON values as parameter to run another script (userParameter is configured) with another query which should return the final value per discovered item.

    the first query runs as expected and items are created but the second script fails due to "timeout while executing a shell script".
    I tried to debug so i changed the second script to return only the LLD parameter which worked as well as just returning random value but every time i try the script with the query it fails.
    The query itself was tested and takes less than a second to run so it's not a duration issue.

    Can it be an issue of item interval time vs actual running time on the server?
    if the server runs the first query will the trapper catch it right away and run the second one or will it do it only when it reaches the interval time?
    maybe that causes a delay which results in timeout.

    Hope i can get some ideas here as i couldn't find any issues.

    Thanks
  • yishai8
    Junior Member
    • Aug 2019
    • 2

    #2
    I solved it in a different way :
    created one script with a few parts - first one creates the discovery items using JSON and LLD and the second part sends a input file to zabbix with the relevant keys and values.
    it's working because the number of created items matches the number of items i'm sending in the file and the key is already known.
    the only thing left is to match the index of the key to what i'm sending (discovery of multiple items have the same key with different index per item -key[x])

    Comment

    Working...