Skip to content

Commit

Permalink
Merge branch 'master' into pg_autodiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
edengorevoy authored Jul 6, 2023
2 parents 8e80d54 + c976f72 commit 16428df
Show file tree
Hide file tree
Showing 256 changed files with 32,641 additions and 3,315 deletions.
9 changes: 9 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,10 @@ coverage:
target: 75
flags:
- cert_manager
dcgm:
target: 75
flags:
- dcgm
ddev:
target: 75
flags:
Expand Down Expand Up @@ -807,6 +811,11 @@ flags:
paths:
- datadog_cluster_agent/datadog_checks/datadog_cluster_agent
- datadog_cluster_agent/tests
dcgm:
carryforward: true
paths:
- dcgm/datadog_checks/dcgm
- dcgm/tests
ddev:
carryforward: true
paths:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build-ddev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ jobs:
- name: Install Hatch
run: pip install -U hatch

- name: Install Hatch environment collector plugin
run: pip install -e . --no-deps

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/config/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ integration/datadog_cluster_agent:
- datadog_cluster_agent/**/*
integration/datadog_operator:
- datadog_operator/**/*
integration/dcgm:
- dcgm/**/*
integration/directory:
- directory/**/*
integration/disk:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,25 @@ jobs:
test-py3: ${{ inputs.test-py3 }}
minimum-base-package: ${{ inputs.minimum-base-package }}
secrets: inherit
j69f9754:
uses: ./.github/workflows/test-target.yml
with:
job-name: dcgm
target: dcgm
platform: linux
runner: '["ubuntu-22.04"]'
repo: "${{ inputs.repo }}"
python-version: "${{ inputs.python-version }}"
standard: ${{ inputs.standard }}
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 }}
secrets: inherit
jc8f84c3:
uses: ./.github/workflows/test-target.yml
with:
Expand Down
2 changes: 1 addition & 1 deletion .in-toto/tag.c295cf63.link

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ importlib-metadata,PyPI,Apache-2.0,"Copyright 2017-2019 Jason R. Coombs, Barry W
in-toto,PyPI,Apache-2.0,Copyright 2018 New York University
ipaddress,PyPI,PSF,Copyright (c) 2013 Philipp Hagemeister
jellyfish,PyPI,MIT,Copyright (c) 2015 James Turk
kentik-snmp-profiles,"https://github.com/kentik/snmp-profiles",Apache-2.0,
kubernetes,PyPI,Apache-2.0,Copyright 2014 The Kubernetes Authors.
ldap3,PyPI,LGPL-3.0-only,Copyright 2013 - 2020 Giovanni Cannata
lxml,PyPI,BSD-3-Clause,Copyright (c) 2004 Infrae. All rights reserved.
Expand Down Expand Up @@ -108,4 +109,4 @@ typing,PyPI,PSF,"Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amste
uptime,PyPI,BSD-2-Clause,"Copyright (c) 2012, Koen Crolla"
vertica-python,PyPI,Apache-2.0,"Copyright 2013 Justin Berka, Alex Kim, Siting Ren"
win-inet-pton,PyPI,Unlicense,Ryan Vennell. win-inet-pton is dedicated to the public domain under Unlicense.
wrapt,PyPI,BSD-3-Clause,"Copyright (c) 2013-2022, Graham Dumpleton"
wrapt,PyPI,BSD-3-Clause,"Copyright (c) 2013-2023, Graham Dumpleton"
2 changes: 1 addition & 1 deletion active_directory/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dynamic = [
[project.optional-dependencies]
deps = [
"pywin32==228; sys_platform == 'win32' and python_version < '3.0'",
"pywin32==304; sys_platform == 'win32' and python_version > '3.0'",
"pywin32==306; sys_platform == 'win32' and python_version > '3.0'",
]

[project.urls]
Expand Down
3 changes: 1 addition & 2 deletions amazon_msk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@ dependencies = [
dynamic = [
"version",
]

license = "BSD-3-Clause"

[project.optional-dependencies]
deps = [
"boto3==1.17.112; python_version < '3.0'",
"boto3==1.26.138; python_version > '3.0'",
"boto3==1.27.0; python_version > '3.0'",
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion aspdotnet/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dynamic = [
[project.optional-dependencies]
deps = [
"pywin32==228; sys_platform == 'win32' and python_version < '3.0'",
"pywin32==304; sys_platform == 'win32' and python_version > '3.0'",
"pywin32==306; sys_platform == 'win32' and python_version > '3.0'",
]

[project.urls]
Expand Down
19 changes: 19 additions & 0 deletions boundary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ The Boundary integration does not include any events.

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

### Log collection

1. Collecting logs is disabled by default in the Datadog Agent. Enable it in your `datadog.yaml` file:

```yaml
logs_enabled: true
```
2. To start collecting your Boundary logs, add this configuration block to your `boundary.d/conf.yaml` file:

```yaml
logs:
- type: file
source: boundary
path: /var/log/boundary/events.ndjson
```

Change the `path` parameter value based on your environment. See the [sample `boundary.d/conf.yaml` file][4] for all available configuration options.

## Troubleshooting

Need help? Contact [Datadog support][9].
Expand Down
7 changes: 5 additions & 2 deletions boundary/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
"[Boundary] High active connections": "assets/monitors/active_connections.json"
},
"dashboards": {
"Boundary Overview": "assets/dashboards/boundary_overview.json"
}
"Boundary Overview": "assets/dashboards/boundary_overview.json"
},
"logs": {
"source": "boundary"
}
}
}
3 changes: 2 additions & 1 deletion cloud_foundry_api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ dynamic = [

[project.optional-dependencies]
deps = [
"semver==2.13.0",
"semver==2.13.0; python_version < '3.0'",
"semver==3.0.1; python_version > '3.0'",
]

[project.urls]
Expand Down
5 changes: 5 additions & 0 deletions cockroachdb/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# E2E

## Populate `cockroachdb.sql.*` metrics

You may want to populate the `cockroachdb.sql` metrics for development purposes or for generating sample data such as for a dashboard. Included in the `/tests/docker/` directory is a SQL script, `sql.sh`, that runs various SQL commands on a loop. To run this script, enable the E2E cockroachdb container by doing the following: `POPULATE_METRICS="true" ddev env start cockroachdb py3.9-22.1`
11 changes: 10 additions & 1 deletion cockroachdb/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import pytest
from packaging.version import parse as parse_version

from datadog_checks.dev import docker_run
from datadog_checks.base import is_affirmative
from datadog_checks.dev import docker_run, run_command

from .common import COCKROACHDB_VERSION, HOST, PORT

Expand All @@ -17,10 +18,14 @@
@pytest.fixture(scope='session')
def dd_environment(instance):
env_vars = {'COCKROACHDB_START_COMMAND': _get_start_command()}

conditions = [run_sql] if is_affirmative(os.environ.get("POPULATE_METRICS")) else None

with docker_run(
os.path.join(DOCKER_DIR, 'docker-compose.yaml'),
env_vars=env_vars,
endpoints=instance['openmetrics_endpoint'],
conditions=conditions,
):
yield instance

Expand All @@ -43,3 +48,7 @@ def _get_start_command():
if COCKROACHDB_VERSION != 'latest' and parse_version(COCKROACHDB_VERSION) < parse_version('20.2'):
return 'start'
return 'start-single-node'


def run_sql():
return run_command(['docker', 'exec', '-d', 'cockroachdb', '/bin/bash', '/sql.sh'], capture=True, check=True)
2 changes: 2 additions & 0 deletions cockroachdb/tests/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ services:
ports:
- "26257:26257"
- "8080:8080"
volumes:
- ./sql.sh:/sql.sh
networks:
- roachnet

Expand Down
41 changes: 41 additions & 0 deletions cockroachdb/tests/docker/sql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash
# SQL script that performs SELECT, INSERT, CREATE, DELETE commands on a loop in cockroachdb.
# See /tests/README.md.

echo Wait for servers to be up
sleep 10

HOSTPARAMS="--host cockroachdb --insecure"
SQL="/cockroach/cockroach.sh sql $HOSTPARAMS"

while :
do
$SQL --watch 1m -e """
CREATE DATABASE IF NOT EXISTS places;
CREATE TABLE IF NOT EXISTS cities (
id UUID NOT NULL DEFAULT gen_random_uuid(),
city STRING NOT NULL,
country STRING NOT NULL,
population INT8 NOT NULL,
CONSTRAINT \"primary\" PRIMARY KEY (city ASC, ID ASC)
);
INSERT INTO cities (city, country, population) VALUES ('New York City', 'USA', 8804190), ('Boston', 'USA', 654776), ('Madrid', 'Spain', 6975017), ('Paris', 'France', 2206488);
SELECT * FROM cities;
CREATE INDEX IF NOT EXISTS city_idx ON cities (city DESC);
UPDATE cities SET population=10000000 WHERE city = 'New York City';
INSERT INTO cities (city, country, population) VALUES ('Nowhere', 'USA', 0);
SELECT city FROM cities WHERE population > 0;
DELETE FROM cities WHERE city = 'Nowhere';
DROP TABLE cities;
SELECT * from fake_table;
"""

random_num=$(( $RANDOM % 300 + 60 ))

if [ $(random_num % 2) -gt 275 ]; then
$SQL -e "SELECT * from fake_table;"
fi

echo Sleeping...
sleep random_num
done
8 changes: 4 additions & 4 deletions databricks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ After creating the `datadog-install-driver-workers.sh` script, add the init scri
%python

dbutils.fs.put("dbfs:/<init-script-folder>/datadog-install-driver-workers.sh","""
#!/bin/bash
cat <<EOF > /tmp/start_datadog.sh
#!/bin/bash
date -u +"%Y-%m-%d %H:%M:%S UTC"
echo "Running on the driver? $DB_IS_DRIVER"
echo "Driver ip: $DB_DRIVER_IP"
cat <<EOF > /tmp/start_datadog.sh
#!/bin/bash
if [[ \${DB_IS_DRIVER} = "TRUE" ]]; then
echo "Installing Datadog Agent on the driver (master node)."
Expand Down Expand Up @@ -368,4 +368,4 @@ Need help? Contact [Datadog support][10].
[10]: https://docs.datadoghq.com/help/
[12]: https://docs.databricks.com/notebooks/ipywidgets.html#requirements
[13]: https://github.com/DataDog/datadog-agent/blob/7.43.x/pkg/config/config_template.yaml#L1262-L1266
[14]: https://docs.databricks.com/notebooks/ipywidgets.html
[14]: https://docs.databricks.com/notebooks/ipywidgets.html
40 changes: 21 additions & 19 deletions datadog_checks_base/datadog_checks/base/data/agent_requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ beautifulsoup4==4.12.2; python_version > '3.0'
beautifulsoup4==4.9.3; python_version < '3.0'
binary==1.0.0
boto3==1.17.112; python_version < '3.0'
boto3==1.26.138; python_version > '3.0'
boto3==1.27.0; python_version > '3.0'
boto==2.49.0
botocore==1.20.112; python_version < '3.0'
botocore==1.29.138; python_version > '3.0'
botocore==1.30.0; python_version > '3.0'
cachetools==3.1.1; python_version < '3.0'
cachetools==5.3.0; python_version > '3.0'
cachetools==5.3.1; python_version > '3.0'
clickhouse-cityhash==1.0.2.3; python_version < '3.0'
clickhouse-cityhash==1.0.2.4; python_version > '3.0'
clickhouse-driver==0.2.0; python_version < '3.0'
Expand All @@ -21,8 +21,7 @@ contextlib2==0.6.0.post1; python_version < '3.0'
cryptography==3.3.2; python_version < '3.0'
cryptography==39.0.1; python_version > '3.0'
ddtrace==0.32.2; sys_platform == 'win32' and python_version < '3.0'
ddtrace==0.53.2; sys_platform != 'win32' and python_version < '3.0'
ddtrace==1.11.2; python_version > '3.0'
ddtrace==0.53.2; (sys_platform != 'win32' and (sys_platform != 'darwin' or platform_machine != 'arm64' and python_version > '3.0')) or python_version > '3.0'
dnspython==1.16.0
enum34==1.1.10; python_version < '3.0'
foundationdb==6.3.24; python_version > '3.0'
Expand All @@ -33,7 +32,7 @@ importlib-metadata==2.1.3; python_version < '3.8'
in-toto==1.0.1; python_version > '3.0'
ipaddress==1.0.23; python_version < '3.0'
jaydebeapi==1.2.3
jellyfish==0.11.2; python_version > '3.0'
jellyfish==1.0.0; python_version > '3.0'
jpype1==1.4.1; python_version > '3.0'
kubernetes==18.20.0; python_version < '3.0'
kubernetes==26.1.0; python_version > '3.0'
Expand All @@ -46,14 +45,14 @@ mmh3==4.0.0; python_version > '3.0'
oauthlib==3.1.0; python_version < '3.0'
oauthlib==3.2.2; python_version > '3.0'
openstacksdk==1.0.1; python_version > '3.0'
oracledb==1.3.1; python_version >= '3.8'
orjson==3.8.12; python_version > '3.0'
oracledb==1.3.2; python_version >= '3.8'
orjson==3.9.1; python_version > '3.0'
packaging==23.1; python_version > '3.0'
paramiko==2.12.0; python_version < '3.0'
paramiko==3.1.0; python_version > '3.0'
paramiko==3.2.0; python_version > '3.0'
ply==3.11
prometheus-client==0.12.0; python_version < '3.0'
prometheus-client==0.16.0; python_version > '3.0'
prometheus-client==0.17.0; python_version > '3.0'
protobuf==3.17.3; python_version < '3.0'
protobuf==3.20.2; python_version > '3.0'
psutil==5.9.0
Expand All @@ -64,7 +63,7 @@ pydantic==1.10.8; python_version > '3.0'
pyjwt==1.7.1; python_version < '3.0'
pyjwt==2.7.0; python_version > '3.0'
pymongo[srv]==4.3.3; python_version >= '3.8'
pymqi==1.12.8; sys_platform != 'darwin' or platform_machine != 'arm64'
pymqi==1.12.10; sys_platform != 'darwin' or platform_machine != 'arm64'
pymysql==0.10.1
pyodbc==4.0.32; sys_platform != 'darwin' or platform_machine != 'arm64'
pyro4==4.82; sys_platform == 'win32'
Expand All @@ -73,19 +72,20 @@ pysnmp-mibs==0.1.6
pysnmp==4.4.9
pysocks==1.7.1
python-binary-memcached==0.26.1; sys_platform != 'win32' and python_version < '3.0'
python-binary-memcached==0.31.1; sys_platform != 'win32' and python_version > '3.0'
python-binary-memcached==0.31.2; sys_platform != 'win32' and python_version > '3.0'
python-dateutil==2.8.2
python3-gearman==0.1.0; sys_platform != 'win32' and python_version > '3.0'
pyvmomi==7.0.3
pywin32==228; sys_platform == 'win32' and python_version < '3.0'
pywin32==304; sys_platform == 'win32' and python_version > '3.0'
pywin32==306; sys_platform == 'win32' and python_version > '3.0'
pyyaml==5.4.1; python_version < '3.0'
pyyaml==6.0; python_version > '3.0'
redis==3.5.3; python_version < '3.0'
redis==4.5.4; python_version > '3.0'
redis==4.6.0; python_version > '3.0'
requests-kerberos==0.12.0; python_version < '3.0'
requests-kerberos==0.14.0; python_version > '3.0'
requests-ntlm==1.1.0
requests-ntlm==1.1.0; python_version < '3.0'
requests-ntlm==1.2.0; python_version > '3.0'
requests-oauthlib==1.3.1
requests-toolbelt==1.0.0
requests-unixsocket==0.3.0
Expand All @@ -95,17 +95,19 @@ rethinkdb==2.4.9
scandir==1.10.0
securesystemslib[crypto,pynacl]==0.25.0; python_version > '3.0'
selectors34==1.2; sys_platform == 'win32' and python_version < '3.0'
semver==2.13.0
semver==2.13.0; python_version < '3.0'
semver==3.0.1; python_version > '3.0'
serpent==1.28; sys_platform == 'win32' and python_version < '3.0'
serpent==1.41; sys_platform == 'win32' and python_version > '3.0'
service-identity[idna]==21.1.0
simplejson==3.17.6
simplejson==3.19.1
six==1.16.0
snowflake-connector-python==3.0.4; python_version > '3.0'
supervisor==4.2.5
tuf==2.0.0; python_version > '3.0'
typing==3.10.0.0; python_version < '3.0'
uptime==3.0.1
vertica-python==1.1.1
vertica-python==1.2.0; python_version < '3.0'
vertica-python==1.3.2; python_version > '3.0'
win-inet-pton==1.1.0; sys_platform == 'win32' and python_version < '3.0'
wrapt==1.14.1
wrapt==1.15.0
Loading

0 comments on commit 16428df

Please sign in to comment.