Graphite report to InfluxDB docker container - how to get reachable static address?

scrool

Cadet
Joined
Apr 30, 2022
Messages
4
tldr; How can I run a docker container TrueNAS reporting can reach on port TCP/2003 even after restarts?

I'm running TrueNAS-SCALE-22.02.3. I would like to:
  1. Send TrueNAS report to remote Graphite server
  2. Graphite server would be provided by InfluxDB running on TrueNAS
  3. Use Grafana to visualize data from InfluxDB
  4. Send measurements from other applications/servers outside of TrueNAS to InfluxDB.
For #2 I have installed official InfluxDB container image in version 1.8.x (1.8.10) under name influxdb and enabled Graphite plugin (INFLUXDB_GRAPHITE_ENABLED=true).

For #1 I set TrueNAS reporting to container's IP address.

For #3 I have installed Grafana from TrueCharts and in Data source I used URL: http://influxdb-ix-chart.ix-influxdb.svc.cluster.local.:8086

This way #1-#3 works as I expected - I got reporting data from TrueNAS and I was able to visualize them in Grafana.

For #4 It seemed TrueCharts External Service might be a way to go:
  1. In InfluxDB Docker Image configuration:
    • section Networking->Configure Add external Interfaces I set IPAM Type: Use Static IP and in Static IP I set IP address within range of my home network (where TrueNAS runs as well)
    • section Port Forwarding->Port Forwarding Configuration I set Container Port: 8086, Node Port: 9086 (since it must be higher than 9000), Protocol: TCP Protocol.
  2. In External Service Configuration:
    • section Networking and Services I set ServiceType: ExternalIP, External Service IP to Static IP address set in InfluxDB Docker Image, Port type: HTTP, Service Port: 9086.
This way I'm able to send measurements to InfluxDB through TrueNAS IP address, port 9086.


The issue I'm having with this configuration is I used dynamic IP address of the container. Anytime the container is (re)started I'd need to update IP address in TrueNAS reporting.

I thought of using External Service for Graphite endpoint as well but for that I'd need to use ports higher than 9000 and it isn't possible to change port 2003 for reporting.

I understand that I won't get support to run custom docker containers in TrueNAS. I'm writing this is here in a hope that it is not TrueCharts specific - I saw e.g. Traefik with docker images (not TrueCharts apps) where the advice was to reach out TrueCharts Discord for support. But I wasn't able to match those guidances - use Traefik with External-Service nor custom-app - to the issue listed above.
 
Top