# Create alarm using smartrules

**URL:** <https://community.cumulocity.com/t/create-alarm-using-smartrules/1394>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [June 6, 2024, 9:05am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394 "2024-06-06T09:05:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dacsystemsw](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@dacsystemsw](https://community.cumulocity.com/u/dacsystemsw)\
**Post date:** [June 6, 2024, 9:05am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/1 "2024-06-06T09:05:28Z")

</div>

#### _ **Product/components** used and **version/fix** level:_

Backend: **1020.296.0**  
UI: **1011.0.4**

#### _Detailed explanation of the problem:_

Hi it’s Luca,  
we would like to use Smartrules to produce alarms directly on the platform.  
The scenario we want to implement is the following:

 ![desiderataAlarms](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/7/4/749508696f946bce8d2693a66c6f26ebc90d8826.png)

The horizontal dashed lines represent the thresholds for the critical and minor alarms.

We played with [this](https://cumulocity.com/docs/cockpit/smart-rules-collection/#on-measurement-explicit-threshold-create-alarm) rule but it doesnt allow to set thresholds for minor alarms.

We also tried “[On measurement threshold create alarm](https://cumulocity.com/docs/cockpit/smart-rules-collection/#on-measurement-threshold-create-alarm)” but it defines ranges not thresholds.

Any other idea??

Best  
Luca

#### _Error messages / **full error** message screenshot / **log** file:_

#### _Question related to a **free trial** , or to a **production (customer)** instance?_

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [June 6, 2024, 9:27am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/2 "2024-06-06T09:27:39Z")

</div>

Probably best would be a Streaming Analytics EPL. There is an Example…

![image](https://europe1.discourse-cdn.com/flex005/uploads/cumulocity/original/3X/f/5/f51d9111f44656d61bbeafb9099f78ea6852d659.png)

---

<div class="post-metadata">

**Author:** ![dacsystemsw](https://avatars.discourse-cdn.com/v4/letter/d/e79b87/32.png) [@dacsystemsw](https://community.cumulocity.com/u/dacsystemsw)\
**Post date:** [June 6, 2024, 9:42am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/3 "2024-06-06T09:42:46Z")

</div>

Thanks Robert for your answer, could you provide me the link to that part of the docs?

---

<div class="post-metadata">

**Author:** ![Marco\_Stoffel](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/marco_stoffel/32/19453_2.png) [@Marco\_Stoffel](https://community.cumulocity.com/u/Marco_Stoffel)\
**Post date:** [June 6, 2024, 11:46am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/4 "2024-06-06T11:46:47Z")

</div>

Hey Luca,

for EPL Apps find the docs here:

> **[Introduction - Cumulocity documentation](https://cumulocity.com/docs/streaming-analytics/introduction-analytics/#apama-epl-apps)**
>
> This documentation offers comprehensive information on the Cumulocity platform both from a user and from a developer perspective. It reflects the latest state of the Cumulocity platform and is continuously updated to align with recent software...

you might also try Analytics Builder for that usecase:

> **[Analytics Builder - Cumulocity documentation](https://cumulocity.com/docs/streaming-analytics/analytics-builder/#getting-started)**
>
> This documentation offers comprehensive information on the Cumulocity platform both from a user and from a developer perspective. It reflects the latest state of the Cumulocity platform and is continuously updated to align with recent software...

KInd Regards,

Marco

---

<div class="post-metadata">

**Author:** ![Robert\_Neale](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/robert_neale/32/31965_2.png) [@Robert\_Neale](https://community.cumulocity.com/u/Robert_Neale)\
**Post date:** [June 6, 2024, 11:55am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/5 "2024-06-06T11:55:23Z")

</div>

There is the documentation and when you create an EPL in the Streaming Analytics application, you can select Examples which will give you the necessary code to use.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/system/32/31990_2.png) [@system](https://community.cumulocity.com/u/system)\
**Post date:** [December 3, 2024, 11:55am UTC](https://community.cumulocity.com/t/create-alarm-using-smartrules/1394/6 "2024-12-03T11:55:27Z")

</div>

Closed on December 3, 2024, 11:55am UTC

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