Last active
May 10, 2019 21:59
-
-
Save viq/273118de9e796d676d61540fd315194c to your computer and use it in GitHub Desktop.
Telegraf config for querying nightscout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[global_tags] | |
[agent] | |
interval = "10s" | |
round_interval = true | |
metric_batch_size = 1000 | |
metric_buffer_limit = 10000 | |
collection_jitter = "0s" | |
flush_interval = "10s" | |
flush_jitter = "0s" | |
precision = "" | |
debug = false | |
quiet = false | |
logfile = "" | |
hostname = "" | |
omit_hostname = true | |
[[outputs.influxdb]] | |
[[outputs.file]] | |
files = ["stdout", "/tmp/metrics.out"] | |
data_format = "influx" | |
[[inputs.http]] | |
urls = [ | |
"https://my.ns.url/api/v1/entries.json?count=10", | |
] | |
data_format = "json" | |
json_string_fields = [ | |
"dateString", | |
"sysTime", | |
"device", | |
"direction" | |
] | |
json_name_key = "type" | |
json_time_key = "date" | |
json_time_format = "unix_ms" | |
[inputs.http.tags] | |
person = "batman" | |
[[inputs.http]] | |
name_override = "openaps_suggested" | |
urls = [ | |
"https://my.ns.url/api/v1/devicestatus.json?count=1" | |
] | |
data_format = "json" | |
json_query = "0.openaps.suggested" | |
json_string_fields = [ | |
"created_at", | |
"device", | |
"reason", | |
"deliverAt" | |
] | |
json_time_key = "deliverAt" | |
json_time_format = "2006-01-02T15:04:05Z07:00" | |
fielddrop = [ | |
"predBGs_*" | |
] | |
[inputs.http.tags] | |
person = "batman" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment