VMware Cloud Community
bjchip_hyperic
Enthusiast
Enthusiast

Monitoring logs

This is hyperic 4.2.0 - using the server's sun java 1.6.0_018

I am attempting to monitor the file /opt/jboss/logs/server.log

The agent is running as user hyperic and user hyperic is able to read the log.

The log contains some binary characters (some encrypted content appears).

I have set up the server with log tracking enabled.
server.log_track.level is Debug
server.log_track.include is /.*/ (I have also tried m/*./ )
server.log_track.files is /opt/jboss/logs/server.log
It is active.

I can't see anything anywhere in either the hq.server, its server.log or in the agent.log on the monitored box.

Setting an alert on the log with events/logs level = Any and a substring match set explicitly I enter that substring in the log.

Nothing.

Except for the fact that the agent is reporting all the other things involved back to the server, I'd think that they are disconnected. The agent log shows the loading of two log_tracking plugins I have created (one is for the separate jboss thread created for the Bonita EAR). Both read the server.log, Neither report a thing.

Which argues that I am doing something fairly simple wrong.

BTW... there are a fair few ways to think about entering a regex in a text box... I do not know what I need to put into that box. All well and good to show me the class def for reg-ex but the rules for entering it in that box? No way to know those as the documents stop short of even the simplest example.

respectfully
BJ
Reply
0 Kudos
5 Replies
bjchip_hyperic
Enthusiast
Enthusiast

Of course, testing by writing a simple string into the log doesn't pass the log4j formatted DEBUG level entry test.

One has to put the string into that format.

To test it.

Then the combinations work.

I am looking for how that format is determined though, as log4j is quite flexible about the format of its messages.


BJ
Reply
0 Kudos
bjchip_hyperic
Enthusiast
Enthusiast

A simple example set of include strings would be as follows.

m/(string A|stringB|another stringC)/

....strangely not working as an exclude string.

BJ
Reply
0 Kudos
bjchip_hyperic
Enthusiast
Enthusiast

The operation of the strings in "include" and "exclude" is not completely clear here. In particular I have not successfully excluded ANY strings using 4.3.0 and careful testing, dumping the messages into the server.log.

It seems (so far) to ignore whatever I place in the exclude box.
Reply
0 Kudos
bjchip_hyperic
Enthusiast
Enthusiast

The EXCLUDE box, unlike the include box, appears to treat whatever is placed in it as a regex without the usual external syntax. So

m/JUnit test/

fails to be recognized while

JUnit test

is recognized.

In the include box, the

m/(some string|some other string)/

worked. I am trying to characterize this more thoroughly.
Reply
0 Kudos
bjchip_hyperic
Enthusiast
Enthusiast

.... and what they both want is the grouping syntax.

(JUnit test|ignoreMe)

....gets those messages included or excluded properly whichever box it is placed in.

I wish I could say this is "obvious" in some way, but it purely is not, and it really wants to be documented at greater length in the section on log-tracking.

I do hope this helps someone else.

On to the JMX monitoring of Hornetq. 🙂
Reply
0 Kudos