Follow up question on the blog entry "Using Apama with Prometheus and Grafana"

Hey there!

I got a question regarding the somewhat recent blog entry mentioned in the caption (here is a link to the entry).
I set the whole connection to Prometheus and Grafana up and everything works wonderfully. Now, I wanna add my own metrics to send some other data to prometheus, but I have no idea how to do that. At the end of the blog, the author talks about an EPL user-defined status mechanism that would make that possible but I cannot find neither that nor the whole metrics part in the documentation. Can anybody here maybe briefly explain to me what I have to do in order to make that work and create my own metrics?

Best regards and happy easter

Malte

Hi Malte,
This should help
com.apama.correlator.Component.setUserStatus(subcomponent_identifier +“.status”, status);

You can have a look at this link for further details.
http://www.apamacommunity.com/documents/10.5.2.0/apama_10.5.2.0_webhelp/webhelp/#page/apama-webhelp%2Fre-monitoring_kpis_for_epl_applications.html

Regards,
Pavan

Thanks for the quick answer!

Since I´m new to Apama, I couldn´t quite use your information correctly. Where do I have to input the com.apama.correlator.Component.setUserStatus? In the CorrelatorConfig.yaml?
None of that seems to work for me.
Or is that an event definition?
Sorry for these basic questions, I´m just trying to wrap my head around Apama and I´m finding very little helpful information on the web.

Best regards

Malte

Hi Malte,
This is an Event Definition. Are you using Designer if so add the EPL Bundle “Correlator Management”. This bundle has this event definition.

If you want to inject this without the Designer use the event definitions from the location APAMA_HOME/monitors/Management.mon and ManagementImpl.mon

Regards,
Pavan

Hey Pavan, you are a real lifesaver. It works! Thank you so much.

I´m sorry to bother you once more, but now I got the problem that my events are being fed to the correlator too fast.
Grafana (or Prometheus) doesn´t count them one by one, but bunches them all up into one data point.
Is there any way in EPL to wait for a certain time after processing an event?

Best regards,

Malte

Hi Malte,
Happy to help good to know it works.
You can wait for a specific time before processing events depends on the application you are designing.
The wait operator should probably help you to wait for a specific time.

Do have a look at these links -
http://www.apamacommunity.com/documents/10.5.2.1/apama_10.5.2.1_webhelp/webhelp/#page/apama-webhelp%2Fco-DevApaAppInJav_the_concept_of_time_in_the_correlator.html%23

http://www.apamacommunity.com/documents/10.5.2.1/apama_10.5.2.1_webhelp/webhelp/#page/apama-webhelp%2Fco-DevApaAppInJav_about_timers_and_their_trigger_times.html%23

Regards,
Pavan