Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add CloudQuery integration (ECOINT-11) #2451

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9677e2f
feat: Add CloudQuery integration
erezrokah Jul 29, 2024
d55b12c
Update cloudquery/README.md
erezrokah Jul 31, 2024
85dbe39
Update cloudquery/README.md
erezrokah Jul 31, 2024
f437ee7
Update cloudquery/README.md
erezrokah Jul 31, 2024
1409aff
Update cloudquery/README.md
erezrokah Jul 31, 2024
0b8b86e
Update cloudquery/README.md
erezrokah Jul 31, 2024
9d6091a
Update cloudquery/README.md
erezrokah Jul 31, 2024
d75e399
Update cloudquery/README.md
erezrokah Jul 31, 2024
f5dce6f
Update cloudquery/README.md
erezrokah Jul 31, 2024
b1bee1d
Update cloudquery/README.md
erezrokah Jul 31, 2024
b76dc88
Update cloudquery/README.md
erezrokah Jul 31, 2024
221794b
Update cloudquery/README.md
erezrokah Jul 31, 2024
c143193
Update cloudquery/README.md
erezrokah Jul 31, 2024
fce9366
Update cloudquery/README.md
erezrokah Jul 31, 2024
3f38830
Update cloudquery/README.md
erezrokah Jul 31, 2024
e174a52
Apply suggestions from code review
erezrokah Jul 31, 2024
939fe20
Update cloudquery/assets/dashboards/cloudquery_syncs_insights.json
erezrokah Jul 31, 2024
087f84a
fix: Links numbering
erezrokah Jul 31, 2024
06a21ee
fix: lists numbering
erezrokah Jul 31, 2024
0f99739
Update cloudquery/README.md
erezrokah Jul 31, 2024
dfeef88
Update cloudquery/README.md
erezrokah Jul 31, 2024
aa7f785
Update cloudquery/README.md
erezrokah Jul 31, 2024
46cd4a1
Update cloudquery/README.md
erezrokah Jul 31, 2024
ac03e1c
chore: Update placeholders, remove registry
erezrokah Jul 31, 2024
cf8f3b1
feat: Update dashboard
erezrokah Aug 14, 2024
14209ec
fix: Update name to "Community"
erezrokah Aug 14, 2024
39c29b3
fix: Update sales email
erezrokah Aug 14, 2024
0cff913
chore: Fix p99 formula
erezrokah Aug 21, 2024
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 .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
/census/ @sankalp04 support@getcensus.com @DataDog/ecosystems-review
/cfssl/ @JeanFred
/cloudnatix/ @junm-cloudnatix @kenji-cloudnatix @somik-cloudnatix @rohit-cloudnatix
/cloudquery/ @cloudquery/cloudquery-framework
/cloudsmith/ @cloudsmith ccarey@cloudsmith.io @DataDog/ecosystems-review
/cloudzero/ @ben-dalton @mattyellen @egafford @alinaquinones
/cockroachdb_dedicated/ @DataDog/saas-integrations
Expand Down
7 changes: 7 additions & 0 deletions cloudquery/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CHANGELOG - CloudQuery

## 1.0.0 / 2024-07-29

***Added***:

* Initial Release
177 changes: 177 additions & 0 deletions cloudquery/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
# CloudQuery

![datadog-integration][1]

## Overview

[CloudQuery][2] is an [open-source][3], high-performance data integration framework built for developers, with support for a wide range of plugins.

CloudQuery extracts, transforms, and loads configuration from cloud APIs to a variety of supported destinations such as databases, data lakes, or streaming platforms for further analysis.

## Setup

### Installation

Install the Datadog Agent version >=6.48.0 or >=7.48.0, which supports ingesting OpenTelemetry traces, metrics, and logs from CloudQuery.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
Alternatively, you can use OpenTelemetry Collector and Datadog Exporter as described below.

### Configuration

CloudQuery supports [OpenTelemetry][5] traces, metrics and logs out of the box.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
There are multiple ways to configure OpenTelemetry with Datadog. We'll show only a subset of them here, and you can find more information [in the Datadog docs][6].
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

- Using an OpenTelemetry collector
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

To configure an OpenTelemetry collector with Datadog, you need to create a configuration file, for example `otel_collector_config.yaml` with the content below:
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

```yaml
receivers:
otlp:
protocols:
http:
endpoint: "0.0.0.0:4318"

processors:
batch/datadog:
send_batch_max_size: 1000
send_batch_size: 100
timeout: 10s

exporters:
datadog:
api:
site: ${env:DATADOG_SITE}
key: ${env:DATADOG_API_KEY}

service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch/datadog]
exporters: [datadog]
traces:
receivers: [otlp]
processors: [batch/datadog]
exporters: [datadog]
logs:
receivers: [otlp]
processors: [batch/datadog]
exporters: [datadog]
```

Then run the collector with the following command (replacing `DATADOG_SITE` and `DATADOG_API_KEY` with your own values):
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

```bash
docker run \
-p 4318:4318 \
-e DATADOG_SITE=$DATADOG_SITE \
-e DATADOG_API_KEY=$DATADOG_API_KEY \
--hostname $(hostname) \
-v $(pwd)/otel_collector_config.yaml:/etc/otelcol-contrib/config.yaml \
otel/opentelemetry-collector-contrib:0.104.0
```

erezrokah marked this conversation as resolved.
Show resolved Hide resolved
> For additional ways to run the collector, please refer to the [official documentation][7].
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

- Direct OTEL Ingestion by the Datadog Agent via a configuration file
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

[Locate][8] your `datadog.yaml` file and add the following configuration:
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

```yaml
otlp_config:
receiver:
protocols:
http:
endpoint: 0.0.0.0:4318
logs:
enabled: true
logs_enabled: true
```

[Restart][9] the Datadog agent for the change to take effect.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

- Direct OTEL ingestion by the Datadog Agent via environment variables
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

Pass the `DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT` environment variable to the Datadog agent with a value of `0.0.0.0:4318`.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
If you're using Docker compose, you can find an example below:
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

```yaml
version: "3.0"
services:
agent:
image: gcr.io/datadoghq/agent:7
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- /proc/:/host/proc/:ro
- /sys/fs/cgroup/:/host/sys/fs/cgroup:ro
environment:
DD_API_KEY: redacted
DD_SITE: "datadoghq.eu"
DD_OTLP_CONFIG_RECEIVER_PROTOCOLS_HTTP_ENDPOINT: "0.0.0.0:4318"
DD_LOGS_ENABLED: "true"
DD_OTLP_CONFIG_LOGS_ENABLED: "true"
ports:
- "4318:4318"
```

[Restart][10] the Datadog agent for the change to take effect.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

> For additional ways to configure the Datadog agent, please refer to the [official documentation][11].
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

Once you have the agent or collector ready, you can specify the endpoint in the source spec:
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

```yaml
kind: source
spec:
name: "aws"
path: "cloudquery/aws"
registry: "cloudquery"
version: "VERSION_SOURCE_AWS"
tables: ["aws_s3_buckets"]
destinations: ["postgresql"]
otel_endpoint: "0.0.0.0:4318"
otel_endpoint_insecure: true
spec:
```

### Validation

Run `cloudquery sync spec.yml`.
Once ingestion starts you should be able to start seeing the traces in Datadog under APM->Traces->Explorer.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
You should see metrics and logs in the respective sections of the Datadog UI as well.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

## Data Collected

### Metrics

The CloudQuery does not include any metrics.

### Service Checks

The CloudQuery does not include any service checks.

### Events

The CloudQuery does not include any events.

## Uninstallation

If you use the OpenTelemetry collector, you can stop it by running `docker stop <container_id>`.
IF you use the Datadog agent, remove the configuration or environment variables you added and [restart][10] the agent.
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
Finally, delete the dashboard from your Datadog account.

## Support

Need help? [Contact us][4].
erezrokah marked this conversation as resolved.
Show resolved Hide resolved

[1]: https://raw.githubusercontent.com/DataDog/integrations-extras/master/cloudquery/images/cloudquery_logo_png_dark_background.png
[2]: https://www.cloudquery.io/
[3]: https://github.com/cloudquery/cloudquery
[4]: https://www.cloudquery.io/pricing
[5]: https://opentelemetry.io/
[6]: https://docs.datadoghq.com/opentelemetry/
[7]: https://docs.datadoghq.com/opentelemetry/collector_exporter/deployment#running-the-collector
[8]: https://docs.datadoghq.com/agent/configuration/agent-configuration-files/
[9]: https://docs.datadoghq.com/agent/configuration/agent-commands/#restart-the-agent
[10]: https://docs.datadoghq.com/agent/configuration/agent-commands/#restart-the-agent
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
[11]: https://docs.datadoghq.com/opentelemetry/interoperability/otlp_ingest_in_the_agent#enabling-otlp-ingestion-on-the-datadog-agent
erezrokah marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading