Hello, Not sure if this is an agent issue or a pandora server issue. I have a server in which I want to search for a particular error message inside the /var/log/messages file. The exact string I am looking for starts with "Cannot". In the pandora_agent.conf file I have: module_plugin grep_log /var/log/messages ivonacl Cannot A sample error message looks like: Nov 9 14:05:20 hs-pbx01 ivonacl[3274]: Cannot make socket non-blocking: #012?#037 I tested by added the string manually at the end of the /var/log/messages file echo "Nov 9 14:25:20 hs-pbx01 ivonacl[3200XXXTEST]: Cannot make socket non-blocking: #012?#037" >> /var/log/messages In the module setting I have the critical field searching for the string "Cannot". I believe I found where the issue is occurring but unsure of how to resolve it. It seems to be the pandora server or perhaps the tentacle server. If I run the plugin manually: cd /usr/share/pandora_agent/plugins/ ./grep_log /var/log/messages ivonacl Cannot I get the output as expected: So it seems the module is correctly detecting the string and returning the output as it should, however, I believe the special characters at the end of the string are somehow causing an issue in the pandora server, (The #012?#037) because the module never goes into a critical state. If however, I add a line to the /var/log/messages file such as: echo "Nov 9 14:53:20 hs-pbx01 Cannot...testing error...egwgwrggw" >> /var/log/messages it will properly detect the error and go into the critical state as it should. I am running server and console version 5.0 and pandora_agent version is also 5.0 Any assistance would be appreciated. Thanks
grep_log not working correctly
caesar · 9 nov 2013, 23:46 · 4 mensajes · 54 visitas
- Inicio del debate
Verbose logging: I can definitely see the parser having an issue, pretty certain it has to do with the special characters inside the string. 2013-11-09 20:43:36 hostname.server.com [V2] Problem parsing XML file, XML file discarded: not well-formed (invalid token) at line 98, column 105, byte 3338 at /usr/lib64/perl5/XML/Parser.pm line 187 thread 1 2013-11-09 20:43:38 hostname.server.com [V2] Problem parsing XML file, XML file discarded: not well-formed (invalid token) at line 98, column 105, byte 3338 at /usr/lib64/perl5/XML/Parser.pm line 187 thread 1 2013-11-09 20:43:38 hostname.server.com [V2] Problem parsing XML file, XML file discarded: not well-formed (invalid token) at line 98, column 105, byte 3338 at /usr/lib64/perl5/XML/Parser.pm line 187 thread 1 2013-11-09 20:43:40 hostname.server.com [V10] Generating event 'Unable to process XML data file '/var/spool/pandora/data_in/hs-pbx01.local.1384048045.data': not well-formed (invalid token) at line 98, column 105, byte 3338 at /usr/lib64/perl5/XML/Parser.pm line 187 thread 1
What I did temporarily was copy the grep_log script and made a change to the script to remove any special characters when creating the XML values.
Ok! Anyway, let's review what you described in order to fix. Thanks for the input
Entra en tu cuenta para publicar.
