At 5 minutes intervals, the CFEngine hub gathers information from all of its connected agents about the current state of the system, including the outcome of its runs. All of this information is available to you. In this tutorial we will show how to use the Dashboard to create compliance overview at a glance
How it works
We will use the user policy we previously made in our managing users tutorial, and create dashboard alerts that show the state of this policy. We will create 3 alerts, one that show policy repair, one that show policy kept and one that show policy not kept.
ps. This tutorial will not work unless you have the (How-to tutorial – user management) policy running on your system, so please ensure that.
1. Create a new alert
1. Log into the mission portal of CFEngine, click the Dashboard tab
2. Click on Add
3. Name the alert 'Users compliance' and leave Severity-level at 'medium'
4. Click create new condition and leave Name 'Users compliance'
5. Select Type to 'Policy'
6. Select Filter to 'Bundle', and type 'ensure_users'
7. Type Promise handle to 'ensure_user_setup'
8. Type Promise Status to 'Not kept'
9. Press 'Save button' and give the Widget an descriptive name
You have now created a Dashboard Alert for our user management policy. Whenever the policy is out of compiliance (not kept), we will be notified.
On the first screen below, we see that the alert has been triggered on zeor of our three hosts (0 / 3). This is exactly what we want. There is no promise not kept anywhere, which means we are in compliance.
If you click on the Dash Board tab and go to the front page, you will see that our User Policy has a green check-mark. This means that the ‘not kept’ condition have not occured on any host.
In this tutorial, we have shown how easy it is to prove compliance of any of your policies by using the Dashboard alert functionality.
If you would like to get an overview of whenever CFEngine is making a change to your system, simply create another alert, but this time set the Promise Status to ‘Repaired’. This time you will see an alert whenever CFEngine is repairing a drift, for instance if a user is accidentially deleted.
Please help us improve:
Do you have ideas / feedback to share with us? Send feedback