chef-prometheus
chef-prometheus copied to clipboard
Multiple Prometheus instances
I have a usecase where I want multiple prometheus instances on the same machine. With the recent support of federation, this will become more and more common.
How do you think this cookbook should support that ? It's in theory possible to create a wrapper, but a lot would have to be wrapped, mostly anything that refers to service[prometheus]
Prosition:
- In init scripts, change name=prometheus to name=$(basename $0) (https://github.com/iksaif/chef-prometheus/commit/90f58ec2ce59c90e9219a4d938e4f996d5ac8abd)
- Change service[prometheus] to "service[prometheus" + instance "]" (defaults to "")
- Also prepend 'instance' to the multiple paths that may be affected.
What do you think ? Is there a more idiomatic way to do that with chef ?
I love these ideas. Further thoughts - you'll want to update the tests to cover the additional instances as well. How would you assign ports for multiple instances?
There's quite a bit of discussion going on at chefconf this week about kitchen-nodes and general testing of clusters of services; I'd like to see where that goes and whether there's anything that could contribute to your use cases here.
Alternately, how did you decide to proceed? It's been 18 months or so since you posted this issue.
(And I've just pulled your basename $0 diff into master.)