CFEngine is an IT infrastructure automation and Continuous Operations framework that helps engineers, system administrators, and other stakeholders in an IT organization manage IT infrastructure while ensuring service levels and compliance.
You can use an email-based integration to receive alerts from CFEngine in PagerDuty.
From the Configuration menu, select Services.
- On your Services page:
If you are creating a new service for your integration, click +Add New Service.
If you are adding your integration to an existing service, click the name of the service you want to add the integration to. Then click the Integrations tab and click the +New Integration button.
Select your app from the Integration Type menu and enter an Integration Name.
If you are creating a new service for your integration, in General Settings, enter a Name for your new service. Then, in Incident Settings, specify the Escalation Policy, Notification Urgency, and Incident Behavior for your new service.
- Click the Add Service or Add Integration button to save your new integration. You will be redirected to the Integrations page for your service.
- Copy the Integration Email for your new integration:
- You will need to create a policy to detect any change in a specific file. Copy your bundle agent for use in a later step. The first section of your policy should be set to deal with the promise type called ‘files’, and the ‘any’ section indicates that this will apply to all CFEngine managed nodes. Make changes to define the file in question and where it is stored, as well how CFEngine should handle detected changes. In this example, our policy will update every time a change is detected, including differences between versions of the file.
- Next, you will need to create an alert in CFEngine. Visit your Dashboard and click Add, then set the name and severity, and set the condition type to policy.
- Copy the bundle agent name from your policy for use as the identifier, then set the promise status to repaired, so that when there is a change in the file, an alert will be triggered. Check the the box next to Set email notifications for this alert, and copy your PagerDuty service’s integration email address to the Email to field. Finally, select how often you would like to be reminded.
- Save and name your widget (named “PagerDuty” in this example).
To test that your integration is set up correctly, you will need to make a random change to the file being monitored to provoke an alert.
- In CFEngine, select a server and copy the IP address.
- Log in to the node, open the test file, and make a change.
- The change will soon be picked up by CFEngine, and then forwarded to your PagerDuty integration email address. When you visit your PagerDuty service, look for a new alert, and click on ‘details’ to see the full details, as well as links you can click on to be taken back to CFEngine to dig into the details or make changes.
If you are having trouble completing the installation, please contact our support.