---
title: "FKM - How to clear triggers that contain specific IDs or keys using a clear key"
description: "Clearing triggers that contain specific IDs or keys in Geneos FKM requires configuring clear keys with regex and capture groups. Modifying the setKey and clearKey values enables automatic clearing of triggers based on matched IDs or keys."
url: "https://docs.itrsgroup.com/docs/faq/geneos/115004019885-geneos-fkm-how-to-clear-triggers-that-contain-specific-ids-or-keys-using-a-clear-key/index.html"
---
## Log entries with IDs

Some log entries contain IDs in them. For example, the log entry below has the ID 104:

```
Thu Sep 8 17:04:21 PST 2022 Error:104 - This is an error log entry
```

If the FKM sampler is configured to capture the above log entry, the dataview would look something like the following:

![Fkm dataview](https://docscdn.itrsgroup.com/faq/images/geneos/115004019885-inline-1-fkm_dataview.png)

## Clear triggers that contain IDs

Clear keys can be configured to automatically clear a trigger. To clear triggers that contain specific IDs or keys, the FKM's setKey (or error key) and clearKey need to be modified [to use regex and a regex capture group](https://docs.itrsgroup.com/docs/geneos/current/collection/fkm-config/index.html#Using_dollar_references_and_capture_groups).

For example, to clear the trigger above:

- The [setKey](https://docs.itrsgroup.com/docs/geneos/current/collection/fkm-config/index.html#fkmTable__keyearchString__key__setKey__match__searchString) value should be **Error:(.\*)-**
- The [clearKey](https://docs.itrsgroup.com/docs/geneos/current/collection/fkm-config/index.html#fkmTable__keys__key__clearKey__match__searchString) value should be **Clear:$1**

Below are the FKM sampler configuration and test log file used in this FAQ:

- Sampler configuration - [FKM\_Clear\_Key\_with\_IDs.xml](/faq/downloads/geneos/115004019885-inline-attachment-1-FKM_Clear_Key_with_IDs.xml)
- Test log file - [test.log](/faq/downloads/geneos/115004019885-inline-attachment-2-test.log)

## Related downloads

- [FKM_Clear_Key_with_IDs.xml](/faq/downloads/geneos/115004019885-6672506859677-FKM_Clear_Key_with_IDs.xml)
- [test.log](/faq/downloads/geneos/115004019885-6672520981917-test.log)


