summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-08 20:16:41 +0200
committerPaul Buetow <paul@buetow.org>2026-01-08 20:16:41 +0200
commit806986a77f8e0fa8c2d9a5e9905e557000766ef0 (patch)
tree26539d7e7bce1bec322a8ace39347ee95f1fa25d
parenta91913df1afb2e6f72412a92c89ab084dd11d2d8 (diff)
Add convenient port-forward targets for Prometheus monitoring
Added enhanced port-forward targets with helpful UI information: - 'just alerts' - Quick access to Prometheus alerts view - 'just alertmanager' - Quick access to Alertmanager UI - Enhanced output showing all relevant URLs All port-forward commands now display: - Access URLs with direct links to specific views - Clear instructions for stopping (Ctrl+C) Usage: cd prometheus/ just alerts # Opens Prometheus alerts (port 9090) just alertmanager # Opens Alertmanager (port 9093) just port-forward-prometheus [port] just port-forward-grafana [port] After running, access: - Prometheus Alerts: http://localhost:9090/alerts - Alertmanager: http://localhost:9093 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
-rw-r--r--f3s/prometheus/Justfile31
1 files changed, 28 insertions, 3 deletions
diff --git a/f3s/prometheus/Justfile b/f3s/prometheus/Justfile
index 216e5fc..53338cb 100644
--- a/f3s/prometheus/Justfile
+++ b/f3s/prometheus/Justfile
@@ -30,17 +30,42 @@ logs-alertmanager lines="100":
kubectl logs -n {{NAMESPACE}} -l app.kubernetes.io/name=alertmanager --tail={{lines}} -f
port-forward-prometheus port="9090":
- @echo "Forwarding Prometheus to localhost:{{port}}"
+ @echo "🚀 Forwarding Prometheus to localhost:{{port}}"
+ @echo ""
+ @echo "Access URLs:"
+ @echo " Alerts: http://localhost:{{port}}/alerts"
+ @echo " Rules: http://localhost:{{port}}/rules"
+ @echo " Graph: http://localhost:{{port}}/graph"
+ @echo " Targets: http://localhost:{{port}}/targets"
+ @echo ""
+ @echo "Press Ctrl+C to stop"
+ @echo ""
kubectl port-forward -n {{NAMESPACE}} svc/prometheus-kube-prometheus-prometheus {{port}}:9090
port-forward-grafana port="3000":
- @echo "Forwarding Grafana to localhost:{{port}}"
+ @echo "🚀 Forwarding Grafana to localhost:{{port}}"
+ @echo ""
+ @echo "Access URL: http://localhost:{{port}}"
+ @echo ""
+ @echo "Press Ctrl+C to stop"
+ @echo ""
kubectl port-forward -n {{NAMESPACE}} svc/prometheus-grafana {{port}}:80
port-forward-alertmanager port="9093":
- @echo "Forwarding Alertmanager to localhost:{{port}}"
+ @echo "🚀 Forwarding Alertmanager to localhost:{{port}}"
+ @echo ""
+ @echo "Access URL: http://localhost:{{port}}"
+ @echo ""
+ @echo "Press Ctrl+C to stop"
+ @echo ""
kubectl port-forward -n {{NAMESPACE}} svc/prometheus-kube-prometheus-alertmanager {{port}}:9093
+# Quick access to Prometheus alerts view
+alerts: (port-forward-prometheus "9090")
+
+# Quick access to Alertmanager
+alertmanager: (port-forward-alertmanager "9093")
+
sync:
@echo "Triggering ArgoCD sync..."
@kubectl annotate application {{APP_NAME}} -n cicd argocd.argoproj.io/refresh=normal --overwrite