https://github.com/supporterino/truenas-graphite-to-prometheus
A graphite exporter mapping file for truenas scale >23.10.1 metrics and some example grafana dashboards
https://github.com/supporterino/truenas-graphite-to-prometheus
dashboard grafana grafana-dashboard graphite graphite-exporter metrics prometheus truenas truenas-dashboard truenas-scale
Last synced: 4 months ago
JSON representation
A graphite exporter mapping file for truenas scale >23.10.1 metrics and some example grafana dashboards
- Host: GitHub
- URL: https://github.com/supporterino/truenas-graphite-to-prometheus
- Owner: Supporterino
- License: gpl-3.0
- Created: 2023-12-20T21:26:18.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-15T16:18:45.000Z (5 months ago)
- Last Synced: 2025-05-23T07:36:35.006Z (5 months ago)
- Topics: dashboard, grafana, grafana-dashboard, graphite, graphite-exporter, metrics, prometheus, truenas, truenas-dashboard, truenas-scale
- Language: Dockerfile
- Homepage:
- Size: 275 KB
- Stars: 125
- Watchers: 6
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
Table of Contents
About The Project
- Roadmap
- Supported versions
Getting Started
- Usage
Exposed metrics
- Dashboards
- Contributing
> [!IMPORTANT]
> The 25.04 release dropped a lot of metrics from the default Netdata plugins and migrated to custom python script to collect those metrics. This resulted in a loss of a lot of metrics and incompatibility of the dashboards. Dashboard updates will follow eventually.# About The Project
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.
### Built With
* [graphite_exporter](https://github.com/prometheus/graphite_exporter)
* [grafana](https://github.com/grafana/grafana)
* [TrueNAS Scale 24.10](https://www.truenas.com/truenas-scale/)## Roadmap
- [x] Prepare environment
- [x] Getting basic metrics extraction working
- [x] Documentation
- [x] Start of git project
- [x] Fully detailed list of all metrics
- [x] Multiple dashboards with pictures
- [x] Convert all metrics to prometheus metrics without catch all rules
- [x] Unify all metrics to a similar schema
- [ ] Add UPS metrics (Help wanted!)See the [open issues](https://github.com/Supporterino/truenas-graphite-to-prometheus/issues) for a full list of proposed features (and known issues).
## Supported Versions
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|Exporter Version|Tested|
|---------------|---------|----------------|------|
|23.10.x|:white_check_mark:|`v1.x.x`|:white_check_mark: by [@Supporterino](https://www.github.com/Supporterino)|
|24.04.x|:white_check_mark:|`v1.x.x`|:white_check_mark: by [@Supporterino](https://www.github.com/Supporterino)|
|24.10.x|:white_check_mark:|`v1.x.x`|:white_check_mark: by [@Supporterino](https://www.github.com/Supporterino)|
|25.04.x|:white_check_mark:|`v2.x.x`|:white_check_mark: by [@Supporterino](https://www.github.com/Supporterino)|## Getting Started
### TrueNAS Scale
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:
1. Go to the `Reporting` tab and click the `Exporters` button on the top right.
2. Click `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](https://www.truenas.com/docs/scale/scaleuireference/reportingscreensscale/).
* The prefix for the graphite metrics need to be set to `truenas` for the mapping file to work
* The hostname field should be choosen according to your needs it will later populate the `instance` label of your metrics
* The `update every` field should match your scrape time
* For `Send 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.
### graphite_exporter
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.
### Running exporter inside truenas
Check [TRUENAS.md](TRUENAS.md) to see options to use this exporter directly inside of TrueNAS.
## Usage
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.
## Exposed metrics
See [METRICS.md](METRICS.md) for the exposed metrics by this config.
## Dashboards
The dasboards are located inside the `dashboards` folder and are simple json files which can be imported into grafana und used with the metrics.
## Contributing
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!1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request