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

influxdb2otel receiver #1760

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

influxdb2otel receiver #1760

wants to merge 7 commits into from

Conversation

EHSchmitt4395
Copy link
Contributor

PR Description

Influx receiver that converts to OTEL
Can be used in conjunction with otelcol.exporter.prometheus to further convert influx to prom format.

ex alloy config:

logging {
  level = "debug"
}

// Configure the InfluxDB receiver to collect and forward metrics
otelcol.receiver.influxdb "influxdb_metrics" {
  endpoint = "localhost:8086"  //InfluxDB metrics ingestion endpoint
  output {
    metrics = [otelcol.exporter.prometheus.influx_output.input]  // Forward metrics to Prometheus exporter
  }
}

// Configure the Prometheus exporter to send the metrics to Mimir
otelcol.exporter.prometheus "influx_output" {
  forward_to = [prometheus.remote_write.mimir.receiver]  // Forward metrics to Prometheus remote write (Mimir)
}


prometheus.remote_write "mimir" {
  endpoint {
    url = "https://prometheus-prod-13-prod-us-east-0.grafana.net/api/prom/push"

    basic_auth {
      username = "11111"
      password = "xxxx=="
    }
  }
}

Notes to the Reviewer

plz let me know if issue or something missing with my pr - cheers :)

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated

@EHSchmitt4395 EHSchmitt4395 added the enhancement New feature or request label Sep 25, 2024
Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs look good. Only a couple really minor suggestions.

@clayton-cornell clayton-cornell requested a review from a team September 25, 2024 19:52
EHSchmitt4395 and others added 3 commits September 25, 2024 14:27
…luxdb.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
…luxdb.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
…luxdb.md

Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Copy link
Contributor

@wildum wildum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contribution :) I left a few comments.
The config converter is also missing, have a look at this PR as example:

internal/component/otelcol/receiver/influxdb/influxdb.go Outdated Show resolved Hide resolved
internal/component/all/all.go Outdated Show resolved Hide resolved
go.mod Outdated
@@ -813,9 +813,21 @@ require (
)

require (
github.com/influxdata/influxdb-client-go/v2 v2.14.0
github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver v0.108.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better to put the requirement next to the other otel components requirements to keep them grouped

CHANGELOG.md Outdated Show resolved Hide resolved
@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants