-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add monitoring stack with two provisioned dashboards
- Loading branch information
Showing
15 changed files
with
355 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.direnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: download-dashboards | ||
labels: | ||
app: grafana | ||
data: | ||
download-dashboards.sh: | | ||
#!/bin/sh | ||
apk add --no-cache curl sed | ||
if [[ ! -d /var/lib/grafana/dashboards ]]; then | ||
mkdir -p /var/lib/grafana/dashboards | ||
fi | ||
curl https://grafana.com/api/dashboards/315/revisions/latest/download -o /var/lib/grafana/dashboards/kubernetes-dashboard.json | ||
curl https://raw.githubusercontent.com/paradigmxyz/reth/main/etc/grafana/dashboards/overview.json -o /var/lib/grafana/dashboards/overview.json | ||
sed -i 's/\${DS_PROMETHEUS}/DS_PROMETHEUS/g' /var/lib/grafana/dashboards/kubernetes-dashboard.json /var/lib/grafana/dashboards/overview.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: grafana-dashboard-providers | ||
labels: | ||
grafana_dashboard_providers: "1" | ||
data: | ||
dashboards.yaml: | | ||
apiVersion: 1 | ||
providers: | ||
- name: 'default' | ||
orgId: 1 | ||
folder: '' | ||
type: file | ||
disableDeletion: false | ||
updateIntervalSeconds: 30 | ||
options: | ||
path: /var/lib/grafana/dashboards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: grafana-datasources | ||
labels: | ||
app: grafana | ||
data: | ||
prometheus-datasource.yaml: | | ||
apiVersion: 1 | ||
datasources: | ||
- name: DS_PROMETHEUS | ||
type: prometheus | ||
access: proxy | ||
url: http://prometheus:9090 | ||
isDefault: true | ||
editable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: grafana | ||
labels: | ||
app: grafana | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 3000 | ||
targetPort: 3000 | ||
selector: | ||
app: grafana |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: grafana | ||
labels: | ||
app: grafana | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: grafana | ||
template: | ||
metadata: | ||
labels: | ||
app: grafana | ||
spec: | ||
initContainers: | ||
- name: grafana-dashboards | ||
image: alpine:latest | ||
command: ["/bin/sh", "-c", "source /mnt/scripts/download-dashboards.sh"] | ||
volumeMounts: | ||
- name: download-dashboards | ||
mountPath: /mnt/scripts | ||
- name: grafana-storage | ||
mountPath: /var/lib/grafana | ||
containers: | ||
- name: grafana | ||
image: grafana/grafana:10.0.0 | ||
ports: | ||
- containerPort: 3000 | ||
env: | ||
- name: GF_SECURITY_ADMIN_PASSWORD | ||
value: admin | ||
volumeMounts: | ||
- name: grafana-storage | ||
mountPath: /var/lib/grafana | ||
- name: grafana-datasource-volume | ||
mountPath: /etc/grafana/provisioning/datasources | ||
- name: grafana-dashboards-volume | ||
mountPath: /etc/grafana/provisioning/dashboards | ||
volumes: | ||
- name: grafana-storage | ||
emptyDir: {} | ||
- name: grafana-datasource-volume | ||
configMap: | ||
name: grafana-datasources | ||
- name: grafana-dashboards-volume | ||
configMap: | ||
name: grafana-dashboard-providers | ||
- name: download-dashboards | ||
configMap: | ||
name: download-dashboards | ||
defaultMode: 0770 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- download-dashboards.yaml | ||
- grafana-dashboards.yaml | ||
- grafana-datasources.yaml | ||
- prometheus-permissions.yaml | ||
- prometheus-config.yaml | ||
- execution-layer.yaml | ||
- consensus-layer.yaml | ||
- prometheus.yaml | ||
- grafana.yaml | ||
- execution-layer-svc.yaml | ||
- consensus-layer-svc.yaml | ||
- prometheus-svc.yaml | ||
- grafana-svc.yaml |
Oops, something went wrong.