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
GitLab 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
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
node_exporter: Configure k8s Prometheus scraping
th/node-exporter-k8s
into
main
Overview
0
Commits
1
Pipelines
2
Changes
1
Merged
node_exporter: Configure k8s Prometheus scraping
Thomas Schneider
requested to merge
th/node-exporter-k8s
into
main
Mar 3, 2023
Overview
0
Commits
1
Pipelines
2
Changes
1
0
0
Merge request reports
Compare
main
version 1
ab8aefae
Mar 3, 2023
main (base)
and
latest version
latest version
e3e090fd
1 commit,
Mar 4, 2023
version 1
ab8aefae
1 commit,
Mar 3, 2023
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
View file @ e3e090fd
Edit in single-file editor
Open in Web IDE
Show full file
@@ -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