Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prometheus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
prometheus
Merge requests
!3
node_exporter: Configure k8s Prometheus scraping
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
node_exporter: Configure k8s Prometheus scraping
th/node-exporter-k8s
into
main
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
Thomas Schneider
requested to merge
th/node-exporter-k8s
into
main
2 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Compare
main
version 1
ab8aefae
2 years ago
main (base)
and
latest version
latest version
e3e090fd
1 commit,
2 years ago
version 1
ab8aefae
1 commit,
2 years ago
1 file
+
22
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
node_exporter/tasks/main.yml
+
22
−
1
Options
@@ -54,7 +54,7 @@
-
prometheus-exporter
-
config
-
name
:
Configure Prometheus server to scrape us
-
name
:
Configure Prometheus server to scrape us
(file)
ansible.builtin.template
:
src
:
scrape.yml.j2
dest
:
"
/etc/prometheus/scrape/node_{{
ansible_fqdn
}}.yml"
@@ -66,6 +66,27 @@
-
prometheus
-
prometheus-exporter
-
config
when
:
prometheus_host is defined
-
name
:
Configure Prometheus server to scrape us (k8s)
kubernetes.core.k8s
:
definition
:
apiVersion
:
v1
kind
:
ConfigMap
metadata
:
name
:
"
{{
prometheus_k8s_scrape.name
}}"
namespace
:
"
{{
prometheus_k8s_scrape.namespace
}}"
data
:
"
{{
_data|items2dict
}}"
vars
:
_data
:
-
key
:
"
node_{{
ansible_fqdn
}}.yml"
value
:
"
{{
lookup('template',
'scrape.yml.j2')
}}"
delegate_to
:
localhost
tags
:
-
prometheus
-
prometheus-exporter
-
config
when
:
prometheus_k8s_scrape is defined
-
name
:
Configure needrestart integration
ansible.builtin.import_tasks
:
needrestart.yml
Loading