---
title: "Rules: A complete guide"
description: How Hyperglance rules work - the built-in cost and compliance rules, creating your own, schedules, trigger conditions, notifications, automations, exceptions, and importing and exporting rules.
---

[Skip to content](https://support.hyperglance.com/knowledge/rules#main-content)

English

Show submenu for translations

[More support](https://support.hyperglance.com/knowledge/kb-tickets/new?hsLang=en)

![](https://support.hyperglance.com/hs-fs/hubfs/hyperglance.png?width=100&height=75&name=hyperglance.png)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [More support](https://support.hyperglance.com/knowledge/kb-tickets/new)
- [Contact Us](https://www.hyperglance.com/contact/)

[Contact Us](https://www.hyperglance.com/contact/)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Hyperglance Support](https://support.hyperglance.com/knowledge?hsLang=en)
2. [Using Hyperglance](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en)
3. [Search & Rules](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#search-rules)

# Rules: A complete guide

## Saved searches that run on a schedule, alert you when they find something, and can fix it automatically

A rule is a [search](https://support.hyperglance.com/knowledge/advanced-search?hsLang=en) that Hyperglance runs on a schedule. Each time it runs, it lists the resources that match, and it can notify you and run [automations](https://support.hyperglance.com/knowledge/how-do-automations-work?hsLang=en) against them.

Hyperglance comes with hundreds of rules for cost wastage (the ones behind [Wastage](https://support.hyperglance.com/knowledge/wastage?hsLang=en)) and for security and compliance (behind [Frameworks](https://support.hyperglance.com/knowledge/security-compliance-dashboard?hsLang=en)). You can add your own to check your own policies.

- [The Rules page](https://support.hyperglance.com/knowledge/rules#where)
- [A rule's page](https://support.hyperglance.com/knowledge/rules#a-rule-s-page)
- [Creating a rule](https://support.hyperglance.com/knowledge/rules#creating)
    - [Step 1: Search for what the rule should find](https://support.hyperglance.com/knowledge/rules#step-1-search-for-what-the-rule-should-find)
    - [Step 2: Add automations (optional)](https://support.hyperglance.com/knowledge/rules#step-2-add-automations-optional)
    - [Step 3: Save it as a rule](https://support.hyperglance.com/knowledge/rules#step-3-save-it-as-a-rule)
    - [Done: Set up alerting and automation](https://support.hyperglance.com/knowledge/rules#done-set-up-alerting-and-automation)
- [Alerting and automation](https://support.hyperglance.com/knowledge/rules#alerting)
- [Exceptions](https://support.hyperglance.com/knowledge/rules#exceptions)
- [Exporting and importing rules](https://support.hyperglance.com/knowledge/rules#export)
- [Who can create and run rules](https://support.hyperglance.com/knowledge/rules#permissions)

### The Rules page

**Rules** lists every rule, with how many resources it found (out of how many it checked), when it last ran and how often it runs.

![The Rules page](https://support.hyperglance.com/hs-fs/hubfs/kb-assets/ef8f47db4acc-rules-list.png?width=900&name=ef8f47db4acc-rules-list.png)

- Across the top: the **Total** number of rules, how many are **Alerting** (found something), how many are **Stale** (haven't run in 7 days), how many have **Automations**, and how many are **High**, **Medium** and **Low** priority.
- **Search** by name or label. **Filters** narrow the list by whether alerting or automation is on, whether the rule found anything, priority, environment, labels (tags) or service.
- On each row: edit the rule's settings (pencil), run it now (arrows) or delete it (bin). Select several rows to do the same to all of them at once, from the column header. Built-in rules can't be deleted.
- **Create Rule** opens Search to build a new rule. **Import**, **Export** and **Export to CSV** are covered [below](https://support.hyperglance.com/knowledge/rules#export). **Manage Exceptions** lists every [exception](https://support.hyperglance.com/knowledge/rules#exceptions).

### A rule's page

Click a rule's name to open it.

![A rule's page](https://support.hyperglance.com/hs-fs/hubfs/kb-assets/f51acd29bb4f-rule-page.png?width=900&name=f51acd29bb4f-rule-page.png)

- The header shows the number of results, the total cost of the resources found over the last 30 days, when it last ran (click the arrows to run it now) and its schedule. Edit or delete the rule from the icons on the right.
- **Resources by Account** shows which accounts the results are in.
- **Description** says what the rule checks for and why. **Query** shows its search criteria, and its **Modify** button opens the rule in Search to change them.
- **Results** lists the resources found. **Export to CSV** downloads them and **Show in Diagram** shows them in a [diagram](https://support.hyperglance.com/knowledge/hyperglance-diagram-view?hsLang=en).
- **Exclusions** lists the resources excepted from the rule, **Automations** the automations it runs, and **Compliance** the compliance standards and controls it maps to.

### Creating a rule

1

#### Step 1: Search for what the rule should find

Click **Create Rule**, or go to **Search**. Build a search for the resources the rule should find, and run it to check the results. See [Search](https://support.hyperglance.com/knowledge/advanced-search?hsLang=en).

Tip

To change a built-in rule, open it, click **Modify** on its **Query** tab, adjust the query and save it as a new rule. Built-in rules are updated with Hyperglance, so they can't be edited directly.

2

#### Step 2: Add automations (optional)

To act on what the rule finds, click **Add Automation** and choose an action, such as stopping an instance or adding a tag. See [What Automations are included with Hyperglance?](https://support.hyperglance.com/knowledge/what-automations-are-available?hsLang=en)

3

#### Step 3: Save it as a rule

Click **Save As Rule**. Give it a **Name**, **Labels** (the labels categorize rules, and the priority and compliance labels feed the [Frameworks](https://support.hyperglance.com/knowledge/security-compliance-dashboard?hsLang=en) page) and a **Description**.

#### Done: Set up alerting and automation

Choose when it runs and what it does (see [below](https://support.hyperglance.com/knowledge/rules#alerting)), and click **Submit**.

### Alerting and automation

A rule's settings (the pencil icon) control when it runs and what happens when it finds something.

![A rule's alerting and automation settings](https://support.hyperglance.com/hs-fs/hubfs/kb-assets/825698638137-alerting-and-automation.png?width=700&name=825698638137-alerting-and-automation.png)

- **Rule Enabled:** turn the rule off to stop it running.
- **Refresh Schedule:** how often the rule runs, for example once every 5 minutes, or at set times on set days.
- **Event Trigger Conditions:** when to notify and run automations:
    - **Every time** the rule runs, optionally **only if the rule found some results**, or **only when new results are detected**.
    - **When first detected:** once, the first time an issue is found, and optionally **again when the issue resolves**.
- **Automations:** allow the rule to run its automations against your cloud. Automations can be destructive, so use them carefully.
- **Notifications:** Email, Slack, Microsoft Teams, Jira, AWS SNS, Azure Event Grid and ServiceNow. Channels are set up in **Settings › App Integrations** (see [Configuring notifications](https://support.hyperglance.com/knowledge/configuring-notifications?hsLang=en)).

Note

A rule with no notifications or automations still runs, and its results show in Hyperglance.

To change many rules' settings at once, select them on the Rules page and click the pencil in the column header.

### Exceptions

When a rule finds a resource you're happy to leave as it is, add it as an exception, and the rule stops flagging it. Record why in a note, and set a date to review it. The rule's **Exclusions** tab lists its exceptions, and **Manage Exceptions** on the Rules page lists every exception across all rules, including those overdue for review. See [Managing rule exceptions](https://support.hyperglance.com/knowledge/rule-exceptions?hsLang=en).

### Exporting and importing rules

To copy your rules to another Hyperglance deployment, click **Export** on the Rules page, then **Import** the file on the other deployment. **Export to CSV** downloads the list of rules and their results.

### Who can create and run rules

| Role | Can |
| --- | --- |
| `HyperglanceRole_Rules` | Create, edit, delete and run rules, and manage their [exceptions](https://support.hyperglance.com/knowledge/rule-exceptions?hsLang=en). |
| `HyperglanceRole_Rules_RunOnly` | Run existing rules, but not create or change them. |
| `HyperglanceRole_Actions` | Run [automations](https://support.hyperglance.com/knowledge/how-do-automations-work?hsLang=en) from rules and searches. |

Contributors and administrators have all three. Everyone can see rules and their results for the accounts they have access to. See [Role-Based Access Control](https://support.hyperglance.com/knowledge/role-based-access-control-rbac?hsLang=en).

Related guides

- [Search](https://support.hyperglance.com/knowledge/advanced-search?hsLang=en)
- [Exporting rule results to AWS S3 and Azure Blob storage](https://support.hyperglance.com/knowledge/continuous-export-of-rule-results-to-s3-and-blob?hsLang=en)
- [Managing rule exceptions](https://support.hyperglance.com/knowledge/rule-exceptions?hsLang=en)
- [How do Hyperglance Automations work?](https://support.hyperglance.com/knowledge/how-do-automations-work?hsLang=en)

- [Getting Started](https://support.hyperglance.com/knowledge/getting-started?hsLang=en#main-content)

    - [Start Here](https://support.hyperglance.com/knowledge/getting-started?hsLang=en#start-here)
    - [Installation & Deployment Guides](https://support.hyperglance.com/knowledge/getting-started?hsLang=en#installation-deployment-guides)
    - [Cloud Marketplaces](https://support.hyperglance.com/knowledge/getting-started?hsLang=en#cloud-marketplaces)
- [Using Hyperglance](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#main-content)

    - [Dashboards & Reports](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#dashboards-reports)
    - [Cost Analysis](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#cost-analysis)
    - [Cost Optimization](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#cost-optimization)
    - [Cost Allocation & Budgets](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#cost-allocation-budgets)
    - [Infrastructure Diagrams](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#infrastructure-diagrams)
    - [Search & Rules](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#search-rules)
    - [AI & Agents](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#ai-agents)
    - [Automations](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#automations)
    - [Security & Compliance](https://support.hyperglance.com/knowledge/using-hyperglance?hsLang=en#security-compliance)
- [Integrations](https://support.hyperglance.com/knowledge/integrations?hsLang=en#main-content)

    - [AWS](https://support.hyperglance.com/knowledge/integrations?hsLang=en#aws)
    - [Azure](https://support.hyperglance.com/knowledge/integrations?hsLang=en#azure)
    - [GCP](https://support.hyperglance.com/knowledge/integrations?hsLang=en#gcp)
    - [Kubernetes](https://support.hyperglance.com/knowledge/integrations?hsLang=en#kubernetes)
    - [AI Providers](https://support.hyperglance.com/knowledge/integrations?hsLang=en#ai-providers)
    - [Notifications & Ticketing](https://support.hyperglance.com/knowledge/integrations?hsLang=en#notifications-ticketing)
    - [Automations Setup](https://support.hyperglance.com/knowledge/integrations?hsLang=en#automations-setup)
- [System Administration](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#main-content)

    - [Users, Roles & SSO](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#users-roles-sso)
    - [Security & Networking](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#security-networking)
    - [Updates & Maintenance](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#updates-maintenance)
    - [API Keys](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#api-keys)
    - [Legacy Docker-based deployments](https://support.hyperglance.com/knowledge/system-administration?hsLang=en#legacy-docker-based-deployments)
- [Reference](https://support.hyperglance.com/knowledge/reference?hsLang=en#main-content)

    - [Release Notes](https://support.hyperglance.com/knowledge/reference?hsLang=en#release-notes)
    - [Architecture](https://support.hyperglance.com/knowledge/reference?hsLang=en#architecture)
    - [Supported Services](https://support.hyperglance.com/knowledge/reference?hsLang=en#supported-services)
    - [Rule Catalog](https://support.hyperglance.com/knowledge/reference?hsLang=en#rule-catalog)
    - [API Reference](https://support.hyperglance.com/knowledge/reference?hsLang=en#api-reference)
    - [Conformance & Trust](https://support.hyperglance.com/knowledge/reference?hsLang=en#conformance-trust)
- [Pricing & Licensing](https://support.hyperglance.com/knowledge/pricing-licensing?hsLang=en#main-content)

    - [Pricing & Purchasing](https://support.hyperglance.com/knowledge/pricing-licensing?hsLang=en#pricing-purchasing)
    - [Managing Your License](https://support.hyperglance.com/knowledge/pricing-licensing?hsLang=en#managing-your-license)

[![Chill listening crop-3](https://support.hyperglance.com/hs-fs/hubfs/hyperglance.png?width=134&height=24&name=hyperglance.png "Chill listening crop-3")](https://www.hyperglance.com/)

2880 Zanker Road, Suite 203, San Jose, CA 95134

<https://www.linkedin.com/company/hyperglance/>

Copyright © 2025 Hyperglance. All rights reserved.