-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add generic prometheus endpoints (#209)
- feat: add execution and additional metrics jobs to prometheus service - feat: add beacon metrics gazer to prometheus - fix: ignore not defined metrics info
- Loading branch information
1 parent
251b34f
commit d04e85f
Showing
4 changed files
with
168 additions
and
51 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
global: | ||
scrape_interval: 15s # By default, scrape targets every 15 seconds. | ||
|
||
# A scrape configuration containing exactly one endpoint to scrape: | ||
# Here it's Prometheus itself. | ||
scrape_interval: 15s | ||
scrape_configs: | ||
{{ range $clNode := .CLNodesMetricsInfo }} | ||
- job_name: '{{ $clNode.name }}' | ||
metrics_path: {{ $clNode.path }} | ||
static_configs: | ||
- targets: ['{{ $clNode.url }}'] | ||
{{ end }} | ||
- job_name: 'beacon-metrics-gazer' | ||
metrics_path: '/metrics' | ||
static_configs: | ||
- targets: ['beacon-metrics-gazer:8080'] | ||
{{- range $job := .MetricsJobs }} | ||
- job_name: "{{ $job.Name }}" | ||
metrics_path: "{{ $job.MetricsPath }}" | ||
{{- if $job.ScrapeInterval }} | ||
scrape_interval: {{ $job.ScrapeInterval }} | ||
{{- end }} | ||
static_configs: | ||
- targets: ['{{ $job.Endpoint }}'] | ||
labels:{{ range $labelName, $labelValue := $job.Labels }} | ||
{{ $labelName }}: "{{ $labelValue }}" | ||
{{- end }} | ||
{{- end }} |