Haui,
@Haui@discuss.tchncs.de avatar

Thanks for answering so fast! :)

I’m not deep enough to know if telegraf can do this. It has “plugins” that work okayish. Not a lot to configure. I suppose I could start going into the nitty gritty but I would abolutely love to avoid it. I have like 10+ services running on my server and I can’t go this deep without an IT team and with a job. :)

In this special case, it is uptime I’m after and influxdb throws a table at me that looks like this:

https://discuss.tchncs.de/pictrs/image/59fa28d0-380a-4a3f-a7ce-daed8bc2d9bc.png

then I use this to get the data into grafana:


<span style="color:#323232;">from(bucket: "telegraf")
</span><span style="color:#323232;">  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
</span><span style="color:#323232;">  |> filter(fn: (r) => r["_measurement"] == "system")
</span><span style="color:#323232;">  |> filter(fn: (r) => r["_field"] == "uptime_format")
</span><span style="color:#323232;">  |> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false)
</span><span style="color:#323232;">  |> yield(name: "last")
</span>

And what turns up is this:

https://discuss.tchncs.de/pictrs/image/2f3dc4ad-b493-43c2-a96c-89d80d7a1f96.png

Now, having worked with SQL before, there is a way to just show the “2 days, 18:02” bit instead of two values and without manually selecting the host each time in SQL, I just don’t know how to do it in flux.

I hope this makes sense. Have a good one. :)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines