Configure Azure Cloud Service
Kloudfuse integrates with the Azure cloud service to receive Logs and Metrics through the Datadog agent.
Sending Logs from Azure to Kloudfuse
At a high level, we have to set up three things on Azure to ensure smooth sending and ingestion of log streams:
See Datadog documentation for the following tasks:
Create an Azure Event Hub
Create an Azure Event Hub; see Datadog documentation for Create an Azure Event Hub:
Point your Event Hub Trigger to Kloudfuse
This section is adapted from Point your Event Hub trigger to Datadog, instead pointing to Kloudfuse.
-
On the detail page of your Event Hub trigger function, click Code + Test under the Developer side menu.
-
Add the Kloudfuse-Azure function to the function’s
index.js
file. -
Save the function.
-
Click Integration under the Developer side menu.
-
Click Azure Event Hubs under Trigger and inputs.
-
Confirm the following settings:
- Event hub connection
-
Name of your connection string environment variable
- Event parameter name
-
eventHubMessages
- Event hub name
-
Name of your Event Hub.
- Event hub cardinality
-
Many
- Event hub data type
-
Empty
-
To validate your setup, click Code + Test under the Developer side menu.
-
Click Test/Run and enter a test message in valid JSON format.
-
Find your test message in the Kloudfuse Logs Explorer.
Create Diagnostic Settings
For logs of all resources in Azure that you want to capture, create diagnostic settings:
-
Create diagnostic settings for activity logs.
-
Create diagnostic settings for resource logs.
Sending Metrics from Azure to Kloudfuse
Kloudfuse automatically pulls metrics from your Azure subscriptions, without requiring any additional configuration on the Azure portal.
To configure sending the metrics to Azure, configure your custom-values.yaml
file:
-
Enable
cloud-exporter
in the global section of thecustom-values.yaml
file.global: cloud-exporter: enabled: true
-
Create ClientID, ClientSecret, TenantID, and subscription.
-
Under
kfuse-cloud-exporter
, add the following code, replacing the redacted values with your actual values from Azure portal.Because you can fetch metrics from multiple subscriptions in Azure at the same time, list all your subscriptions in the
subscriptions
section.kfuse-cloud-exporter: azure-metrics-exporter: enabled: true subscriptions: - xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx secrets: AZURE_CLIENT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" AZURE_TENANT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" AZURE_CLIENT_SECRET: "xxxx~xxxxxx"
Alternatively, you can mount authentication information from a
secret
instead of adding it in plain text in thecustom-values.yaml
file. In this case, added the following:kfuse-cloud-exporter: azure-metrics-exporter: enabled: true subscriptions: - xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx extraEnv: - name: AZURE_CLIENT_ID valueFrom: secretKeyRef: key: AZURE_CLIENT_ID name: <Secret-name> - name: AZURE_TENANT_ID valueFrom: secretKeyRef: key: AZURE_TENANT_ID name: <Secret-name> - name: AZURE_CLIENT_SECRET valueFrom: secretKeyRef: key: AZURE_CLIENT_SECRET name: <Secret-name>
The
secret
must contain these key-value pairs:data: AZURE_CLIENT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" AZURE_TENANT_ID: "xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" AZURE_CLIENT_SECRET: "xxxx~xxxxxx"