Skip to content

Commit

Permalink
Update NOTES.txt to include prometheus config
Browse files Browse the repository at this point in the history
  • Loading branch information
lee0c committed Mar 28, 2019
1 parent 6968e8a commit 316f8d3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions charts/promitor-scraper/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
1. Forward the application port by running these commands:

export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ include "promitor-scraper.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
kubectl port-forward $POD_NAME 8080:{{ .Values.service.targetPort }}

2. Check the scraping output at http://127.0.0.1:8080{{ .Values.scrapeConfig.path }}

3. To set up Prometheus in your cluster & pull in metrics from Promitor's scraping output, run:

export CLUSTER_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} -l "app={{ include "promitor-scraper.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].spec.clusterIP}")
cat > promitor-scrape-config.yaml <<EOF
extraScrapeConfigs: |
- job_name: {{ .Release.Name }}
metrics_path: {{ .Values.scrapeConfig.path }}
static_configs:
- targets:
- $CLUSTER_IP:{{ .Values.service.port }}
EOF
helm install stable/prometheus -f promitor-scrape-config.yaml

0 comments on commit 316f8d3

Please sign in to comment.