Alarms
Cordatus Alarm System enables users to receive notifications through their chosen notification channels when specific conditions, determined by the user, are met. There are two types of alarms in Cordatus:
- Model-Based Alarms: Set during the deployment of the model or pipeline.
- Analytic-Based Alarms: Defined by analytics linked to the application while it is running. This allows the creation of alarms using analytic rules and model labels.
Notification Channels
Cordatus provides notification channels to keep users informed about specific events through alarms. Users can configure these channels to receive alerts through various means, such as email, mobile notifications or Slack.
To add a notification channel, follow these steps:
- Go to the Notification Channels page in the left menu on the Wep App.
- Click the New Channel button, and the Add Channel modal will appear.
- Channel Name: Provide a name for the channel, which you will use in alarm settings.
- Channel Type: Choose the notification method for triggered alarms.
- Email: Cordatus will send email notifications to the specified address.
- Slack: Cordatus will send Slack messages to the provided webhook.
- Click the Save Channel button.
You can refer to the Slack API documentation page to learn how to create webhooks for receiving notifications from Cordatus through Slack.
Now, the notification channel is set up and ready to receive notifications.
Setting an Alarm
Device Alarms
Setting Device Alarms
Cordatus enables users to set alarms for devices, monitoring metrics like CPU/GPU temperature, CPU/GPU usage, or available storage space. When user-defined values are exceeded, Cordatus sends notifications, ensuring users can consistently track the functioning and health status of their devices.
To add a device alarm for your devices, follow these steps:
- Go to the Alarms page from the left menu on the Web App.
- Click on Device Alarms in the left menu.
- Click on the + New Device Alarm button on the top right corner to open the "Add Device Alarm" modal.
- In this modal, enter a name for your alarm in the Alarm Name field.
- Select channels for receiving notifications in the Alarm Channels field. Refer to the Notification Channels section for details.
- In the Alarm Rules section, choose the Rules Operand as And or OR if you're adding multiple rules.
- Choose an event for your alarm from the drop-down menu, such as CPU Utilization, GPU Utilization, RAM Usage, Storage Usage, or Temperature.
- Click Add Single Rule or Add Group Rule to add a single or group rule for your alarm.
- In the added row, choose appropriate options or enter values for your alarm.
- To add another single or group rule, choose the event for your alarm again, and click Add Single Rule or Add Group Rule. The new rule follows the Rules Operand selected in step 6.
- Click Save to complete the alarm-adding process.
Activating & Deactivating Device Alarms
We have defined the alarm, but it needs to be implemented for a device. You can implement the alarm using either the Web App or the Client.
Using Web App
To implement a device alarm using the Web App, follow these steps:
- Go to the Devices page.
- Click on the metrics icon in the Actions column of the desired device to open the metrics modal. Alternatively, access the metrics modal by clicking the metrics button in the upper right corner of the page where you watch the inferenced stream (refer to the Jobs Page for details).
- Go to the Device Alarms tab.
- Toggle the button to activate or deactivate the desired device alarm in the Status column.
- Alternatively, to activate or deactivate multiple alarms simultaneously, check the boxes for the alarms you want to activate or deactivate and click the Activate Alarms or Deactivate Alarmsbutton at the top right.
Using Client
To implement a device alarm using the Client, follow these steps:
- Go to the Alarms page.
- Toggle the button to activate or deactivate the desired device alarm in the Status column.
- Alternatively, to activate or deactivate multiple alarms simultaneously, check the boxes for the alarms you want to activate or deactivate and click the Activate Alarms or Deactivate Alarms button at the top right.
Editing & Deleting Device Alarms
To delete an unused device alarm:
- Go to the Alarms page from the left menu on the Web App.
- Click on Device Alarms in the left menu.
- Click on the gear icon at the end of the desired device alarm's row.
- Select Edit to edit the selected device alarm or Remove to remove it.
Model-Based Alarms
Setting Model-Based Alarms
Model-based alarms are defined independently of jobs and stored separately on the Alarms page. When starting a job, you can choose any model-based alarm that is compatible with the job.
To add a model-based alarm, follow these steps:
- Go to the Alarms > List page from the left menu.
- Ensure that you are on the Inference Alarms tab. All your model-based alarms will be listed on this page.
- Click the New Inference Alarm button. New Inference Alarm modal will appear.
- Alarms can be added in two steps. The first step covers the model and alarm information. Then the second step covers defining the alarm rules.
- Alarm Information
- Name: Give a name to your alarm.
- Alarm Channels: Select from the channels added to the notification channels tab. When the alarm condition is met, the user will receive a notification from the selected channel or channels. Refer to the Notification Channels section for details.
- Alarm Type: Choose the model type to generate the alarm, either pipeline or model.
- Model (Pipeline) Name: Select a model or pipeline to add an alarm. The alarm will be usable for the selected models or pipelines.
- (Optional) Alarm Message: The message will be included in the notification message sent through the notification channel.
- Click the Continue button to proceed to the next step.
- Alarm Rules
- In the Alarm Rules section, choose the Rules Operand as And or OR if adding multiple rules.
- Choose a model or pipeline for your alarm from the drop-down menu.
- Click Add Single Rule or Add Group Rule to add a single or group rule for your alarm.
- In the added row, choose appropriate options or enter values for your alarm. Note that there are two options here for your alarm:
- Frame Based: Triggered when the selected class in a single frame reaches the desired number.
- Time-Based: Triggered if the selected class reaches the desired number within the specified time.
- To add another single or group rule, choose the model for your alarm again, and click Add Single Rule or Add Group Rule. The new rule follows the Rules Operand selected in the first step of step 6.
- Click the Save button to complete the alarm-adding process.
Activating & Deactivating Model-Based Alarms
We have defined the alarm, but it needs to be implemented for a job. You can implement the model-based alarms during the job startup process.
To activate a model-based alarm, follow these steps:
- Open the model deployment modal. Refer to the Jobs section for detailed instructions.
- Before initiating the model, click the Add Alarm button. The Add Alarm section will be displayed.
- Alarms: Choose the alarm you wish to add.
- Cameras: Select the cameras for which the alarm should be applied. The alarm triggers when the specified event occurs in the chosen camera(s). You can choose multiple cameras if needed.
- Click the Add button.
- Once all alarms are set, click Deploy to proceed with the deployment of the model or pipeline.
- You can check the status of your alarm on the Stream Details page of the job. Click the Alarm icon on the right side of the stream window, and toggle the button to activate or deactivate your alarm.
You can set multiple model-based alarms for each job.
Editing & Deleting Model-Based Alarms
To delete an unused Model-Based Alarm:
- Go to the Alarms page from the left menu on the Web App.
- Ensure that you are on the Inference Alarms tab.
- Click on the gear icon at the end of the desired Model-Based Alarm's row.
- Select Edit to edit the selected device alarm or Remove to remove it.
- You can also use the eye icon to view the Model-Based Alarm.
Analytic-Based Alarms
Analytic-based alarms rely on analytics rules added during the job's runtime. They enable setting alarms based on objects' behaviors, such as triggering an alarm when a person crosses a defined virtual line (created using the line crossing analytic rule). Refer to the Analytic Rules section for more information.
To add an analytic-based alarm, follow these steps after drawing analytics on the Add Analytic modal:
- Click the Add Alarm button. The Add Alarm section will appear.
- Alarm Name: Give a name for your alarm.
- Alarm Channels: Select from the channels added to the notification channels tab. When the alarm condition is met, the user will receive a notification from the selected channel or channels. Refer to the Notification Channels section for details.
- (Optional) Alarm Message: The message will be included in the notification message sent through the notification channel.
- In the Alarm Rule section, choose the Rules Operand as And or OR if adding multiple rules.
- Choose an analytic from the drop-down menu for your alarm that was drawn in the previous section.
- Click Add Single Rule or Add Group Rule to add a single or group rule for your alarm.
- In the added row, choose appropriate options or enter values for your alarm. Here, the rules are created as sentences:
- Line Crossing Detection: If [class] crosses [rule name] [number of occurence] times.
- Direction Detection: If [number of occurence] [class] moves towards [rule name] direction.
- ROI Detection: If [class] detected [number of occurence] times within [rule name] ROI.
- To add another single or group rule, choose the analytic for your alarm again, and click Add Single Rule or Add Group Rule. The new rule follows the Rules Operand selected in the first step of step 5.
- Click the Save button to finalize the process of adding the alarm.
- To check and change the status of your alarm, click the Alarm icon on the right side of the stream window, and toggle the button to activate or deactivate your alarm.
For the ROI Filtering alarm to retrigger, the object count in the area must drop below the set value and then exceed it again. To illustrate, if the alarm is set for 5 car detections in an area and an alarm is triggered, the next alarm will only be triggered if the car count in the area falls below 5 and surpasses it again.
Adding an Alarm to an Existing Analytic Rule Later
If you want to add an alarm to an existing analytic rule later, please follow the steps below:
- Go to the Jobs page from the left menu on the Web App.
- Click on the Show Stream Details icon at the end of the desired job's row to go to the Cameras page to view the stream of the selected job.
- Click on the Enlarge icon located at the top right corner of the stream.
- Click on the purple Add Analytic Rule icon at the top.
- Select the analytic type of the analytic rule for which you want to add an alarm from the drop-down menu.
- Click on the analytic rule for which you want to add an alarm under the Added Analytics label.
- Click on the green Add Alarm button at the bottom right. The Add Alarm section will appear.
- Alarm Name: Give a name for your alarm.
- Alarm Channels: Select from the channels added to the notification channels tab. When the alarm condition is met, the user will receive a notification from the selected channel or channels. Refer to the Notification Channels section for details.
- (Optional) Alarm Message: The message will be included in the notification message sent through the notification channel.
- In the Alarm Rule section, choose the Rules Operand as And or OR if adding multiple rules.
- Choose an analytic from the drop-down menu for your alarm that was drawn in the previous section.
- Click Add Single Rule or Add Group Rule to add a single or group rule for your alarm.
- In the added row, choose appropriate options or enter values for your alarm. Here, the rules are created as sentences:
- Line Crossing Detection: If [class] crosses [rule name] [number of occurence] times.
- Direction Detection: If [number of occurence] [class] moves towards [rule name] direction.
- ROI Detection: If [class] detected [number of occurence] times within [rule name] ROI.
- To add another single or group rule, choose the analytic for your alarm again, and click Add Single Rule or Add Group Rule. The new rule follows the Rules Operand selected in the first step of step 5.
- Click the Save button to finalize the process of adding the alarm.
- To check and change the status of your alarm, click the Alarm icon on the right side of the stream window, and toggle the button to activate or deactivate your alarm.
Deleting Analytic-Based Alarms
To delete an Analytic-Based Alarm:
- Go to the Jobs page from the left menu on the Web App.
- Click on the Show Stream Details icon at the end of the desired job's row to go to the Cameras page to view the stream of the selected job.
- Click on the Enlarge icon located at the top right corner of the stream.
- Click on the Alarms icon on the left window to open the alarms tab.
- Click on the gear icon at the end of the desired Analytic-Based alarm's row and click Remove.
- Finally, click on the Yes, delete button to confirm the deletion of the selected alarm.
Alarm Reports
Cordatus meticulously records events that trigger alarms, empowering users with the ability to effortlessly review all recorded events associated with alarms. This functionality allows users to gain insights into specific events, such as identifying individuals who crossed the virtual line in the line crossing rule and triggered the alarm. In essence, Cordatus not only delivers alarms in response to events but also facilitates a comprehensive understanding of those events.
To watch and inspect these videos, follow these steps:
- Go to the Alarms > Reports page.
- Choose the device for which you want to view triggered alarms in the Select Device field.
- Specify the time range for displaying triggered alarms in the Select Time field.
- Click the Get Alarms button. Cordatus will access the Cordatus Client of the selected device to retrieve alarm videos.
- Triggered alarms will be displayed on the right side of the page. Use the filter fields above the alarm section to refine the displayed alarms. Additionally, you can sort the alarms by clicking the Date above the first column.
- To watch a video associated with a triggered alarm, click the Play button at the end of the corresponding alarm row.
- Charts depicting camera, alarm, and model distributions for the device's alarms are located at the bottom of the page. You can interact with the charts by clicking the label of an item to remove or add it back, providing additional insights into the alarms on your device.
Cordatus also allows users to watch alarm events while viewing the inferred stream by pausing the live stream and playing the alarm videos instead. To access alarm events while streaming:
- Open the alarms tab located in the right window.
- Click the play icon under the Actions Column to watch videos associated with the alarms.
- At the top layer of the bar labeled Alarms at the bottom, users can observe the time of the currently displayed event. Once all alarm videos have played, the live stream resumes on the screen.