Supporterino / truenas-graphite-to-prometheus

A graphite exporter mapping file for truenas scale >23.10.1 metrics and some example grafana dashboards
GNU General Public License v3.0
78 stars 12 forks source link

Add k3s metrics mappings for TrueNAS SCALE apps #58

Closed Reanmachine closed 1 month ago

Reanmachine commented 2 months ago

Is your feature request related to a problem? Please describe. When using the graphite exporter on a TrueNAS system with apps running in the k3s cluster there's a tonne of metrics related to the running pods that need to be flattened and labeled.

Describe the solution you'd like A few good metrics with clear labels added to be collected for use in dashboards (or at a minimum to deconstruct the graphite format to avoid bad data in prometheus).

Describe alternatives you've considered I considered filtering them out with prometheus' job configuration but it seems like it could be nice to monitor anyway.

Additional context Good news! I've already submitted a PR (https://github.com/Supporterino/truenas-graphite-to-prometheus/pull/57) that completes this request, but I probably need a little assistance to try to identify the unit for the cpu metric as it's not present in the k3s or TrueNAS documentation. (I also tried looking for the source of the graphite metrics exporter) but was unable to find it).

Supporterino commented 1 month ago

Hi @Reanmachine thanks for your submission. I will take a look at it later and help figuring out what the metric is. Are you interested in also providing a dashboard or should I take a look ?

Reanmachine commented 1 month ago

Hey @Supporterino my thought was first to materialize them into metrics and work on a dashboard in a seperate PR, if you'd prefer them together I can do that too.

I also noticed there's some ups metrics that aren't mapped yet, when I move my NAS down to to my rack and hook it up I can look at building that out as a separate ticket/feature to.

My first order of business was to put a bow on the work I did to capture the applications in the k3s cluster and give back before i dug into dashboard land or the next thing :)

Supporterino commented 1 month ago

@Reanmachine Sounds good. I will merge the k3s metrics shortly. The dashboard in a separate PR is totally fine.

Weird I Will check UPS as well since my UPS is also connected to my TrueNAS. Weird I missed those

Supporterino commented 1 month ago

Release v1.2.0 includes the new mappings. Feel free to ping me once the dashboards are ready :)

The cpu metric is most likely cpu time in ns/ms you can check calculations online since I am not using k3s and determine if it is ns or ms

Supporterino commented 1 month ago

Dashboard and metrics are part of main I close this issue