其他分享
首页 > 其他分享> > influxdb 全家桶运行

influxdb 全家桶运行

作者:互联网

一个简单的demo,集成了telegraf,influxdb,chronograf,kapacitor,nginx,一张来自官方的参考图

组件集成图

环境准备

使用docker-compose

  • docker-compose 文件
version: "3"
services:
    nginx:
      image: nginx
      ports:
      - "8080:8080"
      volumes: 
      - "./index.html:/usr/share/nginx/html/index.html"
      - "./nginx.conf:/etc/nginx/nginx.conf"
    timescaledb:
      image: timescale/timescaledb-postgis:latest-pg10
      ports:
      - "5432:5432"
      environment:
      - "POSTGRES_PASSWORD=dalong"
    influxdb:
      image: influxdb
      ports: 
      - "8086:8086"
    telegraf:
      image: telegraf
      volumes: 
      - "./telegraf.conf:/etc/telegraf/telegraf.conf"
    chronograf:
      image: chronograf
      ports:
      - "8888:8888"
      command: --influxdb-url=http://influxdb:8086
    kapacitor:
      image: kapacitor
      environment:
      - "KAPACITOR_INFLUXDB_0_URLS_0=http://influxdb:8086"
      ports:
      - "9092:9092"
   
[[outputs.influxdb]]
  urls = ["http://influxdb:8086"]
[[inputs.nginx]]
  # An array of Nginx stub_status URI to gather stats.
  urls = ["http://nginx:8080/ngx_status"]
   

运行&&效果

docker-compose up -d
 


参考资料

https://github.com/rongfengliang/outflux-influxdb-demo
https://www.influxdata.com/

标签:telegraf,image,全家,8086,influxdb,nginx,conf,运行
来源: https://www.cnblogs.com/rongfengliang/p/10700859.html