- Add Pulsar distribution service (consumes smartcity-* → MQTT + context brokers) - Add Redpanda → InfluxDB consumer (redpanda/consumer.py) - Update FIXED_LOCATIONS with exact OpenRemote asset coordinates - Fix Pulsar topics (underscore: smartcity-traffic not smartcity-traffic) - Fix prometheus.yml endpoints (Redpanda:9644, comment inactive stacks) - Add docker-compose.redpanda-consumer.yml
30 lines
858 B
YAML
30 lines
858 B
YAML
# Redpanda → InfluxDB Consumer
|
|
# Lit les topics Redpanda et écrit dans InfluxDB pour Grafana
|
|
version: "3.8"
|
|
|
|
services:
|
|
redpanda-consumer:
|
|
image: python:3.11-slim
|
|
container_name: smart-city-redpanda-consumer
|
|
restart: unless-stopped
|
|
command: >
|
|
sh -c "pip install requests && python3 /app/consumer.py"
|
|
volumes:
|
|
- ./redpanda/consumer.py:/app/consumer.py:ro
|
|
environment:
|
|
- INFLUX_URL=http://smart-city-influxdb:8086
|
|
- INFLUX_TOKEN=my-super-admin-token
|
|
- INFLUX_ORG=digitribe
|
|
- INFLUX_BUCKET=iot_data
|
|
networks:
|
|
- smartcity-shared
|
|
healthcheck:
|
|
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://smart-city-redpanda:9644/public_metrics')"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
smartcity-shared:
|
|
external: true
|