安装influxdb
参考上篇
https://www.jianshu.com/p/f59fea803879
安装Telegraf
下载地址: https://dl.influxdata.com/telegraf/releases/telegraf-1.7.4_windows_amd64.zip
- 解压
- 修改
url
usename
password
等配置
[[outputs.influxdb]]
# The full HTTP or UDP endpoint URL for your InfluxDB instance.
# Multiple urls can be specified but it is assumed that they are part of the same
# cluster, this means that only ONE of the urls will be written to each interval.
# urls = ["udp://127.0.0.1:8089"] # UDP endpoint example
urls = ["http://127.0.0.1:8086"] # required
# The target database for metrics (telegraf will create it if not exists)
database = "telegraf" # required
# Precision of writes, valid values are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# note: using second precision greatly helps InfluxDB compression
precision = "s"
## Write timeout (for the InfluxDB client), formatted as a string.
## If not provided, will default to 5s. 0s means no timeout (not recommended).
timeout = "5s"
username = "njht"
password = "njht"
# Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
# Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512
- 运行
.\telegraf.exe --config .\telegraf.conf
安装Grafana
下载地址: https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.2.3.windows-amd64.zip
参考官方文档 : http://docs.grafana.org/guides/getting_started/
访问 http://localhost:3000/ 默认用户名 admin
密码 admin
- 配置数据源
网友评论