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

(fleet/kube-prometheus-stack) add puppetdb sd for node exporter #300

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 26 additions & 0 deletions fleet/lib/kube-prometheus-stack/overlays/pillan/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@ prometheus:
target_label: instance
- target_label: __address__
replacement: prometheus-blackbox-exporter.blackbox-exporter:9115
- job_name: node-exporter
puppetdb_sd_configs:
- url: "http://puppetdb.${ .ClusterLabels.site }.lsst.org:8080"
query: |
resources {
type = "Class" and title = "Profile::Core::Node_info" and
certname in resources[certname] {
type = "Class" and title = "Prometheus::Node_exporter"
}
}
refresh_interval: 30s
follow_redirects: true
include_parameters: true
enable_http2: true
port: 9100
relabel_configs:
- source_labels: [__meta_puppetdb_certname]
target_label: instance
- source_labels: [__meta_puppetdb_environment]
target_label: environment
- source_labels: [__meta_puppetdb_parameter_site]
target_label: site
- source_labels: [__meta_puppetdb_parameter_role]
target_label: role
- source_labels: [__meta_puppetdb_parameter_cluster]
target_label: cluster
- job_name: snmp-network
metrics_path: /snmp
params:
Expand Down
52 changes: 52 additions & 0 deletions fleet/lib/kube-prometheus-stack/overlays/ruka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,32 @@ prometheus:
target_label: instance
- target_label: __address__
replacement: prometheus-blackbox-exporter.blackbox-exporter:9115
- job_name: node-exporter-dev
puppetdb_sd_configs:
- url: "http://puppetdb.${ .ClusterLabels.site }.lsst.org:8080"
query: |
resources {
type = "Class" and title = "Profile::Core::Node_info" and
certname in resources[certname] {
type = "Class" and title = "Prometheus::Node_exporter"
}
}
refresh_interval: 30s
follow_redirects: true
include_parameters: true
enable_http2: true
port: 9100
relabel_configs:
- source_labels: [__meta_puppetdb_certname]
target_label: instance
- source_labels: [__meta_puppetdb_environment]
target_label: environment
- source_labels: [__meta_puppetdb_parameter_site]
target_label: site
- source_labels: [__meta_puppetdb_parameter_role]
target_label: role
- source_labels: [__meta_puppetdb_parameter_cluster]
target_label: cluster
- job_name: blackbox-ping-ls
puppetdb_sd_configs:
- url: http://puppetdb.ls.lsst.org:8080
Expand All @@ -38,6 +64,32 @@ prometheus:
target_label: instance
- target_label: __address__
replacement: prometheus-blackbox-exporter.blackbox-exporter:9115
- job_name: node-exporter-ls
puppetdb_sd_configs:
- url: http://puppetdb.ls.lsst.org:8080
query: |
resources {
type = "Class" and title = "Profile::Core::Node_info" and
certname in resources[certname] {
type = "Class" and title = "Prometheus::Node_exporter"
}
}
refresh_interval: 30s
follow_redirects: true
include_parameters: true
enable_http2: true
port: 9100
relabel_configs:
- source_labels: [__meta_puppetdb_certname]
target_label: instance
- source_labels: [__meta_puppetdb_environment]
target_label: environment
- source_labels: [__meta_puppetdb_parameter_site]
target_label: site
- source_labels: [__meta_puppetdb_parameter_role]
target_label: role
- source_labels: [__meta_puppetdb_parameter_cluster]
target_label: cluster
- job_name: snmp-network
metrics_path: /snmp
params:
Expand Down