Skip to content
Open
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ These scripts and tools live in this repo, some scripts/tools have their own REA
| [webhooks](./webhooks/) | N/A | A collection of [Webhooks](https://docs.datadoghq.com/integrations/webhooks/) examples which use the [Datadog API](https://docs.datadoghq.com/api/latest/) to perform different actions |
| [Metrics Without Limits Optimiser](./mwl_optimiser/) | Python | Run through your custom metrics to apply a MWL allowlist of tags and aggregations to a metric based on whether the tags/aggregations have been actively queried on by dashboards, notebooks, monitors, and through the API in the past 30 day and only if the resulting volume of this new config is less than not using MWL. |
| [Postgres Database Monitoring Setup Script](./dbm_setup/) | Python | A script to prepare Postgres databases for use with [Database Monitoring](https://docs.datadoghq.com/database_monitoring/setup_postgres/selfhosted/?tab=postgres15). Discovers all databases on a databse host, creates datadog user, schema, and explain statments, then confirms the database was prepared properly. |
| [Agent Integration Defaults](./agent_integration_defaults/) | Python | A script to collect example configs for core agent integrations in a YAML file. |

## Additional tools
These are some additional tools and scripts written by Datadog.
Expand Down
20 changes: 20 additions & 0 deletions agent_integration_defaults/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.13-slim

# Install dependencies
RUN apt-get update && apt-get install -y git=1:2.39.5-0+deb12u2 && rm -rf /var/lib/apt/lists/*

# Set up the working directory
WORKDIR /app

# Clone the integrations-core repo
RUN git clone https://github.com/DataDog/integrations-core.git

# Set the working directory to the cloned repo
COPY src/requirements.txt /src/requirements.txt
RUN pip3 install --no-cache-dir -r /src/requirements.txt

# Copy the Python script into the container
COPY /src /app

# Run the script
CMD ["python", "collect_configs.py"]
36 changes: 36 additions & 0 deletions agent_integration_defaults/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Agent Integration Defaults
Collects example configs for core agent integrations in a YAML file.

1. Copies the integrations-core repo.
2. Collects the `conf.yaml` or `conf.yaml example` file in each integration directory.
3. Stores the data in a YAML file without comments.
4. Outputs one big YAML file with the name of the integration, path, and default configuration.

## Why?
Configs with comments are useful to see available options, but they can be hard to read. I'm working on something.

## Prerequisites
- Docker
- If you want to build the image to run and update the list.
- yq (optional)

## Usage
```bash
# build
docker build -t datadog-config-exporter .

# run the container and drop the output in this directory
docker run --rm -v $(pwd):/output -u $(id -u):$(id -g) datadog-config-exporter

# check
yq '.nginx' collected_integrations.yaml
```
### Nginx output
```yaml
config:
init_config: null
instances:
- disable_generic_tags: true
nginx_status_url: http://localhost:81/nginx_status/
only_query_enabled_endpoints: true
```
Loading