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 BUG? include in config file not working

  • BUG? include in config file not working

    Posted by mike_moyse on March 17, 2019 at 19:54

    I wanted to consolidate all my modules into a separate config file so I took working modules and cut and pasted them into a new config file. I added a line in pandora_agent.conf to include the new file.

    It does not work. On a new agent the module never appears in the console, on one that was working the module goes into unknown state.

    As per usual, the log file shows nothing of any use, no errors.


    Found the problem. The code for opening the include file doesn’t log any error if it can’t find or open the file. Any failure fails silently. My include file had a misspelling which was obvious once I’d modified the source code from “or next” to “or die” and ran the agent directly in the console which forced it to spit out a useful error message.

    Silently failing and not logging seems very poor practice to me as a non programmer, I spent far more time tracking this down than I should have done due to this.

    emmybr replied 5 years ago 2 Members · 1 Reply
  • 1 Reply
  • emmybr

    Member
    July 29, 2019 at 20:25
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I see, got this problem when there’s an extra line “Enter” on the end of file and deleting it will solve the problem, funny thing it doesn’t show any error.