Begin setup in Datadog
Create an API Key in Datadog for Openpath:
Under Organization Settings, click New Key.
2. Enter a name for the key, then click Create Key.
3. Click Copy Key and make a note of it somewhere for future use.
Refer to Datadog’s instructions for adding API Keys
Create a Pipeline for Openpath
Under Pipelines, click Add a new pipeline.
2. Set the name to ‘Openpath’ then click Create.
3. Click Add Processor and define the following:
A. Select Grok Parser for the processor type.
B. Name the processor Openpath.JSON
C. In the Define parsing rules field, paste the following:
autoFilledRule1 \[\{\"ddsource\"\:\s+\"%{data:source}\",\"hostname\"\:\s+\"%{word:hostname}\",\"status\"\:\s+\"%{word:status}\",\"event_type\"\:\s+\"%{data:event}\",\"message\"\:\s+\"%{data::json}\"\}\]
4. Click Create.
4. Click Add Processor again and define the following:
A. Select Status Remapper for the processor type.
B. Name the processor openpath.status
C. In the status attribute field, enter status
D. Click Create.
Refer to Datadog’s instructions for adding a Pipeline
Configure the integration in Openpath
Create rules using the Rules Engine:
Go to https://control.openpath.com/login and log in. To access the European Control Center, please go to https://control.eu.openpath.com/login
Go to Configurations > Rules and click the plus(+) sign in the top right corner to Add a Rule, enter a name and description for the rule, select a Trigger Type, then select an Event
In this example we want the rule to trigger on Entry Unlock events
On the right side of the page, check Use JSON Editor
Paste the following JSON, replacing
DATADOG API KEY HERE
with the API key you created earlier, then click Save
{ "version": "1.0", "trigger": { "properties": { "event": { "enum": [ "entry.unlocked" ] } } }, "requests": [ { "type": "http", "blocking": false, "preRequestDelaySeconds": 0, "httpParams": { "headers": [ "User-Agent: Openpath/Rules Engine", "Content-Type: application/json", "DD-API-KEY: PASTE DATADOG API KEY HERE" ], "method": "post", "url": "https://http-intake.logs.datadoghq.com/api/v2/logs", "body": "[{\"ddsource\": \"Openpath Integration\",\"hostname\": \"{{event.data.acuId}}\",\"status\": \"Info\",\"event_type\": \"{{event.event}}\",\"message\": \"{{json event}}\"}]" } } ] }
Repeat this process for every event you want tracked in Datadog changing the Trigger Type and Event as appropriate.
In the following line:
"body": "[{\"ddsource\": \"Openpath Integration\",\"hostname\": \"{{event.data.acuId}}\",\"status\": \"Info\",\"event_type\": \"{{event.event}}\",\"message\": \"{{json event}}\"}]"
You can change "Info"
to "Warn"
or "Error"
depending on how you want the event represented in Datadog logs.
Once configured, Openpath events will appear in Datadog logs.
Click on an event to view more detail.
0 Comments