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 9613b66
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# User-specific files created by instructions in NOTES.txt (Helm)
promitor-scrape-config.yaml

# Build results
[Dd]ebug/
[Dd]ebugPublic/
Expand Down
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 9613b66

Please sign in to comment.