Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XML file - string warning value
#1
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.
 Reply
#2
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.
 Reply
#3
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.
 Reply
#4
(09-04-2012, 08:01 PM)pmcdaid link Wrote: 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:

Code:
<module>
<name>ModuleName</name>
<type>generic_data_string</type>
<str_warning>matchingexpression</str_warning>
<str_critical>matcherror</str_critical>
<data>value</data>
</module>

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.
 Reply
#5
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?
 Reply
#6
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.
 Reply
#7
Here's some more info on this issue. First, the file is well formed:
...
<module>
<name>Chan1_State</name>
<type>generic_data_string</type>
<data>Operational</data>
<description>Channel sample state</description>
<str_warning>Invalid</str_warning>
</module>
...

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.
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes