---
title: "Rule examples"
description: "Rule examples in Geneos demonstrate how to create and manage Gateway rules using XPath expressions. They provide guidance on triggering actions, comparing values, converting units, and monitoring specific conditions within rules."
url: "https://docs.itrsgroup.com/docs/faq/geneos/4405248133649-geneos-rule-examples/index.html"
---
## Related to

Example rule, rule examples, rule xpath, x-paths, Geneos rules, Gateway rules

## Related Articles

- [Create a rule that can trigger an action for 2 specific periods if the value continues to be above the threshold from the first period to the second period](https://docs.itrsgroup.com/docs/faq/geneos/360023211973-geneos-rules-how-to-create-a-rule-that-can-trigger-an-action-for-2-specific-periods-while-the-value-continues-to-be-above-the-threshold-from-the-first-period-to-the-second-period/index.html)
- [Exclude a Rule target without modifying the Rule](https://docs.itrsgroup.com/docs/faq/geneos/115004029869-geneos-rules-how-to-exclude-a-rule-target-without-modifying-the-rule/index.html)
- [How to calculate the last value of a cell](https://docs.itrsgroup.com/docs/faq/geneos/115004030169-geneos-gateway-how-do-i-calculate-the-last-value-of-a-cell/index.html)
- [Check if the target value is updating](https://docs.itrsgroup.com/docs/faq/geneos/115004029809-geneos-how-does-the-rate-function-work-in-the-gateway-rules/index.html)
- [How to compare dates in a rule](https://docs.itrsgroup.com/docs/faq/geneos/115004029549-geneos-how-to-compare-timestamp-with-the-current-time-in-gateway-rules/index.html)
- [Convert seconds to days, hours and minutes](https://docs.itrsgroup.com/docs/faq/geneos/115004022205-geneos-using-rule-how-do-i-convert-seconds-to-days-hours-and-minutes/index.html)
- [Get the total number of rows returned](https://docs.itrsgroup.com/docs/faq/geneos/115004029789-geneos-how-do-i-get-the-total-number-of-rows-returned-in-a-rule-rowcount/index.html)
- [How to convert the Disk sampler's freeSpace from MB to GB](https://docs.itrsgroup.com/docs/faq/geneos/115004029489-geneos-how-to-convert-disk-sampler-freespace-from-mb-to-gb/index.html)
- [How to include the current date on the libemail.so email subject](https://docs.itrsgroup.com/docs/faq/geneos/115004022805-geneos-how-to-include-current-date-in-email-subject-line-when-using-libemail-so/index.html)
- [How to monitor a log file for X number of errors within a specific timeframe using the FKM sampler](https://docs.itrsgroup.com/docs/faq/geneos/360033986053-geneos-how-to-monitor-a-log-file-for-x-number-of-errors-within-a-specific-timeframe-using-the-fkm-sampler/index.html)
- [How to send an alert when the FKM sampler detects 3 trigger keys within 1 minute](https://docs.itrsgroup.com/docs/faq/geneos/115004020025-geneos-how-to-send-an-alert-if-there-are-3-trigger-keys-detected-within-1-minute-in-a-fkm-sampler/index.html)
- [How to pass Path Alias values to a shell script](https://docs.itrsgroup.com/docs/faq/geneos/115004021765-geneos-how-to-pass-path-alias-values-to-a-shell-script/index.html)
- [Automatically restart a process if it goes down](https://docs.itrsgroup.com/docs/faq/geneos/115004031309-geneos-how-to-automatically-restart-a-process-if-it-goes-down/index.html)
- [Xpath Extras](https://docs.itrsgroup.com/docs/faq/geneos/115004022025-geneos-xpath-quick-guide-with-examples/index.html)


