Last active
May 6, 2020 00:28
-
-
Save gjyoung1974/0b6a33499e0882cab27b70bc9bc0ec16 to your computer and use it in GitHub Desktop.
falco exporter sandbox - start UI for containerized metrics environment
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
#!/bin/bash | |
# Get our pod names | |
FALCO_EXPORTER_POD=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=falco-exporter,app.kubernetes.io/instance=falco-exporter" -o jsonpath="{.items[0].metadata.name}") | |
GRAFANA_POD=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana" -o jsonpath="{.items[0].metadata.name}") | |
PROMETHEUS_POD=$(kubectl get pods --namespace default -l "app=prometheus" -o jsonpath="{.items[0].metadata.name}") | |
ALERT_MANAGER_POD=$(kubectl get pods --namespace default -l "app=alertmanager" -o jsonpath="{.items[0].metadata.name}") | |
function falco { | |
# forward UI ports | |
kubectl port-forward ${FALCO_EXPORTER_POD} 9376 & | |
kubectl port-forward ${GRAFANA_POD} 3000 & | |
kubectl port-forward ${PROMETHEUS_POD} 9090 & | |
kubectl port-forward ${ALERT_MANAGER_POD} 9093 & | |
# Start web browsers | |
xdg-open http://127.0.0.1:9376/metrics & | |
xdg-open http://127.0.0.1:3000 & | |
xdg-open http://127.0.0.1:9090 & | |
xdg-open http://127.0.0.1:9093 & | |
return 0; | |
} | |
falco |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment