rith

Logmon - URL - XML?

Discussion created by rith on Nov 5, 2014
Latest reply on Nov 7, 2014 by jonhcw

Is the View-output in Logmon when using URL only generated in a one-line txt-document? Or can you change that in some way?

The problem is when I'm watching over an XML-code, it's very hard for me to create good rules when everything is on one line.

 

Here is an example:

 

<applicationStatus applicationName="SYSTEM" globalState="OK" offline="false" logLevel="WARNING" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="4" logErrorCount="0"/><applicationStatus applicationName="CompanionGrid" globalState="OK" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"><globalStateComment>OK</globalStateComment></applicationStatus><applicationStatus applicationName="EnterpriseSearch_ThirdParty" globalState="OK" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"/><applicationStatus applicationName="EventAnalytics" globalState="OK" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"/><applicationStatus applicationName="EventHub" globalState="OK" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"/><applicationStatus applicationName="GDBC" globalState="OK" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"><globalStateComment>Broker is available</globalStateComment><globalStateComment>Embedded H2 is available</globalStateComment></applicationStatus><applicationStatus applicationName="IES_ATS" globalState="OK" offline="false" logLevel="ERROR" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="1" logErrorCount="1"/><applicationStatus applicationName="LDAP" globalState="NOT_RUNNING" offline="false" logLevel="NONE" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="0" logErrorCount="0"/><applicationStatus applicationName="M3BE_15.1_ATS" globalState="OK" offline="false" logLevel="WARNING" cpuLevel="NONE" memoryLevel="NONE" logWarningCount="5" logErrorCount="0"/>

 

I would like to capture the "globalState="NOT_RUNNING" and back to the "applicationName="LDAP"", on the same line in the XML. When I try this using regexp, it will go back to the first "applicationName"SYSTEM"", because everything is on one line here in the txt-file.

Normally in the XML, every new line/row starts with "<applicationStatus....", and it's very easy to use the Regexp because I have a new line for every application.

 

My solution now is to create a new watcher-profile for every application in the XML, and match expression like this:

/applicationName="XXXX"\sglobalState="NOT_RUNNING"/

 

Any good idea how to work this out?

Outcomes