Comments (4)
This is pretty useful. This also opens up for node specific config if it's not overkill. Thinking about the implementation though, there's plenty of ways to go about this.
My initial though is:
consul-alerts/config/...
would be the global configuration and fall-through if no dc or node specific config is available.
`consul-alerts/config/{{dc}}/... would be a datacenter specific config.
then something like consul-alerts/config/{{dc}}/{{node}}/...
for node specific config, though not sure if it's something useful.
Another thought we have is something like this:
consul-alerts/{{dc}}/
|-- config/...
|-- checks/...
_
can be used as a wildcard to denote that it's doesn't care which dc or node it is. (eg. consul-alerts/_/...
is the global config, and consul-alerts/dc1/...
would be the dc1 specific config).
Having separate config and checks would avoid conflict when storing the health checks in the KV too.
Or maybe there's a better way of structuring the config.
What do you guys think? @dpetzel @hunter @aisrael
from consul-alerts.
While looking to see what structure Consul itself uses for some stuff, I found this:
It is important to note that each datacenter has its own K/V store, and that there is no replication between datacenters.By default the datacenter of the agent is queried, however the dc can be provided using the "?dc=" query parameter
This actually greatly reduces my use-case as I can rely on the default behavior. For some reason I was previously under the assumption the K/V store was Global
Personally I like the consul-alerts/config/{{dc}}/{{node}}/...
structure, but don't care for needing to put a _
in the URL. What if the logic was to check each of the following (in order), with first match winning:
consul-alerts/config/{{dc}}/{{node}}/...
consul-alerts/config/{{dc}}/...
consul-alerts/config/...
Using the same pattern for checks
from consul-alerts.
I'd forgotten about each DC having it's own KV store but I wonder if this will help at all: https://github.com/hashicorp/consul-replicate
from consul-alerts.
I kinda like the default behaviour. It also means that consul-alerts will behave on the config based on which agent and datacenter it binds to.
Though there might be a case where someone wants to have the same config across datacenters. consul-replicate would come in pretty useful.
Maybe let's keep it simple and rely on the default behaviour of the KV Store. Just need to update the docs for people to be aware of it and consul-replicate. :)
from consul-alerts.
Related Issues (20)
- Support parametric notification profiles HOT 2
- Disable notifications with consul tags HOT 1
- email notifier: distinct email receivers based on consul service HOT 1
- Checks status "from [empty] to passing/critical"
- docker image does not send http-notification HOT 3
- 200 is not the only code that indicates success
- Config not updating
- Change the default URL where reads the config in consul "/consul-alerts/xxx" for another URL, for example "/consul-alerts-2/xxx"? HOT 1
- INFO[0003] Running for leader election... Error querying Consul agent: Unexpected response code: 403 (Permission denied) INFO[0003] Shutting down watcher --> Exit Code: 1 HOT 1
- Support JWT auth for HTTP notifier HOT 2
- Update docker image.
- (Stale) Reminder doesnt get deleted
- consul-alerts stops working after some time
- Can't connect to https consul endpoint
- Cant download consulalerts 0.6.0 HOT 1
- version display error
- Opsgenie notifier should allow to configure different target address
- http-endpoint-notifier : Possibility to add HTTP headers ?
- 'Running for leader election' repeating
- Incorrect policy given in README HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from consul-alerts.