Triggering event upon alarm creation


We are implementing mobile application that is connected to Cumulocity platform via REST API.

We would like to notify our users immediately after some type of alarms are created on Cumulocity (i.e. geofence exit ) using Firebase Cloud messaging service provided by Google.
In order to do that, we need to send HTTP Post request from Cumulocity to the following url : when the alarm is created.

Do you have proposal how that could be implemented inside Cumulocity?

Kind regards,

Hi Milos,

you should take a look at Apama Streaming Analytics Overview - Cumulocity IoT Guides
and in particular the HTTP transport Built-in actions - Cumulocity IoT Guides

It is the best way to act in “realtime” on stuff happening in Cumulocity.

Hi Tobias,

Thank you very much for your prompt response.

Is there any way to develop this feature without Apama Streaming Analytics, perhaps by invoking microservice which will send HTTP Post request towards Firebase Cloud Messaging upon alarm creation?

We have access to Apama Starter only, and I am not sure that our tenant has the EPL Apps page available in the Apama Analytics Builder in order to utilize HTTP transport as proposed.

What modules(services) should we have enabled on our account (tenant) in order to implement this feature with Apama Streaming Analytics using HTTP transport?

Kind regards,

Hello Miloš,

you can also write your own microservice for this if you are able to upload microservices to your tenant.
You could have a look at this nodejs microservice sample from here: Examples - Cumulocity IoT Guides
This microservice is posting messages on slack for every realtime update of active alarms.

Kind Regards,

Hello Tristan,

Is there a possibility to perform real-time actions using the Java SDK when an alarm is created?
What would be the best approach for implementing this?

Best regards,

Hello Nikola,

in general you should be able to accomplish that also within a java microservice, I guess you could modify the sample from here for that case: cumulocity-microservice-templates/realtime at main · SoftwareAG/cumulocity-microservice-templates · GitHub
In general the usage of apama is the recommended way of handling any realtime updates.

Best Regards,

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.