Zum Inhalt springen

InfluxDB-Konnektor

Der InfluxDB v2-Konnektor schreibt Zeitreihendaten in InfluxDB-Datenbanken.

Konnektor-Typ: InfluxDb2Writer

{
"type": "InfluxDb2Writer",
"config": {
"endpoint": "http://localhost:8086",
"authToken": "YOUR_INFLUXDB_TOKEN",
"org": "my-organization",
"bucket": "sensor-data",
"measurement": "temperature",
"tags": {
"location": "factory-floor",
"sensor_type": "thermocouple",
"unit": "celsius"
}
}
}
  • endpoint: InfluxDB-Server-URL
  • authToken: InfluxDB-Authentifizierungstoken
  • org: Organisationsname
  • bucket: Ziel-Bucket-Name
  • measurement: Messungsname
  • tags: Statische Tags für alle Datenpunkte (optional)

Eingabe-Payload:

{
"temperature": 25.5,
"humidity": 60.2,
"pressure": 101.3
}

In InfluxDB gespeichert als:

measurement: temperature
tags: location=factory-floor, sensor_type=thermocouple
fields: temperature=25.5, humidity=60.2, pressure=101.3
timestamp: <aktuelle Zeit>
{
"type": "InfluxDb2Writer",
"config": {
"endpoint": "http://influxdb.local:8086",
"authToken": "my-token==",
"org": "manufacturing",
"bucket": "production-metrics",
"measurement": "machine_data",
"tags": {
"machine_id": "CNC-001",
"location": "Building-A",
"department": "machining"
}
}
}
  1. Aussagekräftige Messungsnamen verwenden
  2. Statische Tags für Filterung und Gruppierung hinzufügen
  3. Feldnamen konsistent halten
  4. Geeignete Bucket-Retention-Policies verwenden
  • MongoDB - Dokumentendatenbank-Alternative
  • SQL - Relationale Datenbank-Alternative