Is there a way to view logs from three different remote nodes on one tab on Chainsaw

80 Views Asked by At

Is there a way to view logs from three different remote nodes on one tab? Right now I get three tabs open for three nodes. Here is my log4j config for the same app deployed on three different linux boxes

log4j.appender.HUB=org.apache.log4j.net.SocketHubAppender
log4j.appender.HUB.port=39867
log4j.appender.HUB.LocationInfo=true
log4j.appender.HUB.Threshold=INFO
log4j.appender.HUB.application=remotehost
1

There are 1 best solutions below

0
Scott On

Yes.

You can create a new tab from existing events via the 'view, create tab from expression' menu item - it will combine events matching the expression into a new tab. As new events which match the expression arrive, they will also be added to the new tab.

This isn't persistent - restart Chainsaw and you have to go through that process again.

If you want to permanently change things, you can modify the 'tab name/event routing expression' under Chainsaw preferences. As events come in, the expression in the 'event routing expression' box is resolved with the values for the current event. If a tab exists with that tab name, the events are added to that tab. If no tab exists, a new tab is created.

An example expression you could use in the 'view, create tab from expression' expression box (assuming the events you are interested in all have an 'application' column with 'remoteHost' as the value in that column):

PROP.application=remoteHost

This second option just builds a string - isn't really an expression like the search and filter expression syntax...

An example tab name/event routing expression you could use to get all events with 'remoteHost' as the application on a tab called 'remoteHost':

PROP.application

By the way, I would suggest checking out the latest developer snapshot of Chainsaw, available here:

http://people.apache.org/~sdeboy