Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 7

SAM, How to show last x number of statistic messages

Jump to solution

I have created a powershell log parser application, with a 'number of newly found strings' component.

I am using a script that actually extracts the line of text from the log file and return this in the statistic message.

This is all working and it displays the error in the statistic message field. or displays 'No newly found strings' if no regex match was found

However I want to display the last 25 statistic messages when the statistic > 0 (i.e. a regex match was found for an error)

I have hundred and hundreds of this sort of application and have found that I can do this by creating a custom report and then using the 'Filter Nodes (SQL)' with a value of

applicationname='the application name' AND nodename = 'the node name'.

However this will be a lengthy process adding this value on all application (I would need a separate view for each application)

Is there any easier way to do this, perhaps by a variable in the 'Filter Nodes (SQL)'  value that auto inserts the application name and node name?


0 Kudos
1 Solution


OK, I have cracked it

Here we go...


Create the following report in Report-Writer:



Create new Action in Advance Alert to trigger Event Logging:



Add Report From Orion Report Writer Resource to Component Page:



Configure your Report Resource to display your report you have created in (1):



Sit Back > Take a Deep Breath > Enjoy!




View solution in original post

0 Kudos
24 Replies

I believe the issue you're having is that events generated via alerts are not associated with any particular node or entity. The alert engine writing that event to the event log breaks that association. You could get around this by including the Node name to the event and then use 'Contains' in your report to find events matching that node name in the message field. If you have a lot of events I imagine performance might suffer, but at least in theory, it should work. 

0 Kudos

Thanks for the response.  Im more asking the question are the historical component messages stored in the database anywhere?  If they are not then I will use the method in this post to write them to the event log.

0 Kudos

Wow, so much to learn... so much to do... 

I will start digging how to "use the ComponentID macro to build a dynamic report that could be placed on the Component Details view" and in the meantime would appreciate if you can post some links to existing resources you may think can be relevant to refer to

Appreciate your help Alter Ego



0 Kudos

@aLTeReGo , Is this still the official way to get a resource that shows the last XX number of statistic messages?  I know you have made a ton of SQL improvements since 2014.  I have been trying to stitch together the SQL views to build one based on whats in SQL but Im wondering if that is still only going to show the the recent component messages and not the ones from earlier today or yesterday.

0 Kudos