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:16The 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
-
::
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.
-
::
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.
-
::
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.
-
::
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?
-
-
::
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.