Hello,
This is my first attempt to setup a Grafana (v5.2.4) dashboard using influxdb (v1.6.2) and telegraf (v1.7.4). I’m having trouble pulling metrics into Grafana from the server running telegraf.
Grafana and influxdb are installed on the same Ubuntu 16.04.5 server. The telegraf service is running on a Windows Hyper-V Server 2016 (core).
Both the Ubuntu server and the Windows Hyper-V server are on the same LAN. I’ve also added the following ports to iptables and Windows firewall, set to allow/accept: 8086 and 3000.
Both servers are able to ping one another through IP as well as hostname.
All services are verified running on their respective servers.
I’ve been monitoring the logs, but nothing stands out as to why I’m not seeing any metrics from the Hyper-V server in Grafana.
I’ve snipped out identifiable info in the logs below.
Apologies for how I’m dumping the log info below. I’m unsure how to use the forum tools to segment the output info below into its own, easily digestible quotes.
Telegraf logs:
2018-09-10T14:59:05Z I! Hang on, flushing any cached metrics before shutdown
2018-09-10T14:59:07Z I! Starting Telegraf v1.7.4
2018-09-10T14:59:07Z I! Loaded inputs: inputs.win_perf_counters
2018-09-10T14:59:07Z I! Loaded aggregators:
2018-09-10T14:59:07Z I! Loaded processors:
2018-09-10T14:59:07Z I! Loaded outputs: influxdb
2018-09-10T14:59:07Z I! Tags enabled: host=“snip”
2018-09-10T14:59:07Z I! Agent Config: Interval:10s, Quiet:false, Hostname:“snip”, Flush Interval:10s
Grafana logs:
t=2018-09-10T10:14:13-0400 lvl=info msg=“HTTP Server Listen” logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket=
t=2018-09-10T10:18:17-0400 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/datasources status=302 remote_addr=snip time_ms=1 size=29 referer=
t=2018-09-10T10:37:10-0400 lvl=eror msg=“Failed to get user with id” logger=context userId=2 error=“User not found”
t=2018-09-10T10:37:10-0400 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/api/datasources/proxy/1/query status=401 remote_addr=snip time_ms=21 size=26 referer=“http://snip:3000/d/EFVUyWoik/snip?panelId=2&fullscreen&edit&orgId=1”
t=2018-09-10T10:59:09-0400 lvl=eror msg=“Failed to get user with id” logger=context userId=2 error=“User not found”
t=2018-09-10T10:59:09-0400 lvl=info msg=“Request Completed” logger=context userId=0 orgId=0 uname= method=GET path=/api/annotations status=401 remote_addr=snip time_ms=3 size=26 referer=“http://snip:3000/d/EFVUyWoik/snip?panelId=2&fullscreen&edit&orgId=1”
Grafana Query Inspector output:
{
“xhrStatus”: “complete”,
“request”: {
“method”: “GET”,
“url”: “api/datasources/proxy/1/query”,
“params”: {
“db”: “GRAFANA”,
“q”: “SELECT mean("value") FROM "win_cpu" WHERE ("host" = ‘snip’) AND time >= now() - 6h GROUP BY time(10s) fill(null)”,
“epoch”: “ms”
},
“data”: null,
“precision”: “ms”
},
“response”: {
“results”: [
{
“statement_id”: 0
}
]
}
}
Active Telegraf outputs:
[[outputs.influxdb]]
urls = [“http://snip:8086”] # required
database = “GRAFANA” # required
precision = “s”
timeout = “5s”
username = “snip”
password = “snip”
InfluxDB setup:
CREATE USER “snip” WITH PASSWORD ‘snip’ WITH ALL PRIVILEGES
GRANT WRITE ON GRAFANA TO snip
Grafana datasource setup: