The goal was to get the metrics from the TrueNAS reporting tap inside my normal monitoring stack which consists of prometheus and grafana. In earlier versions of TrueNAS this was possible by utilising the collectd
graphite push service to push the metrics to a graphite_exporter
instance which then converts the metrics to prometheus metrics based on the provided mapping file. In TrueNAS scale 23.10 the reporting system was changed to netdata
and was missing the export feature all along. In 23.10.1
the export mechanism was added back in still lacking the ability to directly export the metrics to promeheus but still in the graphite form. But the metrics format changed due to the tool change.
The goal of this small repository is to provide you with a new graphite_mapping.conf
which is suitable to be used with the new metrics exposed by TrueNAS. This mapping file is in active development and may change regularly in the near future. Besides the raw mapping file a based grafana dashboard nad a quick summary of the required settings in TrueNAS are also included.
See the open issues for a full list of proposed features (and known issues).
Those are the supported and tested versions of TrueNAS in combination with this exporter. Feel free to create a PR with a tested flag if you use a version not mentioned here. | TrueNAS Version | Supported | Tested |
---|---|---|---|
23.10.x | :white_check_mark: | :white_check_mark: by @Supporterino | |
24.04.x | :white_check_mark: | :white_check_mark: by @Supporterino | |
24.10.x | :white_check_mark: | :white_check_mark: by @Supporterino |
TrueNAS SCALE has its own ability to export reporting data to other apps or charts in the Graphite protocol (e.g. Netdata, Prometheus/Grafana).
To create or edit the reporter for use with Prometheus:
Reporting
tab and click the Exporters
button on the top right.Add
to create a new reporter or click the Edit
pencil icon next to the reporter you wish to use.Ensure the following fields are adjusted depending on your target app or chart, as outlined in the TrueNAS instructions.
truenas
for the mapping file to workinstance
label of your metricsupdate every
field should match your scrape timeSend Names Instead Of Ids
, leave it blank and it will default to true
(otherwise it may error out when trying to create the exporter).The destination ip and port need to be set to target your graphite_exporter
I won't cover the setup process of this tool since it was already present for me. Feel free to open a PR with an recommended install method.
You obviously need a running graphite_exporter
which is scrabed by your prometheus instance and is reachable by your TrueNAS instance to push metrics to.
Check TRUENAS.md to see options to use this exporter directly inside of TrueNAS.
To utilise the provided graphite_mapping.conf
replace your existing conf of your graphite_exporter
and restart it. For the grafana dashboards you can simply import the provided json
file.
See METRICS.md for the exposed metrics by this config.
The dasboards are located inside the dashboards
folder and are simple json files which can be imported into grafana und used with the metrics.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)