Welcome to Pandora FMS Community!

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

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting [Solved] Remote SSH with expect script problem

  • [Solved] Remote SSH with expect script problem

    Posted by erinai on October 27, 2010 at 16:36

    Hello all,

    I have a problem with a expect script. This script connects to another machine with remote ssh and runs sql queries.
    It´s works fine out of pandora but when I add the code to the pandora_agent.conf the others monitors do not respond.
    This the code:
    module_begin
    module_name prueba_sql
    module_type generic_data
    module_exec /etc/pandora/sqlgeneral.exp user@host bd sql promt && echo 1
    module_description prueba 1
    module_end

    Thanks in advance!

    erinai replied 14 years ago 2 Members · 2 Replies
  • 2 Replies
  • suzdal

    Member
    October 27, 2010 at 17:56
    1 Karma
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    it’s possible to fail because there was a time out or for the && in the exec line, try to fit the line between ” or ‘

  • erinai

    Member
    December 14, 2010 at 13:28
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    The problem is solved!
    The script ,now, returns a number, so I don’t need this “&& echo 1”

    Thanks!