Add community prometheus cookbook

This commit is contained in:
Greg Karekinian
2026-07-03 16:35:26 +02:00
parent ec73dd5b57
commit 4cd6c41254
29 changed files with 1430 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# Migration
This cookbook has been migrated from recipes and attributes to custom resources.
## Removed Entry Points
The `recipes/` and `attributes/` directories were removed. Wrapper cookbooks should call the resources directly and pass property values instead of overriding `node['prometheus']` attributes.
Legacy runit, upstart, and SysV init behavior was removed. Services are managed with Chef's `systemd_unit` resource.
## Resource Mapping
Use these resources in place of the old recipes:
* `prometheus_install` replaces `prometheus::binary`, `prometheus::shell_binary`, and `prometheus::source`.
* `prometheus_config` replaces the Prometheus configuration portion of `prometheus::default`.
* `prometheus_service` replaces `prometheus::service`.
* `prometheus_alertmanager_install` replaces `prometheus::alertmanager_binary` and `prometheus::alertmanager_source`.
* `prometheus_alertmanager_config` replaces the Alertmanager configuration portion of `prometheus::alertmanager`.
* `prometheus_alertmanager_service` replaces the Alertmanager service portion of `prometheus::alertmanager`.
* `prometheus_job` remains available and now uses explicit properties instead of node attributes.
## Example
```ruby
prometheus_install 'prometheus'
prometheus_config 'prometheus'
prometheus_job 'prometheus' do
scrape_interval '15s'
target 'localhost:9090'
end
prometheus_service 'prometheus'
```