Follow Us On social
5717 Legacy Dr, Ste 250, Plano TX 75024 info@79consulting.com +1 (469) 606-9656
integrating datadog with mulesoft

Integrating Datadog with Mulesoft

Datadog is a monitoring and analytics tool for information technology (IT) and DevOps teams that can be used to determine performance metrics as well as event monitoring for infrastructure and cloud services. The software can monitor services such as servers, databases, and tools. Datadog monitoring software is available for deployment on-premises or as a software as a service (SaaS).

A Rest application program interface (API) is used to allow Datadog to integrate with numerous services, tools, and programming languages. 

The user interface includes customizable dashboards that can show graphs composed of multiple data sources in real time. Datadog can also send users notifications of performance issues on any set metric, such as compute rates. Users are notified through means such as email, Slack, or PagerDuty.

Integrating Datadog with Mulesoft
Datadog Dashboard

Features

The features that Datadog offers include:

  • Provides an IT/DevOps team with a single view of their infrastructure (including servers, apps, metrics, and other services).
  • Customizable dashboards.
  • Alerts based on critical issues.
  • Support for over 250 product integrations.
  • Automatically collects and analyzes logs, latency, and error rates.
  •  Allows for access to the API.

Steps to implement Datadog for MuleSoft Logs

  • Create a Datadog Account.
  • Create an API key in DataDog.
  • Add a custom HTTP appender in log4j2.xml file in the mule application.
  • Add Datadog appender in Async root level.
  • Deploy mule application to Cloudhub.

Creating Datadog Account

  1. https://us5.datadoghq.com/signup
  2. Enter the required fields and click on Signup.

Creating API Key

On successful creation of Datadog account, create the API key. To do so:

  1. Click on the profile icon in the top right corner.
Integrating Datadog with Mulesoft
  1. Go to Organization Settings .
  2. Create a new Key or copy the existing key.
  3.  To create a new key, click on “+New key”.
Integrating Datadog with Mulesoft
  1. Copy the API key.

Adding custom HTTP Appender

  1. Locate log4j2.xml in your application (src/main/resources/log4j2.xml).
  2. Add a custom HTTP appender along with the existing Rolling file appender.
  3. Paste API Key in log4j2.xml.
Integrating Datadog with Mulesoft

Adding Datadog Appender

  1. Add custom AppenderRef in AsyncRoot.

Deploy mule application to the Cloudhub

  1. Create a flow as follows, as an example.
Integrating Datadog with Mulesoft
  1.  Deploy the application to Cloudhub.
    1.  Right-click on the app > Anypoint Platform > Deploy to Cloudhub.
  2. Upon successful deployment, trigger the flow through the Public Endpoint by passing any query parameter “name”.
Integrating Datadog with Mulesoft
Integrating Datadog with Mulesoft
  1.  Go to Datadog, hover over the logs icon, and click on the search.
Integrating Datadog with Mulesoft
  1. Filter based on time.
Integrating Datadog with Mulesoft
  1. You will be able to see the logs as shown in the screenshot below.
Integrating Datadog with Mulesoft
Post a Comment

Top