https://github.com/puttydotexe/fx_prometheus
Export critical performance metrics with ease in pure Lua!
https://github.com/puttydotexe/fx_prometheus
fivem grafana gta5 monitoring performance prometheus
Last synced: 6 months ago
JSON representation
Export critical performance metrics with ease in pure Lua!
- Host: GitHub
- URL: https://github.com/puttydotexe/fx_prometheus
- Owner: puttydotexe
- License: other
- Created: 2025-03-09T14:34:57.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-03-09T15:11:36.000Z (7 months ago)
- Last Synced: 2025-03-27T05:22:56.002Z (7 months ago)
- Topics: fivem, grafana, gta5, monitoring, performance, prometheus
- Language: Lua
- Homepage: https://p.utty.dev/
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

# fxPrometheus
**Export critical performance metrics with ease in pure Lua!**
This was written in preparation of FiveM commits [#3221](https://github.com/citizenfx/fivem/pull/3221) and [#3162](https://github.com/citizenfx/fivem/pull/3162).> [!CAUTION]
> This project is still a work in progress and not recommended for production use just yet.## Frequently Asked Questions
#### Why did you choose to implement this in pure Lua instead of using the `Prometheus` JS library?
Great question! There are a few key reasons behind my decision to implement the Prometheus types in pure Lua:
- Recently, an artifact build caused scripts using `Node.js` to crash the FX server upon restart, leading to my concerns about the current stability of `Node.js` in this environment.
- `Node.js` has slower execution times when interacting with FiveM natives, which could impact performance.
- Since the codebase is relatively small, maintaining manual type safety wasn't a significant concern.#### How do I use this?
While this project is still a work in progress and not recommended for production use just yet, if you're feeling adventurous and want to try it out, here's how to get started.
1) Download or clone the repository into your FiveM resources folder.
2) Place the `prometheus.cfg` file in your FiveM server's root directory and reference it in your `server.cfg` by adding `exec prometheus.cfg`.
3) Configure any authentication settings in the `prometheus.cfg` file as needed.
4) Add a new Prometheus scrape job using the endpoint `:30120/fx_prometheus`.The data is now ready to be visualised via `Grafana`.
## License
[Attribution-NonCommercial-ShareAlike 4.0 International]([https://choosealicense.com/licenses/mit/](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en))