Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds notes to Helm deployment that give Prometheus configuration instructions #474

Merged
merged 4 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

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

# Build results
[Dd]ebug/
Expand Down
21 changes: 18 additions & 3 deletions charts/promitor-scraper/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +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 }}

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