# How to set alerts on metrics

You can set up alerts on metrics from **each Device view** or from the **Monitoring Dashboards**.

Right now we support alerts on metrics for:

- [Pre-Configured SNMP metrics](https://help.domotz.com/user-guide/pre-configured-snmp-sensors/)
- [OS Monitoring metrics](https://help.domotz.com/user-guide/os-monitoring-feature/)
- [Custom Integration Drivers metrics](https://help.domotz.com/user-guide/custom-driver/)

## Set Alerts on metrics using the Device view

From the device view, you can set up alerts on metrics. You can set-up alerts in the following tabs: SNMP, Drivers (custom drivers), and System (OS monitoring):

Network Management Dashboard Overview

1. At the top of the dashboard, various tabs allow navigation: Info, Connect, Alerts, History, SNMP, TCP, Interfaces, Scripts, and System. Select the SNMP, Scripts, or System tab for options related to these areas.

2. Below the tabs, Network Connectivity Status is displayed. The 'Status' section shows a 30-second check with an ONLINE status. Check the last status change and see it was 1 year ago. The status changes within 24 hours are also shown, currently indicated as 0 times.

3. Under Network Connectivity Performance, view metrics like 'Heartbeat Lost 24h,' 'Latest Ping RTD,' 'Packet Loss,' 'Historical Ping Range,' and 'Ping Device.' The 'Latest Ping RTD' is marked as less than 1 millisecond. Historical Ping Range shows approximately 1ms. Use the 'Ping Now' button for immediate testing.

By hovering a value in the metrics table, you will see a "bell icon" which you can click to create your metric:

Setting an Alert for SNMP Monitoring

1. Navigate to the SNMP Monitoring section.
2. Check the status, authentication, and collector's sample time, which are indicated as "READ," "V2," and "2 Minutes" respectively.
3. In the "Network Traffic Table," identify the interface you want to monitor, such as "Device vmnic0" with alias "01:0.0."
4. Check the "Operational Status" column to ensure it is "up."
5. In the "Speed" column, locate the desired interface's speed (e.g., "1 Gb/s") and find the alert icon next to it.
6. Click on the alert icon to set an alert for changes in the network traffic speed of the selected interface.

To create a metric:

- Give it a name (1)
- Create the alert condition (2)
- Add a value for the condition (3)
- Set a contact channel (4)
- Add the alert profile (5):

Configuring an Alert in ESXi Server

1. In the "Alert Configuration" window, enter "Disk usage greater than 80%" in the "Name" field.
2. Under "If the value is," set the condition to "Is Greater Than" with a value of "80%."
3. Under "Then send an event notice to," select "Syncro" to specify the ticketing system.
4. Click on "add contact channels" to choose how notifications will be sent.
5. Click "Add" to save the alert configuration.

Once you create an alert, a "bell" icon will appear right next to the value:

SNMP Monitoring Interface Overview

1. The interface displays the SNMP Monitoring section with status, authentication, and metrics information.
2. Status is shown as "READ" with an authentication version of "V2."
3. The collector's sample time is set to 2 minutes, and metrics consumption is at 20.
4. Options to add SNMP sensors are available, with a prompt to select a pre-configured template or define an OID sensor.
5. The Network Traffic Table lists monitored SNMP items, showing interfaces, aliases, operational status, and speed.
6. The operational status for each device, such as "vmnic0," indicates “up.”
7. Speeds for the interfaces are displayed, like 1 Gb/s and 10 Gb/s.
8. Bell icons next to the speed values indicate notification or alert settings.

## Set Alerts on metrics on Monitoring Dashboards/Tables

Inside a [Monitoring Dashboard](https://help.domotz.com/user-guide/monitoring-dashboards), please create a [Table](https://help.domotz.com/user-guide/monitoring-dashboards/#htoc-how-to-create-a-monitoring-table)using one template with the metrics you would like to monitor (in this example, we are using the "**Printer Supply**" levels template):

Creating and using a monitoring dashboard.

1. In the left sidebar, select "My First Monitoring Dashboard" under the Dashboards section.
2. To add a new dashboard, click on "Add Dashboard" located at the top of the Dashboards menu.
3. To monitor specific metrics, select "Printer Supply" from the options available on the dashboard. This option currently includes 4 devices with the SNMP protocol.

Once you create the table, hover over the value where you would like to put an alert, and click on the "bell" icon:

Monitoring Dashboard for Printer Supplies

1. The dashboard displays a table titled "Printer Supply" showing monitored devices and the last update time.
2. Columns include Site Name, Device Name, Supply Unit, IP Address, Status, and Supply Level with filtering options.
3. Each row lists printer details such as "St John's High School" with a device "Brother MFC-9340CDW."
4. The Supply Level column indicates percentages and graphical bars for each device, representing remaining supplies. A cursor hovers over the "79%" supply level of the Yellow Toner Cartridge.
5. The top right corner features an "Add Monitoring Table" option for adding more monitoring sections.

Set a Notification for a Metric in a Dashboard

1. Locate the metric row you want to monitor; it displays percentage values, such as "79%."
2. Identify the bell icon next to the metric value.
3. Click the bell icon to activate or modify notifications for changes in the metric.

You will be sent to the "Alert Configuration" window, where you can:

- enter the alert **Name**

- **create the "condition"** to trigger the alert (you can set a threshold or create a logical comparison, etc.)

- **set up the Contact channel** on which you want to receive the notification

Alert Configuration Setup

1. Enter the alert name in the "Name" field, such as "Supply Level equal Seventy Nine."
2. Set the condition by choosing "Equals To" from the dropdown and entering "79" in the adjacent field.
3. Specify the notification recipient by entering an email, for example, "giancarlo@domotz.com," in the "Emails" section.
4. Add additional contact methods by selecting "add contact channels."
5. Use the "Back" button to return to the previous screen or the "Edit" button to apply changes.

Once you define a profile, you can apply the same alert profile to all the other devices or variables in the same column.
In this example, I'm applying my Alert Profile to another printer, the "Supply Level equal SeventyNine."

Setting an Alert for Printer Supply Levels

1. Locate the "Supply Level" column in the Printer Supply table. Click on the graph icon next to the desired printer supply entry.
2. In the "Set an alert on Supply Level" panel that appears, enter a specific value (e.g., 79) in the field provided to set a condition where the supply level is less than this number. Use the configuration settings to finalize the alert setup.

## Editing a Metrics Alert Profile

To edit a metric alert profile, click on a bell icon. Then hover over an alert profile of your choice, and click edit:

Set an Alert for Disk Usage

1. Click the alert icon located below the disk usage percentage in the storage overview.
2. Hover over the "Disk usage greater than 80%" option to reveal the editing option.
3. Click "Edit" to modify the disk usage alert threshold percentage or to adjust other alert settings.

IMPORTANT: Please note that if you edit an alert that has already been applied to one or more devices, the edits which you are making on the alert profile will be inherited on the devices to which the shared alert has been applied.

## Delete a Metric Alert Profile

You can also delete the metric while editing it:

Alert Configuration Setup and Deletion

1. In the "Alert Configuration" section, enter the name "Usage Nenzi Test" in the name field.
2. Set the condition for the alert under "If the value is" with the dropdown "Equals To" and input "32%" as the threshold value.
3. Under "Then send an event notice to," select the ticketing systems where notices will be sent. Options shown are "RepairShopr" and "ConnectWise Manage," each with a remove option beside them.
4. To add more contact channels, use the "+ add contact channels" option.
5. At the bottom, two buttons are available: "Back" and "Apply" for configurations.
6. To delete the alert profile, select "Delete Alert Profile" indicated in red with a trash can icon.

After clicking the above section, you will get this prompt that will show you if that alert profile has been used on any metric/variable:

Confirmation dialog for deleting an alert profile.

1. Title: "Delete Alert Profile."
2. Message: The alert profile is used to monitor one item. Confirmation is required for deletion, emphasizing that the item will no longer be monitored if you proceed.
3. Buttons:
   - "Cancel" to abort the deletion.
   - "Yes, delete it" to confirm and proceed with deleting the alert profile.

## How to add Alerts on Metrics in Bulk

Alerts on Metrics can be added in bulk by using the [Monitoring Tables](https://help.domotz.com/monitoring-management/monitoring-dashboards/).

Once you've created your monitoring table with devices and metrics, you'll see something similar to this, where certain devices might have alerts configured for specific metrics, while others may not:

Linux Disk Partitions Usage Overview

1. The table displays monitored devices' disk partitions, detailing site and device names, with options for sorting and filtering each column.
2. Columns show ID, Type, and IP Address of each device, providing basic identification and network details.
3. The Status column indicates the duration since the devices were last checked, with labels such as "2 months" and "1 year."
4. The Percentage Used column reveals the space utilization of each partition, with varying percentages shown.
5. The Type column classifies the filesystem type, including ext4, ext2, tmpfs, and devtmpfs.
6. Bell icons in the final column indicate alerts for certain partitions to monitor usage closely.

Click on the bell icon right under the column metric you would like to apply your alert to (in this case Percentage Used) and create a new alert or use one already configured:

Setting Up an Alert for Disk Usage Percentage

1. Go to the "Percentage Used" column in your monitoring table.
2. Click the alert icon to configure alerts for disk usage.
3. In the "Alert Configuration" panel, set the name as "Disk Percentage Usage >= 90%".
4. Choose the condition "Is Greater Than Or Equal To" and input the threshold value "90%".
5. Specify the email address "Lorenzo's Email" to receive notifications.
6. Optionally, add more contact channels if needed.
7. Click "Apply" to save the alert settings.

After clicking the button "Apply" you will have applied in bulk the alert on all your devices:

Setting an Alert for Disk Percentage Usage

1. Open the alert configuration interface by selecting "Set an Alert" from the menu.
2. In the alert settings, choose "Disk Percentage Usage >= 90%."
3. Confirm the selection by checking the box next to this option.
4. Review the usage details, which indicate that the alert is applied to 27 out of 27 items.
5. If needed, click "Configure new alert" to set up additional alerts.

As you can see the bell icon is present on all your devices:

Linux Disk Partitions Usage Overview

1. The table displays disk usage data for various Linux partitions across monitored devices.
2. Columns include Site Name, Device Name, Id, Type, IP Address, Status, Percentage Used, and Type.
3. The Percentage Used column shows how much of each partition is utilized.
4. The rightmost column shows alert icons next to some entries, possibly indicating important notifications or warnings about disk usage.
5. The Status column displays the duration since each device was last updated, with indicators like "2 months" and "a year."
6. The Type column indicates the filesystem type, such as ext4, devtmpfs, or tmpfs.

Please note that if the table is filtered the alert will apply only to the visible devices.
