Provide a way to know which version of Gatus the binay is
Describe the feature request
I've not found any mechanism to know which version of Gatus I'm running. It is important to ensure that I run the latest version, and for rollback purposes.
There are multiple way to provide the information, I'll describe a few here.
In the log
Having the version displayed on startup/in the logs would be a good starting point.
Pros It is private to the person running Gatus. Logs often get exported in different places where they can be acted upon too. Cons On its own it might be limited.
2024/11/18 10:36:51 [StartupMessage] Current version of Gatus is v5.13.1
2024/11/18 10:36:51 [config.LoadConfiguration] Reading configuration from config/config.yaml
2024/11/18 10:36:51 [config.validateAlertingConfig] Alerting is not configured
2024/11/18 10:36:51 [config.validateEndpointsConfig] Validated 1 endpoints
2024/11/18 10:36:51 [config.validateEndpointsConfig] Validated 0 external endpoints
2024/11/18 10:36:51 [controller.Handle] Listening on 0.0.0.0:8080
Example forgejo:
# journalctl -b -u forgejo|grep version|head -n 1
cmd/web.go:111:showWebStartupMessage() [I] Forgejo version: 8.0.3+gitea-1.22.0 built with GNU Make 4.4.1, go1.22.7 : bindata, timetzdata, sqlite, sqlite_unlock_notify
As a cli parameters
Having a dedicated -v or --version or version as cli switch to get the version is useful to check the right binary is at hand without running the configuration.
Pros It is private to the person running Gatus. Can be done without running the server with a configuration Cons There is no cli switches in Gatus right now, so it might be a design decision not to have any.
Example goatcounter:
$ goatcounter version
version=v2.5.0; go=go1.21.5; GOOS=linux; GOARCH=amd64; race=false; cgo=true
In the UI
Having the version in the UI, maybe as a footer could help quickly get the version without login to a server
Pros It is quick to see the version Cons It is not private to the person running Gatus.
Example owncast :
Powered by [Owncast v0.1.3](https://owncast.online/)
Why do you personally want this feature to be implemented?
Having a programmatically sound way to know the version would help me automate my Gatus installs with more confidence
How long have you been using this project?
1 months
Additional information
No response
@UI: see #833
Or add another endpoint /version (maybe it could be added to the /health output?)