Skip to content
Draft
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
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ coverage:
target: 75
flags:
- powerdns_recursor
Prefect:
target: 75
flags:
- prefect
Process:
target: 75
flags:
Expand Down Expand Up @@ -1548,6 +1552,11 @@ flags:
paths:
- powerdns_recursor/datadog_checks/powerdns_recursor
- powerdns_recursor/tests
prefect:
carryforward: true
paths:
- prefect/datadog_checks/prefect
- prefect/tests
process:
carryforward: true
paths:
Expand Down
5 changes: 4 additions & 1 deletion .ddev/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ teamcity = "TeamCity"
win32_event_log = "Windows Event Log"
krakend = "KrakenD"
lustre = "Lustre"
prefect = "Prefect"

[overrides.metrics-prefix]
krakend = "krakend.api."
lustre = "lustre."
prefect = "prefect_server."

[overrides.ci.ddev]
platforms = ["linux", "windows"]
Expand Down Expand Up @@ -207,4 +209,5 @@ __pycache__ = false
# Use manifest-like platforms
[overrides.manifest.platforms]
krakend = ["linux", "windows", "mac_os"]
lustre = ["linux", "windows", "mac_os"]
lustre = ["linux", "windows", "mac_os"]
prefect = ["linux", "windows", "mac_os"]
20 changes: 20 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3029,6 +3029,26 @@ jobs:
minimum-base-package: ${{ inputs.minimum-base-package }}
pytest-args: ${{ inputs.pytest-args }}
secrets: inherit
j8f01991:
uses: ./.github/workflows/test-target.yml
with:
job-name: Prefect
target: prefect
platform: linux
runner: '["ubuntu-22.04"]'
repo: "${{ inputs.repo }}"
context: ${{ inputs.context }}
python-version: "${{ inputs.python-version }}"
latest: ${{ inputs.latest }}
agent-image: "${{ inputs.agent-image }}"
agent-image-py2: "${{ inputs.agent-image-py2 }}"
agent-image-windows: "${{ inputs.agent-image-windows }}"
agent-image-windows-py2: "${{ inputs.agent-image-windows-py2 }}"
test-py2: ${{ inputs.test-py2 }}
test-py3: ${{ inputs.test-py3 }}
minimum-base-package: ${{ inputs.minimum-base-package }}
pytest-args: ${{ inputs.pytest-args }}
secrets: inherit
jaeea6e0:
uses: ./.github/workflows/test-target.yml
with:
Expand Down
4 changes: 4 additions & 0 deletions prefect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# CHANGELOG - Prefect

<!-- towncrier release notes start -->

60 changes: 60 additions & 0 deletions prefect/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Agent Check: Prefect

## Overview

This check monitors [Prefect][1] through the Datadog Agent.

Include a high level overview of what this integration does:
- What does your product do (in 1-2 sentences)?
- What value will customers get from this integration, and why is it valuable to them?
- What specific data will your integration monitor, and what's the value of that data?

## Setup

Follow the instructions below to install and configure this check for an Agent running on a host. For containerized environments, see the [Autodiscovery Integration Templates][3] for guidance on applying these instructions.

### Installation

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

### Configuration

1. Edit the `prefect.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your prefect performance data. See the [sample prefect.d/conf.yaml][4] for all available configuration options.

2. [Restart the Agent][5].

### Validation

[Run the Agent's status subcommand][6] and look for `prefect` under the Checks section.

## Data Collected

### Metrics

See [metadata.csv][7] for a list of metrics provided by this integration.

### Events

The Prefect integration does not include any events.

### Service Checks

The Prefect integration does not include any service checks.

See [service_checks.json][8] for a list of service checks provided by this integration.

## Troubleshooting

Need help? Contact [Datadog support][9].


[1]: **LINK_TO_INTEGRATION_SITE**
[2]: https://app.datadoghq.com/account/settings/agent/latest
[3]: https://docs.datadoghq.com/containers/kubernetes/integrations/
[4]: https://github.com/DataDog/integrations-core/blob/master/prefect/datadog_checks/prefect/data/conf.yaml.example
[5]: https://docs.datadoghq.com/agent/configuration/agent-commands/#start-stop-and-restart-the-agent
[6]: https://docs.datadoghq.com/agent/configuration/agent-commands/#agent-status-and-information
[7]: https://github.com/DataDog/integrations-core/blob/master/prefect/metadata.csv
[8]: https://github.com/DataDog/integrations-core/blob/master/prefect/assets/service_checks.json
[9]: https://docs.datadoghq.com/help/
129 changes: 129 additions & 0 deletions prefect/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Prefect
files:
- name: prefect.yaml
options:
- template: init_config
options:
- template: init_config/default
- template: instances
options:
- name: prefect_url
required: true
description: The URL of the Prefect server.
value:
type: string
example: http://localhost:4200/api
- name: work_pool_names
description: |
A mapping of work pool name patterns to include or exclude, with each entry being a regular expression.

Patterns defined in `exclude` will take precedence in case of overlap.
value:
type: object
example:
include:
- <WORK_POOL_NAME_REGEX_1>
- <WORK_POOL_NAME_REGEX_2>
exclude:
- <WORK_POOL_NAME_REGEX_1>
- <WORK_POOL_NAME_REGEX_2>
properties:
- name: include
type: array
items:
type: string
- name: exclude
type: array
items:
type: string
- name: work_queue_names
description: |
A mapping of work queue name patterns to include or exclude, with each entry being a regular expression.

Patterns defined in `exclude` will take precedence in case of overlap.
value:
type: object
example:
include:
- <WORK_QUEUE_NAME_REGEX_1>
- <WORK_QUEUE_NAME_REGEX_2>
exclude:
- <WORK_QUEUE_NAME_REGEX_1>
- <WORK_QUEUE_NAME_REGEX_2>
properties:
- name: include
type: array
items:
type: string
- name: exclude
type: array
items:
type: string
- name: deployment_names
description: |
A mapping of deployment name patterns to include or exclude, with each entry being a regular expression.

Patterns defined in `exclude` will take precedence in case of overlap.
value:
type: object
example:
include:
- <DEPLOYMENT_NAME_REGEX_1>
- <DEPLOYMENT_NAME_REGEX_2>
exclude:
- <DEPLOYMENT_NAME_REGEX_1>
- <DEPLOYMENT_NAME_REGEX_2>
properties:
- name: include
type: array
items:
type: string
- name: exclude
type: array
items:
type: string
- name: event_names
description: |
A mapping of event name patterns to include or exclude, with each entry being a regular expression.

Patterns defined in `exclude` will take precedence in case of overlap.
value:
type: object
example: &event_names
include:
- <EVENT_NAME_REGEX_1>
- <EVENT_NAME_REGEX_2>
exclude:
- <EVENT_NAME_REGEX_1>
- <EVENT_NAME_REGEX_2>
default:
include:
- ^prefect\.task-run\..*$
- ^prefect\.flow-run\..*$
- ^prefect\.[a-z-]+\.(ready|not-ready)$
properties:
- name: include
type: array
items:
type: string
- name: exclude
type: array
items:
type: string
- name: custom_headers
description: |
Additional HTTP headers to include in all requests to the Prefect API.
value:
type: object
example:
Authorization: "Bearer <YOUR_TOKEN>"
Custom-Header: "CustomValue"

- template: instances/default

- template: logs
example:
- type: file
source: prefect
service: prefect
path: /var/log/prefect/dd_log_1
1 change: 1 addition & 0 deletions prefect/assets/dashboards/prefect_overview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please build an out-of-the-box dashboard for your integration following our best practices here: https://datadoghq.dev/integrations-core/guidelines/dashboards/#best-practices
1 change: 1 addition & 0 deletions prefect/changelog.d/1.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Initial Release
4 changes: 4 additions & 0 deletions prefect/datadog_checks/prefect/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# (C) Datadog, Inc. 2026-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = '0.0.1'
7 changes: 7 additions & 0 deletions prefect/datadog_checks/prefect/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# (C) Datadog, Inc. 2026-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from .__about__ import __version__
from .check import PrefectCheck

__all__ = ['__version__', 'PrefectCheck']
Loading
Loading