forked from juice-shop/multi-juicer
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #358 from osamamagdy/feat--add-monitoring-to-chart
Feat add monitoring to chart
- Loading branch information
Showing
35 changed files
with
240 additions
and
202 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
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,20 @@ | ||
# apiVersion: networking.k8s.io/v1 | ||
# kind: Ingress | ||
# metadata: | ||
# namespace: default | ||
# name: grafana | ||
# annotations: | ||
# kubernetes.io/ingress.class: nginx | ||
# # cert-manager.io/issue-temporary-certificate: "true" | ||
# spec: | ||
# rules: | ||
# - host: grafana.<your domain> | ||
# - http: | ||
# paths: | ||
# - path: /grafana | ||
# pathType: Prefix | ||
# backend: | ||
# service: | ||
# name: wrongsecrets-grafana | ||
# port: | ||
# number: 80 |
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
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,20 @@ | ||
# apiVersion: networking.k8s.io/v1 | ||
# kind: Ingress | ||
# metadata: | ||
# namespace: default | ||
# name: grafana | ||
# annotations: | ||
# kubernetes.io/ingress.class: nginx | ||
# # cert-manager.io/issue-temporary-certificate: "true" | ||
# spec: | ||
# rules: | ||
# - host: grafana.<your domain> | ||
# - http: | ||
# paths: | ||
# - path: /grafana | ||
# pathType: Prefix | ||
# backend: | ||
# service: | ||
# name: wrongsecrets-grafana | ||
# port: | ||
# number: 80 |
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
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
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,20 @@ | ||
# apiVersion: networking.k8s.io/v1 | ||
# kind: Ingress | ||
# metadata: | ||
# namespace: default | ||
# name: grafana | ||
# annotations: | ||
# kubernetes.io/ingress.class: nginx | ||
# # cert-manager.io/issue-temporary-certificate: "true" | ||
# spec: | ||
# rules: | ||
# - host: grafana.<your domain> | ||
# - http: | ||
# paths: | ||
# - path: /grafana | ||
# pathType: Prefix | ||
# backend: | ||
# service: | ||
# name: wrongsecrets-grafana | ||
# port: | ||
# number: 80 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,32 +1,11 @@ | ||
# MultiJuicer Monitoring Setups | ||
# Wrongsecrets Monitoring Setups | ||
|
||
This is a short and temporary guide on how to install MultiJuicer together with Prometheus, Grafana & Grafana Loki to get nice monitoring setup for your MultiJuicer installation. | ||
This is a short and temporary guide on how to install Wrongsecrets together with Prometheus, Grafana & Grafana Loki to get nice monitoring setup for your Wrongsecrets installation. | ||
|
||
After you have everything installed you can locally port forward the grafana port by running: `kubectl -n monitoring port-forward service/monitoring-grafana 8080:80` and access Grafana in your browser on [http://localhost:8080](http://localhost:8080). The default admin password for the Grafana Setup is: `prom-operator`. You can overwrite this by adding `set="grafana.adminPassword=yourPasswordHere"` to the helm install command for the prometheus-operator. | ||
The chart comes with dependency charts for Prometheus, Grafana & Grafana Loki. The default values for the charts are used, but you can overwrite them by adding `--set="key=value"` to the helm install command or by adding `key: value` to the [values file](../../helm/wrongsecrets-ctf-party/values.yaml) under the block `kube-prometheus-stack`. You can find the documentation of each dependency chart in the [chart.yaml file](../../helm/wrongsecrets-ctf-party/Chart.yaml) under `dependencies`. | ||
|
||
```sh | ||
# Install Prometheus, Grafana & Grafana Loki | ||
After you have everything installed you can locally port forward the grafana port by running: `kubectl port-forward svc/wrongsecrets-grafana 8080:80` and access Grafana in your browser on [http://localhost:8080](http://localhost:8080). The default admin password for the Grafana Setup is: `prom-operator`. You can overwrite this by adding `set="kube-prometheus-stack.grafana.adminPassword=yourPasswordHere"` to the helm install command for the chart. | ||
|
||
helm repo add grafana https://grafana.github.io/helm-charts | ||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | ||
## Grafana Dashboards | ||
|
||
kubectl create namespace monitoring | ||
|
||
echo "Installing prometheus-operator" | ||
wget https://raw.githubusercontent.com/iteratec/multi-juicer/main/guides/monitoring-setup/prometheus-operator-config.yaml | ||
|
||
echo "Installing Prometheus Operator & Grafana" | ||
helm --namespace monitoring upgrade --install monitoring prometheus-community/kube-prometheus-stack --version 13.3.0 --values prometheus-operator-config.yaml | ||
|
||
echo "Installing loki" | ||
helm --namespace monitoring upgrade --install loki grafana/loki --version 2.3.0 --set="serviceMonitor.enabled=true" | ||
|
||
echo "Installing loki/promtail" | ||
helm --namespace monitoring upgrade --install promtail grafana/promtail --version 3.0.4 --set "config.lokiAddress=http://loki:3100/loki/api/v1/push" --set="serviceMonitor.enabled=true" | ||
|
||
echo "Installing MultiJuicer" | ||
helm repo add wrongsecrets-ctf-party https://iteratec.github.io/multi-juicer/ | ||
|
||
# for helm >= 3 | ||
helm install wrongsecrets-ctf-party wrongsecrets-ctf-party/wrongsecrets-ctf-party --set="balancer.metrics.enabled=true" --set="balancer.metrics.dashboards.enabled=true" --set="balancer.metrics.serviceMonitor.enabled=true" | ||
``` | ||
The chart comes with a set of dashboards for Wrongsecrets. You can find them in the Grafana UI under `Dashboards -> Browse`. |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
dependencies: | ||
- name: kube-prometheus-stack | ||
repository: https://prometheus-community.github.io/helm-charts | ||
version: 43.1.4 | ||
- name: loki | ||
repository: https://grafana.github.io/helm-charts | ||
version: 2.16.0 | ||
- name: promtail | ||
repository: https://grafana.github.io/helm-charts | ||
version: 3.6.0 | ||
digest: sha256:c68f0a283febf2fd6b176ed1dc4c375eb1bf88f5b5fc9c179b8f500a1120bbac | ||
generated: "2023-09-23T15:26:32.867688899+02:00" |
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
Oops, something went wrong.