Jump to content

Running everything under docker, works really well. Telegraf pulls data from various sources (vcenter/ipmi/snmp/pfsense/) and shoves it into influxdb. Grafana pulls from influxdb and makes it look pretty.

 

Assuming you create a folder for all your container volumes and create an environment variable for ${USERDIR} you could copy/paste this and go. With 1 caveat - I run traefik a reverse proxy to give Grafana HTTPS (and other containers), so you would delete the labels and just add ports. Oh yea and repleace ${UID} with whatever user id will have access to your container directory. Normally the first user you create within ubuntu is 1000.

 

My docker-compose.yml

  telegraf:
    image: telegraf:1.10
    container_name: telegraf
    restart: unless-stopped
    volumes:
      - ${USERDIR}/docker/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro

  influxdb:
    image: influxdb
    container_name: influxdb
    restart: unless-stopped
    ports:
      - '8086:8086'
    volumes:
      - ${USERDIR}/docker/influxdb:/var/lib/influxdb

  Grafana:
    image: grafana/grafana:master
    container_name: grafana
    restart: unless-stopped
    volumes:
      - ${USERDIR}/docker/grafana:/var/lib/grafana
    user: ${PUID}
    labels:
      - "traefik.enable=true"
      - "traefik.backend=grafana"
      - "traefik.frontend.rule=Host:grafana.${DOMAINNAME}"
      - "traefik.port=3000"
      - "traefik.docker.network=traefik_proxy"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.SSLHost=mjhnsn.com"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.frameDeny=true"

 

Link to comment
https://linustechtips.com/topic/1048110-grafana-dashboard/#findComment-12424920
Share on other sites

Link to post
Share on other sites

Thats nice, i was looking to implement Grafana in my own environment but since I had to move all my servers are packed up in storage so only have my Wifi network and PC right now. I like your idea of doing power and est power cost reporting. Never thought of doing that one

Spoiler

Desktop: Ryzen9 5950X | ASUS ROG Crosshair VIII Hero (Wifi) | EVGA RTX 3080Ti FTW3 | 32GB (2x16GB) Corsair Dominator Platinum RGB Pro 3600Mhz | EKWB EK-AIO 360D-RGB | EKWB EK-Vardar RGB Fans | 1TB Samsung 980 Pro, 4TB Samsung 980 Pro | Corsair 5000D Airflow | Corsair HX850 Platinum PSU | Asus ROG 42" OLED PG42UQ + LG 32" 32GK850G Monitor | Roccat Vulcan TKL Pro Keyboard | Logitech G Pro X Superlight  | MicroLab Solo 7C Speakers | Audio-Technica ATH-M50xBT2 LE Headphones | TC-Helicon GoXLR | Audio-Technica AT2035 | LTT Desk Mat | XBOX-X Controller | Windows 11 Pro

 

Spoiler

Server: Fractal Design Define R6 | Ryzen 3950x | ASRock X570 Taichi | Asus RTX 4060 Dual OC | 64GB (4x16GB) Corsair Vengeance LPX 3000Mhz | Corsair RM850v2 PSU | Fractal S36 Triple AIO + 4 Additional Venturi 120mm Fans | 8 x 20TB Seagate Exos X22 | 4 x 16TB Seagate Exos X18 | 3 x 2TB Samsung 970 Evo Plus NVMe | LSI 9211-8i HBA

 

Spoiler

NAS: Innovision 4U 24-bay chassis (12GB MiniHD SGIO Backplane) | Intel Core i9-10980xe | EVGA X299 FTW-K | EVGA RTX 2080Ti Super FTW3 | 128GB (8x16GB) Corsair Vengeance LPX 3200Mhz | DEEPCOOL PN1000M PSU| Noctua NH-D12L Chromax Black | 16 x 16TB Seagate Exos X18 | 2 x 2TB Samsung 990 Pro | 2 x 2TB Intel U.2 P4510 | LSI 9305-24i HBA

 

Link to comment
https://linustechtips.com/topic/1048110-grafana-dashboard/#findComment-12426142
Share on other sites

Link to post
Share on other sites

9 hours ago, Jarsky said:

Thats nice, i was looking to implement Grafana in my own environment but since I had to move all my servers are packed up in storage so only have my Wifi network and PC right now. I like your idea of doing power and est power cost reporting. Never thought of doing that one

I'd love to take credit but I downloaded somebody else's dashboard which had the cost, just edited the cost per kwh for where I live. vCenter pulls ipmi data so that's what this dashboard is using. Originally I wanted to pull directly from ipmi using the telegraf plugin - but that doesn't work very well within a container.

 

What I'd love to do is move grafana and a couple other smaller things to AWS ultimately.

Link to comment
https://linustechtips.com/topic/1048110-grafana-dashboard/#findComment-12426912
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×