How to retrieve last 100 error in groovy program

10 views
Skip to first unread message

wtp...@gmail.com

unread,
Oct 27, 2025, 11:30:20 AM (10 days ago) Oct 27
to javamelody
Hi,

I have one more question.  We want to monitor the errors in the java application and would like to check the last 100 errors from java melody in the groovy script and then extract those ERROR for reporting.     Is there any method to retrive the errors ?

evernat

unread,
Oct 27, 2025, 5:16:47 PM (10 days ago) Oct 27
to javamelody
Hello,

I am not sure of what you mean by "the groovy script".
Where is it executed ? In the monitored application itself ? And do you have an example of such groovy script using javamelody data so that I can understand.

bye,
Emeric

wtp...@gmail.com

unread,
Oct 28, 2025, 7:13:28 PM (9 days ago) Oct 28
to javamelody
Thanks for the prompt reply,    I follow the wiki https://github.com/javamelody/javamelody/wiki/ScriptsAndAlerts and created scripts as provided in the example.
But I want to retrieve the errors and do not know how to access them.
I checked the source code and seems the errors are contained in some counters CounterError but do not know the interface to retrieve them in the script.
Reply all
Reply to author
Forward
0 new messages