---
title: "Rules - How to Exclude a Rule target without modifying the Rule"
description: "Excluding a Rule target without modifying the original Rule in Geneos is done by creating a new rule with higher priority and enabling stopFurtherEvaluation. Alternatively, adjust the original rule's target XPath to exclude specific dataitems using the not() function."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004029869-geneos-rules-how-to-exclude-a-rule-target-without-modifying-the-rule/index.html"
---
This can be done by creating another rule with:

1. A [higher rule priority](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#priority) than the original rule, and
2. [stopFurtherEvaluation](https://docs.itrsgroup.com/docs/geneos/current/processing/monitoring-and-alerts/geneos_rulesactionsalerts_tr/index.html#rules--rule--stopfurtherevaluation) setting is enabled (set to true)

## Example

The image below shows that there are 4 FKM samplers:

![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-remote-050-image2016-1-13-9-7-10-ac62bab2dca8.png)

These samplers are being monitored by one rule. The rule monitors the status column for an "OK" value. If the said value is not found, the rule applies a critical severity to the cell.

If there is a need to exclude a sampler from the original rule, in this case, the "Multiline Test" sampler, a new rule with a higher priority needs to be created. Below are the rules:

- Original rule![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-remote-051-image2016-1-13-9-15-29-6ee51d676ec4.png)

- Overriding rule![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-remote-052-image2016-1-13-9-25-28-91e077d2ad59.png)

The Overriding rule has a higher priority (i.e. 1) than the Original rule (i.e. 3) and it only targets the status column of the "Multiline Test" sampler. The said rule's stopFurtherEvaluation setting is also set to true or enabled, as seen below:

![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-remote-053-image2016-1-13-9-31-35-27439d305d80.png)

After saving the Gateway configuration, the cell of the "Multiline Test" sampler is now undefined (from critical):

![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-remote-054-image2016-1-13-9-34-35-03c20cb1a94e.png)

---

### If the rule's target xpath can be adjusted

Modify the target of the original/existing rule, edit the dataitem to be excluded:

![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-34428680814621-image.png)

And put an exclamation point (!) with the dataitem name. In this case, the cpu sampler.

![Geneos - Rules - How to Exclude a Rule target without modifying the Rule](https://docscdn.itrsgroup.com/faq/images/geneos/115004029869-34428680817821-image.png)

The resultant target XPath of the rule will now be:

- `/geneos/gateway/directory/probe/managedEntity/sampler[not(@name="cpu")]/dataview/headlines/cell[(@name="samplingStatus")]`

**not(value)** is a Geneos XPath function explained here:

- <https://docs.itrsgroup.com/docs/geneos/current/processing/gateway-administration/geneos_xpath_ug/index.html>


