Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KO-344] Montoring stack #300

Merged
merged 12 commits into from
Aug 28, 2024
12 changes: 12 additions & 0 deletions config/monitoring/alertmanager/config/alertmanager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This is an example alertmanager.yml which sends alert notifications to a slack channel.

global:
slack_api_url: "https://hooks.slack.com/services/TXXXXXXXX/XXXXXXXXXXX/XXXXXXXXXXXXXXXXXXXXXXXX"
route:
group_by: ['cluster', 'service']
receiver: slack_user

receivers:
- name: slack_user
slack_configs:
- text: "summary: {{ .CommonAnnotations.summary }}\ndescription: {{ .CommonAnnotations.description }}"
20 changes: 20 additions & 0 deletions config/monitoring/alertmanager/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: aerospike-alertmanager
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved

resources:
- statefulset.yaml
- pvc.yaml
- service.yaml

configMapGenerator:
- name: alertmanager-config
files:
- config/alertmanager.yml

generatorOptions:
disableNameSuffixHash: true
10 changes: 10 additions & 0 deletions config/monitoring/alertmanager/pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: alertmanagerdata
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
sud82 marked this conversation as resolved.
Show resolved Hide resolved
16 changes: 16 additions & 0 deletions config/monitoring/alertmanager/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: Service
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
app.kubernetes.io/component: aerospike-alertmanager
spec:
ports:
- name: http
port: 9093
selector:
app: aerospike-monitoring-stack-alertmanager
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
51 changes: 51 additions & 0 deletions config/monitoring/alertmanager/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: aerospike-alertmanager
unique-app: aerospike-monitoring-stack-alertmanager
sud82 marked this conversation as resolved.
Show resolved Hide resolved
spec:
selector: {}
sud82 marked this conversation as resolved.
Show resolved Hide resolved
template:
spec:
containers:
- name: alertmanager
image: prom/alertmanager:latest
args:
- --config.file=/etc/alertmanager/alertmanager.yml
- --storage.path=/alertmanager
- --log.level=info
- --cluster.advertise-address=0.0.0.0:9093
livenessProbe:
httpGet:
path: /-/healthy
port: 9093
initialDelaySeconds: 25
periodSeconds: 20
ports:
- containerPort: 9093
readinessProbe:
httpGet:
path: /-/ready
port: 9093
volumeMounts:
- mountPath: /etc/alertmanager
name: alertmanagerconf
- mountPath: /alertmanager
name: alertmanagerdata
securityContext:
fsGroup: 26
sud82 marked this conversation as resolved.
Show resolved Hide resolved
serviceAccountName: aerospike-monitoring-stack
volumes:
- name: alertmanagerdata
persistentVolumeClaim:
claimName: alertmanagerdata
- name: alertmanagerconf
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
configMap:
defaultMode: 420
name: alertmanager-config
11 changes: 11 additions & 0 deletions config/monitoring/grafana/config/aerospike_grafana_dashboards.yaml
abhishekdwivedi3060 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: 1
providers:
- name: 'default'
folder: 'Aerospike'
folderUid: 'aerospike1'
type: file
disableDeletion: false
editable: true
updateIntervalSeconds: 10
options:
path: /var/lib/grafana/dashboards
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: 1
datasources:
- name: "Aerospike Prometheus"
type: prometheus
access: proxy
url: http://aerospike-monitoring-stack-prometheus:9090
editable: true
isDefault: false
13 changes: 13 additions & 0 deletions config/monitoring/grafana/config/grafana.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[analytics]
check_for_updates = true
[grafana_net]
url = https://grafana.net
[log]
mode = console
level = debug
[paths]
data = /var/lib/grafana/data
logs = /var/log/grafana
plugins = /var/lib/grafana/plugins
[server]
http_port = 3000
Loading
Loading