Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .in-toto/tag.47c5a022.link

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions datadog_checks_base/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

<!-- towncrier release notes start -->

## 37.18.0 / 2025-08-29

***Added***:

* Add database Health class for sending DBM health events ([#20739](https://github.com/DataDog/integrations-core/pull/20739))

## 37.17.1 / 2025-08-26

***Fixed***:
Expand Down
2 changes: 1 addition & 1 deletion datadog_checks_base/datadog_checks/base/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = "37.17.1"
__version__ = "37.18.0"
82 changes: 82 additions & 0 deletions datadog_checks_base/datadog_checks/base/utils/db/health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# (C) Datadog, Inc. 2025-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
# This is the base implementation of the Agent Health reporting system.
# It provides a structure for health events and codes that can be extended by specific checks.

from __future__ import annotations

import time
from typing import TYPE_CHECKING

from datadog_checks.base.utils.serialization import json

if TYPE_CHECKING:
from datadog_checks.base import AgentCheck

try:
import datadog_agent
except ImportError:
from datadog_checks.base.stubs import datadog_agent


from enum import Enum


class HealthEvent(Enum):
"""
Enum representing the health events.
"""

INITIALIZATION = 'initialization'


class HealthStatus(Enum):
"""
Enum representing the health statuses for a given event.
"""

OK = 'ok'
WARNING = 'warning'
ERROR = 'error'


class Health:
def __init__(self, check: AgentCheck):
"""
Initialize the HealthCheck instance.

:param check: AgentCheck
The check instance that will be used to submit health events.
"""
self.check = check

def submit_health_event(self, name: HealthEvent, status: HealthStatus, tags: list[str] = None, **kwargs):
"""
Submit a health event to the aggregator.

:param name: HealthEvent
The name of the health event.
:param status: HealthStatus
The health status to submit.
:param tags: list of str
Tags to associate with the health event.
:param kwargs: Additional keyword arguments to include in the event under `data`.
"""
self.check.event_platform_event(
json.dumps(
{
'timestamp': time.time() * 1000,
'version': 1,
'check_id': self.check.check_id,
'category': self.check.__NAMESPACE__ or self.check.__class__.__name__.lower(),
'name': name,
'status': status,
'tags': tags or [],
'ddagentversion': datadog_agent.get_version(),
'ddagenthostname': datadog_agent.get_hostname(),
'data': {**kwargs},
}
),
"dbm-health",
)
1 change: 1 addition & 0 deletions datadog_checks_dev/changelog.d/21209.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix wait_for_health flag win docker_run
2 changes: 2 additions & 0 deletions datadog_checks_dev/datadog_checks/dev/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ def docker_run(
composeFileArgs = {'compose_file': compose_file, 'build': build, 'service_name': service_name}
if capture is not None:
composeFileArgs['capture'] = capture
if waith_for_health:
composeFileArgs['waith_for_health'] = waith_for_health
set_up = ComposeFileUp(**composeFileArgs)
if down is not None:
tear_down = down
Expand Down
10 changes: 2 additions & 8 deletions mac_audit_logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ This integration collects Mac audit logs and sends them to Datadog for analysis,

### Installation

To install the Mac Audit Logs integration, run the following Agent installation command and follow the steps below. For more information, see the [Integration Management][4] documentation.

For Mac, run:
```shell
sudo datadog-agent integration install datadog-mac-audit-logs==1.0.0
```

The Mac Audit Logs check is included in the [Datadog Agent][4] package, so you don't need to install anything else on your Mac.

### Configuration

Expand Down Expand Up @@ -102,7 +96,7 @@ Need help? Contact [Datadog support][8].
[1]: https://www.apple.com/mac/
[2]: https://docs.datadoghq.com/logs/explorer/
[3]: https://www.datadoghq.com/product/cloud-siem/
[4]: https://docs.datadoghq.com/agent/guide/integration-management/?tab=linux#install
[4]: /account/settings/agent/latest
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#agent-status-and-information
[6]: https://github.com/DataDog/integrations-core/blob/master/mac_audit_logs/datadog_checks/mac_audit_logs/data/conf.yaml.example
[7]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
Expand Down
12 changes: 12 additions & 0 deletions openmetrics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@ By default, the integration skips metrics that come without a type on a Promethe
"type": "gauge"
```

If you are collecting metrics through annotations, refer to the following example:

```json
"metrics": [
{
"<NAME_OF_METRIC_WITHOUT_TYPE>": {
"type": "gauge"
}
}
]
```

Remember that metric names can be specified as regular expressions, making it possible to specify the type for a set of metrics without listing all of them individually.

### Errors parsing the OpenMetrics payload with Agent 7.46
Expand Down
1 change: 1 addition & 0 deletions postgres/changelog.d/21193.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add Postgres Health class for submitting Postgres health events
58 changes: 58 additions & 0 deletions postgres/datadog_checks/postgres/health.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# (C) Datadog, Inc. 2025-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations

from typing import TYPE_CHECKING

if TYPE_CHECKING:
from datadog_checks.postgres import PostgreSql

from enum import Enum

from datadog_checks.base.utils.db.health import Health, HealthEvent, HealthStatus


class PostgresHealthEvent(Enum):
"""
Enum representing the health events for PostgreSQL monitoring.
"""

EXPLAIN_PLAN_ERROR = 'explain_plan_error'


class PostgresHealth(Health):
def __init__(self, check: PostgreSql):
# type: (PostgreSql) -> None
"""
Initialize the PostgresHealth instance.

:param check: PostgreSql
The check instance that will be used to submit health events.
"""
super().__init__(check)
self.check = check

def submit_health_event(
self,
name: HealthEvent | PostgresHealthEvent,
status: HealthStatus,
**kwargs,
):
"""
Submit a health event to the aggregator.

:param name: PostgresHealthEvent
The name of the health event.
:param status: HealthStatus
The health status to submit.
:param kwargs: Additional keyword arguments to include in the event.
"""
super().submit_health_event(
name,
status,
# If we have an error parsing the config we may not have tags yet
self.check.tags if hasattr(self.check, 'tags') else [],
database_identifier=self.check.database_identifier,
**kwargs,
)
4 changes: 4 additions & 0 deletions postgres/datadog_checks/postgres/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from datadog_checks.postgres import aws, azure
from datadog_checks.postgres.connection_pool import LRUConnectionPoolManager, PostgresConnectionArgs
from datadog_checks.postgres.discovery import PostgresAutodiscovery
from datadog_checks.postgres.health import PostgresHealth
from datadog_checks.postgres.metadata import PostgresMetadata
from datadog_checks.postgres.metrics_cache import PostgresMetricsCache
from datadog_checks.postgres.relationsmanager import (
Expand Down Expand Up @@ -102,6 +103,7 @@ class PostgreSql(AgentCheck):

def __init__(self, name, init_config, instances):
super(PostgreSql, self).__init__(name, init_config, instances)
self.health = PostgresHealth(self)
self._resolved_hostname = None
self._database_identifier = None
self._agent_hostname = None
Expand All @@ -125,10 +127,12 @@ def __init__(self, name, init_config, instances):
"DEPRECATION NOTICE: The managed_identity option is deprecated and will be removed in a future version."
" Please use the new azure.managed_authentication option instead."
)

self._config = PostgresConfig(self.instance, self.init_config, self)
self.cloud_metadata = self._config.cloud_metadata
self.tags = self._config.tags
self.add_core_tags()

# Keep a copy of the tags without the internal resource tags so they can be used for paths that don't
# go through the agent internal metrics submission processing those tags
self._non_internal_tags = copy.deepcopy(self.tags)
Expand Down
52 changes: 35 additions & 17 deletions proofpoint_on_demand/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,57 @@
# Agent Check: proofpoint_on_demand
# Proofpoint On-Demand

## Overview

This check monitors [proofpoint_on_demand][1].
[Proofpoint On-Demand][1] helps organizations detect, classify, and mitigate email threats in real-time, securing and managing email communications.

This integration ingests the following logs:

- Message Logs: These logs contain detailed information about email traffic.

This integration collects message logs and send them to Datadog for analysis. The logs are parsed and enriched using Datadog's built-in pipeline, which allows for searching and analysis. Dashboards and Cloud SIEM detection rules are included to help monitor message logs and improve security.

## Setup

### Installation
### Get an API key from the Proofpoint On-Demand Portal

1. Log in to the Proofpoint Admin portal.
2. Go to **Settings > API Key Management**.
3. Under **PoD Logging**, click **Create New** to generate a new API key.
4. Enter a unique name for the API key.
5. Copy **Cluster ID**.
6. Click **Generate Key**.
7. After generating the key, select **View Details** from the menu of the new API key.
8. Copy the generated API key.

The Proofpoint On-Demand check is included in the [Datadog Agent][2] package.
No additional installation is needed on your server.

### Configuration
### Connect your Proofpoint On-Demand Account to Datadog

!!! Add list of steps to set up this integration !!!
1. Add your Proofpoint On-Demand credentials.

### Validation
| Parameters | Description |
| ------------------------------------- | ------------------------------------------------------------ |
| Cluster ID | The Cluster ID for your Proofpoint On-Demand account |
| API key | The API key for your Proofpoint On-Demand account |

!!! Add steps to validate integration is functioning as expected !!!
2. Click the **Save** button to save your settings.

## Data Collected

### Logs

The Proofpoint On-Demand integration collects and forwards message logs to Datadog.

### Metrics

Proofpoint On-Demand does not include any metrics.
The Proofpoint On-Demand integration does not include any metrics.

### Events

Proofpoint On-Demand does not include any events.

## Troubleshooting
The Proofpoint On-Demand integration does not include any events.

Need help? Contact [Datadog support][3].
## Support

[1]: **LINK_TO_INTEGRATION_SITE**
[2]: https://app.datadoghq.com/account/settings/agent/latest
[3]: https://docs.datadoghq.com/help/
Need help? Contact [Datadog support][2].

[1]: https://www.proofpoint.com/us/products/email-security-and-protection/email-protection
[2]: https://docs.datadoghq.com/help/
Loading
Loading