mirror of
https://github.com/parkervcp/eggs.git
synced 2024-11-26 16:19:04 +08:00
Merge pull request #1231 from pascal-zarrad/feature/prometheus
Add Prometheus egg
This commit is contained in:
commit
6990ca50fe
@ -229,6 +229,10 @@ If you are reading this it looks like you are looking to add an egg to your serv
|
||||
|
||||
[Xonotic](game_eggs/xonotic/xonotic)
|
||||
|
||||
## [Monitoring](/monitoring/)
|
||||
### Prometheus
|
||||
* [Prometheus](/monitoring/prometheus)
|
||||
|
||||
## [Storage](/storage/)
|
||||
### S3 Storage
|
||||
* [minio](/storage/minio)
|
||||
|
16
monitoring/prometheus/README.md
Normal file
16
monitoring/prometheus/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Prometheus
|
||||
|
||||
### From the [Prometheus](https://github.com/prometheus/prometheus) GitHub repository
|
||||
The Prometheus monitoring system and time series database.
|
||||
|
||||
### Resource consumption
|
||||
As Prometheus is a monitoring software that saves data in a timeseries database, it can take up massive amounts of disk space. Due to Prometheus design, a huge memory consumption is also possible.
|
||||
To get started, a minimum of 3GB RAM and >=2.5GB disk space is recommended.
|
||||
Keep in mind that those numbers can grow pretty quick for large monitored environments!
|
||||
|
||||
### Server Ports
|
||||
Ports required to run the server in a table format.
|
||||
|
||||
| Port | default |
|
||||
|-------------------|---------|
|
||||
| Prometheus server | 9090 |
|
41
monitoring/prometheus/egg-prometheus.json
Normal file
41
monitoring/prometheus/egg-prometheus.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
|
||||
"meta": {
|
||||
"version": "PTDL_v1",
|
||||
"update_url": null
|
||||
},
|
||||
"exported_at": "2021-07-07T19:53:13+02:00",
|
||||
"name": "Prometheus",
|
||||
"author": "p.zarrad@outlook.de",
|
||||
"description": "The Prometheus monitoring system and time series database.",
|
||||
"features": null,
|
||||
"images": [
|
||||
"quay.io\/parkervcp\/pterodactyl-images:base_debian"
|
||||
],
|
||||
"file_denylist": [],
|
||||
"startup": ".\/prometheus --web.listen-address=0.0.0.0:{{SERVER_PORT}} --config.file=\/home\/container\/prometheus.yml --storage.tsdb.path=\/home\/container\/data --web.console.templates=\/home\/container\/consoles --web.console.libraries=\/home\/container\/console_libraries --web.config.file=\/home\/container\/prometheus.web.yml",
|
||||
"config": {
|
||||
"files": "{}",
|
||||
"startup": "{\r\n \"done\": \"Server is ready to receive web requests.\"\r\n}",
|
||||
"logs": "{}",
|
||||
"stop": "^C"
|
||||
},
|
||||
"scripts": {
|
||||
"installation": {
|
||||
"script": "#!\/bin\/sh\r\nshopt -s extglob\r\n# Switch to mounted directory\r\ncd \/mnt\/server\r\n# Update installation system and install curl\r\napt-get update\r\napt-get install -y curl\r\n# Cleanup previous install if available\r\nif [ -f \"prometheus.yml\" ]; then mv prometheus.yml prometheus.yml.bak; fi\r\nif [ -f \"prometheus.web.yml\" ]; then mv prometheus.web.yml prometheus.web.yml.bak; fi\r\nrm -rfv !(data|prometheus.yml.bak|prometheus.web.yml.bak)\r\n# Download and extract Prometheus\r\nversion=${PROMETHEUS_VERSION}\r\nif [ \"$version\" = \"latest\" ]; then version=$(curl --silent \"https:\/\/api.github.com\/repos\/prometheus\/prometheus\/releases\/latest\" | grep '\"tag_name\":' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | cut -c2-); fi\r\ncurl -L https:\/\/github.com\/prometheus\/prometheus\/releases\/download\/v${version}\/prometheus-${version}.linux-amd64.tar.gz --output prometheus.tar.gz\r\ntar -zxvf prometheus.tar.gz\r\nmv -n prometheus-*\/* .\/\r\nrm -rf prometheus.tar.gz prometheus-*\/\r\n# Restore configuration if necessary\r\nif [ -f \"prometheus.yml.bak\" ]; then rm -rf prometheus.yml && mv prometheus.yml.bak prometheus.yml && rm -rf prometheus.yml.bak; fi\r\nif [ -f \"prometheus.web.yml.bak\" ]; then rm -rf prometheus.web.yml && mv prometheus.web.yml.bak prometheus.web.yml && rm -rf prometheus.web.yml.bak; fi\r\n# Create dummy prometheus.web.yml as a placeholder\r\nif [ ! -f \"prometheus.web.yml\" ]; then touch prometheus.web.yml; fi",
|
||||
"container": "debian:buster-slim",
|
||||
"entrypoint": "bash"
|
||||
}
|
||||
},
|
||||
"variables": [
|
||||
{
|
||||
"name": "Prometheus Version",
|
||||
"description": "The version of Prometheus to install. By default the latest version is being installed.",
|
||||
"env_variable": "PROMETHEUS_VERSION",
|
||||
"default_value": "latest",
|
||||
"user_viewable": true,
|
||||
"user_editable": true,
|
||||
"rules": "required|string|max:20"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user