Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Plugin Timed Out

    Posted by aeleus on June 21, 2022 at 20:56

    I’ve written a number of scripts (Bash and PowerShell Core) to use as Plugins. Starting in March of 2022, I started getting occasional time outs. After some testing, I have determined that any script that takes more than 10 or 11 seconds to execute will time out.

    pandora_server.log:

    2022-06-21 13:33:39 ProducerConsumerServer: pandoraserver.domain.com [V3] Plug-in module Test for agent dd0aa20090f94f38bbe288550ad1d17644b3fdf968c2560ba81be5b124fe053a timed out.

    It doesn’t matter what I set the “time out” value to for the plugin or the module (whether 0 or some high number).

    Pandora FMS: v7.0NG.762 Akira – OUM 762 – MR 54 (latest version)

    CentOS: 7 (up-to-date)

    PowerShell core: 7.1.5

    Sample Bash script – timeout with seconds set to 12 or greater:

    #!/bin/bash
    seconds=12
    sleep $seconds
    echo $seconds

    Sample PowerShell script – timeout with seconds set to 11 or greater:

    $Seconds = 11
    Start-Sleep $Seconds
    $Seconds

    aeleus replied 2 years, 4 months ago 2 Members · 4 Replies
  • 4 Replies
  • vic

    Administrator
    June 22, 2022 at 14:12
    1516 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi,

    Have you tried setting a timeout in the plugin configuration?

    Example:

    module_begin

    module_plugin XXXXXXXXXXXXXXX

    module_timeout 15
    module_end

    Best regards,

    Vic.

    • aeleus

      Member
      June 23, 2022 at 16:32
      529 Karma points
      Community rank: tentacle-rookie Tentacle rookie
      Like it
      Up
      0
      Down
      Drop it
      ::

      Hi Vic,

      I’m not familiar with what you describe.

      The way I create plugins is to write a standard Bash or PowerShell script (depends on the target computer). From the console, I go to Servers, Plugins and click Add.

      Name: Test

      Plugin type: Standard

      Max. timeout: 5 minutes

      (I’ve tried changing this with no effect. I have also tried changing the timeout for the module that runs the plugin.)

      Plugin command: /usr/share/pandora_server/util/plugin/test.sh

      Command preview

      /usr/share/pandora_server/util/plugin/test.sh

      I’ve been doing it this way since version 7.0 first released, and it has worked fine up until early March. If there is a better way to create plugins, can you link to the documentation?

      Thanks

  • vic

    Administrator
    June 27, 2022 at 17:02
    1516 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi Aeleus,

    Ahh, sorry, I thought they were agent plugins, what you are creating are server plugins.

    I attach the link to our wiki:
    https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitoring_with_server_remote_plugins

    Best regards,
    Víc.

    • aeleus

      Member
      July 3, 2022 at 14:44
      529 Karma points
      Community rank: tentacle-rookie Tentacle rookie
      Like it
      Up
      1
      Down
      Drop it
      ::

      Vic,

      Thanks for the link. I found this on the page:

      “In the execution of a plugin, there are three timeouts: server, plugin and module…”

      In my case, the limiting value was the “server” timeout set to the default of 12 (secs).

      I increased it, and now all is good.

      The web page you linked mentions the server timeout but does not say where or how it is set. Since it overrides the plugin and module timeouts, I suggest including the details on that page.

      For reference, it is here:

      /etc/pandora/pandora_server.conf

      plugin_timeout 12