https://github.com/redhat-developer-demos/ansible-eda-alertmanager
https://github.com/redhat-developer-demos/ansible-eda-alertmanager
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/redhat-developer-demos/ansible-eda-alertmanager
- Owner: redhat-developer-demos
- Created: 2023-07-04T16:07:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-10T21:56:55.000Z (over 2 years ago)
- Last Synced: 2025-01-23T07:47:50.771Z (11 months ago)
- Language: HTML
- Size: 194 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Ansible AlertManager
This example runs Ansible EDA listening for AlertManager/Prometheus events and scaling a deployment automatically when getting out of memory.
== Deploy
To run this demo, first you need the Prometheus Operator installed in the `default` namespace.
In the case of OpenShift, you can install it as any other operator (being in default namespace).
In the case of other Kubernetes implementations, follow https://prometheus-operator.dev/
With operator and up running, deploy all the pieces.
Go to `kubernetes` folder and run:
First the application that is monitored:
[source, bash]
----
kubectl apply -f 1-quarkus-monitor-kubernetes.yml
----
Second configure the application to be monitored:
[source, bash]
----
kubectl apply -f 2-quarkus-monitor-servicemonitor.yaml
----
Then deploy the Ansible EDA:
[source, bash]
----
kubectl apply -f 3-ansible-eda-debug-kubernetes.yaml
----
Finally, deploy AlertManager and Prometheus:
[source, bash]
----
kubectl apply -f 4-alertmanager.yaml
kubectl apply -f 5-prometheus.yaml
----
== Demo
Deployments creates also an OpenShift Route to access the service outside the cluster.
If you are using another Kubernetes implementation, just adapt the YAMLs to access the service.
By default, there is an alarm configured but not triggered until an endpoint on `quarkus-monitor` app is called.
[source, bash]
----
curl http://quarkus-monitor-default.apps.openshift.sotogcp.com/hello/consume/50
----