> ## Documentation Index
> Fetch the complete documentation index at: https://docs.msportal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Liongard Compliance Metrics

> Browse Liongard evaluations, create compliance checks linked to a metric, and let the check status update automatically.

Use this page to link Liongard configuration audit metrics to compliance checks. Linked checks can update their status on their own, so you do not assess those requirements by hand. It is for MSP staff.

## Before you start

* You need an MSP staff account with Compliance settings access. Creating checks also needs Compliance write access and an active subscription.
* Liongard must be connected and its metrics synced. See [Configure Liongard Integration](/user-guides/integrations/enable-liongard-integration). Without it, the page shows **No Liongard Integration** with a link to **Integrations**.
* The Metrics tab covers your tenant's Liongard integration. The company selector at the top of the app does not scope it.

## Browse metrics and systems

<Steps>
  <Step title="Open Metrics">
    Open **Settings > Compliance** and click the **Metrics** tab.
  </Step>

  <Step title="Read the summary">
    The summary at the top shows **Total Metrics**, **Total Devices**, **Passing**, **Failing**, **Warnings**, and **Last sync**.
  </Step>

  <Step title="Choose a view">
    Click **By Metric** to compare one metric across systems, or **By Device** to see the metrics for one system.

    <img src="https://mintcdn.com/msportal/j_Q8RH6nKSGVwcKw/images/product/liongard-metrics-view-controls.png?fit=max&auto=format&n=j_Q8RH6nKSGVwcKw&q=85&s=e2370e9cd8f8b388508286bba4c7c73c" alt="Use By Metric to compare a metric across systems, or By Device to inspect a system." width="462" height="68" data-path="images/product/liongard-metrics-view-controls.png" />
  </Step>

  <Step title="Filter and search">
    In **By Metric**, search the **Metric** column and filter by **Inspector**. In **By Device**, you can also filter by company. Each page holds 50 rows.
  </Step>

  <Step title="Open a row">
    Click a metric to see its devices with their **Value**, **Status**, and **Last Evaluated** time. Click a device to see its metrics.
  </Step>
</Steps>

**By Metric** rows show **Metric**, **Inspector**, **Devices**, **Status**, and **Last Evaluated**. **By Device** rows show **Device**, **Inspector**, **Company**, **Metrics**, **Status**, and **Last Evaluated**. Status counts show Pass, Fail, and Warning. A **Linked** mark means the metric has a compliance check. It does not mean the check passed.

## Create a linked check

<Steps>
  <Step title="Open a metric">
    On the **By Metric** view, click the metric. A metric that already has a check shows **Linked to Compliance** and no create button.
  </Step>

  <Step title="Click Create Compliance Check">
    Click **Create Compliance Check** in the panel. The **Create Compliance Check from Metric** dialog opens.
  </Step>

  <Step title="Fill in the check">
    Review **Check Title** and **Description**, both filled in from the metric. Choose a **Status List** that has a positive and a negative outcome. Optionally choose a **Compliance Group**. Set **Check Type** to **Device**, **Company**, or **Control**. MSPortal suggests Company for tenant-level inspectors such as Microsoft 365, and Device for the rest.
  </Step>

  <Step title="Choose automatic updates">
    **Auto-update from Liongard** starts on. Leave it on, then under **Status Evaluation** choose **Use Liongard status (pass/fail/warning)** or **Custom rules**.
  </Step>

  <Step title="Create the check">
    Click **Create Compliance Check**. MSPortal shows **Compliance check "…" created and linked to Liongard metric**.
  </Step>

  <Step title="Verify">
    Reopen the metric and look for the new check in the compliance library, in its group if you chose one, and in later run results.
  </Step>
</Steps>

Creating a check involves more than one save. If a later step fails, the check or its link can still exist. Look at what exists before you try again, and confirm that your custom rules were stored by checking a few real results.

## Build custom rules

<Steps>
  <Step title="Choose Custom rules">
    In the dialog, set **Status Evaluation** to **Custom rules**.
  </Step>

  <Step title="Add a rule">
    Click **Add Rule**. Choose an **Operator**, type a **Value** when the operator needs one, and choose **Pass** or **Fail** as the result.
  </Step>

  <Step title="Order the rules">
    Rules run from top to bottom, and the first match wins. Enter your most specific rule first. Use the trash icon to remove a rule.
  </Step>

  <Step title="Set the fallback">
    Under **If no rules match**, choose **Pass** or **Fail**. It starts as **Fail**.
  </Step>
</Steps>

| Operators | How they compare |
| - | - |
| Greater than, Greater or equal, Less than, Less or equal | Numbers only. A value that is not a number never matches. |
| Equals, Not equals | Exact text, including upper and lower case. |
| Contains, Does not contain | Text fragments, with case. An empty value matches neither. |
| Is empty, Is not empty | Whether the value is blank after trimming spaces. |

Example, a numeric value of at least 12 passes. Add **Greater or equal** `12` with the result **Pass**, and keep the fallback on **Fail**. A missing or non-numeric value then fails, as it should.

Example, a feature must read Enabled. Add **Equals** `Enabled` as **Pass**, add **Equals** `True` as **Pass**, and keep the fallback on **Fail**.

Check the real value format in Liongard before you rely on an example.

## How automatic updates work

Updates run in the background after each Liongard metrics sync. The sync runs every 3 hours, with a full refresh once a day. Updates are not instant.

* **Native mode:** Liongard **Pass** becomes the positive outcome. **Fail**, **Warning**, an unknown status, or a missing status becomes the negative outcome. Warning does not survive as a third outcome in compliance.
* **Custom rules mode:** the rules above decide pass or fail. If no custom rules are stored, native evaluation is used instead.
* **Device checks:** the sync can create missing device assignments in active runs for the matching company, and it updates assignments that already exist. It writes a note starting **\[Liongard Auto-Sync]** with the result, the value and the evaluation date. That note sits in its own paragraph in **Public Notes**, and each sync replaces that paragraph in place. Any other notes on the assignment are kept. Notes that an earlier sync overwrote are not restored.
* **Company checks:** the sync picks one metric value for the company, the one with the worst native status, and evaluates that value. It does not evaluate every value first.
* **No matching data:** the assignment is skipped. No change does not mean a new pass.
* **Completed runs:** the sync skips them.

Review the linked checks, assignments, and evaluation dates before you complete a run. A Warning in the metric browser and a negative compliance outcome can both be correct for the same evaluation.

## Troubleshooting

| Problem | What to do |
| - | - |
| **No Liongard Integration** | Connect Liongard on the Integrations page. |
| **No metrics data available** | Wait for the next metrics sync, or check the Liongard integration. |
| **Create Compliance Check** is missing | The metric is already linked, or you lack Compliance write access. |
| A check was created but rules or the group are missing | A later save failed. Edit the check in **Settings > Compliance > Checks** and check its group and rules before you retry. |
| A device has no assignment | The device has no linked Liongard system, or no active run exists for its company. |
| A check did not change | There is no matching metric value, or the run is completed. |
| Your own notes are gone from an assignment | An earlier version of the sync overwrote **Public Notes**, and those notes are not restored. Syncs now replace only the **\[Liongard Auto-Sync]** paragraph. Add your notes again. |

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Does a Linked badge mean the check passed?">
    No. It means the metric has a compliance check. Look at the assignment's actual status and evaluation time.
  </Accordion>

  <Accordion title="Does a Liongard Warning stay a Warning in compliance?">
    No. Only Pass is positive. Warning and other statuses become the negative outcome.
  </Accordion>

  <Accordion title="What happens when none of my rules match?">
    The fallback applies. It starts as **Fail**.
  </Accordion>

  <Accordion title="Are Equals and Contains case-sensitive?">
    Yes. For numbers, use the greater and less operators.
  </Accordion>

  <Accordion title="Can the sync add checks to active runs?">
    Yes, for mapped Device checks. It creates missing device assignments in active runs for the matching company.
  </Accordion>

  <Accordion title="Does company-level evaluation test every device against my rules?">
    No. It evaluates the one value with the worst native status for the company.
  </Accordion>

  <Accordion title="Does no data mean the check passes?">
    No. The assignment is skipped, and its status stays as it was.
  </Accordion>

  <Accordion title="Can I trust the success message that all rules saved?">
    No. Verify with real evaluations before you rely on the automation.
  </Accordion>
</AccordionGroup>

## Related guides

* [Configure Liongard Integration](/user-guides/integrations/enable-liongard-integration)
* [Liongard Documentation Visibility](/user-guides/settings/liongard-visibility)
* [Compliance Settings](/user-guides/settings/compliance)
* [Integration Company Mapping](/user-guides/settings/integration-company-mapping)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.