
[[threshold-group]]
= Create a Threshold Group
:description: How to create a threshold group in {page-component-title} to associate a set of thresholds to a service. Includes list of default threshold groups.

A threshold group associates a set of thresholds to a service (for example, thresholds that apply to all Cisco devices).
{page-component-title} includes the following preconfigured, editable threshold groups:

* mib2
* cisco
* hrstorage
* netsnmp
* juniper-srx
* netsnmp-memory-linux
* netsnmp-memory-nonlinux
* opennms-jvm-jvx

You can edit an existing group through the web UI, or create a new one in `$\{OPENNMS_HOME}/etc/thresholds.xml`.
Once you create a group, you can then define it the UI or in `thresholds.xml`.

This procedure creates a threshold group called "demo_group":

. Open `$\{OPENNMS_HOME}/etc/thresholds.xml` and add the following line of code:
+
[source, xml]
----
<group name="demo_group" rrdRepository="/opt/opennms/share/rrd/snmp/">
</group>
----

. Log in to the web UI.
. Click menu:Administration[Configure Thresholds] in the side menu.
. Or, click menu:Administration[Configure OpenNMS] in the side menu, then click menu:Performance Measurement[Configure Thresholds].
+
The group you created should appear in the UI.

. Click *Edit* next to the group's name.

The following is a sample of how the threshold appears in `thresholds.xml`:

[source, xml]
-----
<group name="demo_group" rrdRepository="/opt/opennms/share/rrd/snmp/"> <1>
  <expression type="high" ds-type="hrStorageIndex" value="90.0"
    rearm="75.0" trigger="2" ds-label="hrStorageDescr"
    filterOperator="or" expression="hrStorageUsed / hrStorageSize * 100.0">
    <resource-filter field="hrStorageType">^\.1\.3\.6\.1\.2\.1\.25\.2\.1\.4$</resource-filter> <2>
  </expression>
</group>
-----
<1> The name of the group and the directory of the stored data.
<2> The details of the threshold, including type, data source type, threshold value, re-arm value, and so on.
