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.