Reputation: 173
I developed few services and I would like to be able to react fast in case of a bug or failure. These services expose metrics to prometheus and I get alerts through slack. Logs are available in kibana. I can see bugs and exceptions in logs through kibana but I have te check actively for it. I would like to be rather notified about them. How would you implement these notification? I'm quite new to this subject and I would be grateful for any suggestion.
Upvotes: 2
Views: 2646
Reputation: 196
If you are using spring boot for your micro services and can use Micrometer as dependency and create a register the LogbackMetrics bean as below
new LogbackMetrics().bind(registry);
This will expose the counter of all Log Level : INFO, ERROR, WARN Then you can use Prometheus Alert Manager and access the metrics inside the alert rules. Please refer below link. https://prometheus.io/docs/alerting/latest/alertmanager/
You can use this example https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml You can configure to receive email notification or SMS in case of any errors or exceptions
Upvotes: 2