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 XML file – string warning value

  • XML file – string warning value

    Posted by pmcdaid on August 23, 2012 at 11:16

    The XML agent file supports providing min and max warning values for numeric module data by using ‘min_warning’ and ‘max_warning’. However, if the module is a generic string there does not seem to be a way to provide that string ‘warning’ value in the xml file. Same is true for ‘critical’. I tried ‘str_warning’ (as I see is used internally in the code/database) but I get a message in the console after processing the file that it is not accepted. Any suggestions? Otherwise, I need to enter the warning value through the console for each module, which works, but is time consuming with lots of modules.

    pmcdaid replied 12 years, 3 months ago 3 Members · 6 Replies
  • 6 Replies
  • tpalacios

    Member
    August 30, 2012 at 19:56
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Which version of the software agent are you running?

    IIRC str_warning and str_critical only work from 4.0.1 in advance.

    Otherwise, don’t add any range information in the XML nor in the module configuration of the software agent configuration file, and do it from the console.

    It is not time consuming if you use massive module edition operations to change the configuration of several modules at the same time.

    Regards.

  • pmcdaid

    Member
    September 5, 2012 at 00:01
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I am not sure what you mean by ” … only work from 4.0.1 in advance.”

    As you suggest, I will use the massive module edit operation in the console, since adding str_warning (at least) doesn’t work in the configuration file to automatically configure the agent on the server.

    This would be a useful addition.

    I am using 4.0.2, but the remote agent is custom for the network element I am using.

  • tpalacios

    Member
    September 5, 2012 at 02:23
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I am not sure what you mean by ” … only work from 4.0.1 in advance.”

    As you suggest, I will use the massive module edit operation in the console, since adding str_warning (at least) doesn’t work in the configuration file to automatically configure the agent on the server.

    This would be a useful addition.

    I am using 4.0.2, but the remote agent is custom for the network element I am using.

    Err.. sorry, I meant that it only works since version 4.0.1…

    Well.. it should work actually.. however that reminds me of an old bug where these module configuration tokens were not added to the software agent..

    When I meant version 4.0.1 I was talking about the software agent’s version, not the console/server version… I say this because you could perfectly have a 4.0 software agent reporting to a 4.0.2 server.

    Are you sure you’re using 4.0.2 for your software agent?

    In any case, if you are using a custom software agent to monitor your network element, keep in mind that the XML generated by your module must include something like:

    ModuleName
    generic_data_string
    matchingexpression
    matcherror
    value
    

    Set your agent into debug mode or send the XML file to another path where the Data Server doesn’t process it, and check the content of your module’s XML structure.

    If those tokens are present, then you must make sure that your Pandora Console/Server are 4.0.2 and that the DB has been properly upgraded.

    Regards.

  • pmcdaid

    Member
    September 6, 2012 at 04:01
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    The server put a notice in the console on the module as a hover note that the str_warning is not accepted. I don’t recall the exact wording, though.

    I only used the str_warning token in my usage, and it is well-formed as your example describes.

    The server was originally 4.0.1, but upgraded to 4.0.2. Using mysql db.

    Pandora FMS v4.0.2 – Build PC120625

    All is configured properly from what I can tell. Other ideas?

  • Nacho1988

    Member
    September 13, 2012 at 21:16
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi;

    I haven’t tried it with the same buid but with other and it doesn’t seem to work either,I will let you know when I try with the build you have.

    Regards.

  • pmcdaid

    Member
    October 1, 2012 at 22:26
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Here’s some more info on this issue. First, the file is well formed:

    Chan1_State
    generic_data_string
    Operational
    Channel sample state
    Invalid

    This is data showing up in the database as ‘str_warning: Invalid’ in the ‘extended_info’ field of ‘tagente_modulo’ table. (I would have expected it to show up in the ‘str_warning’ field.)

    The extended info is displayed as an info bubble on the agent module in the console.

    I have not verified the warning is not triggered when the condition occurs, but I assume it does not at this point, given the info above.