Comments (8)
@a-thorat Yes, SM was my backup plan.
from cluster-monitoring-operator.
@IvanovOleg
You can configure additional scrape spec config under prometheus cr names k8s using secret key value.
additionalScrapeConfigs:
key: opa-exporter-config.yaml
name: opa-exporter
optional: true
secret could be like this
opa-exporter-config.yaml
job_name: opa-exporter
kubernetes_sd_configs:
- role: service
Additionally you can refer this page https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config
from cluster-monitoring-operator.
@a-thorat that configuration will be removed on the next reconciliation (in several minutes) as I described above.
from cluster-monitoring-operator.
@IvanovOleg i am sure you might have explored ServiceMonitor CR as well for metrics scraping with service? Not sure this will help but just trying a lil bit.
I tried to configure SM CR and checked prometheus-k8s got this reflected in config file
/etc/prometheus/config_out/prometheus.env.yaml
- job_name: serviceMonitor/opa-monitoring/prometheus-opa-exporter-mon/0
honor_labels: false
kubernetes_sd_configs:- role: endpoints
namespaces:
names:
- opa-monitoring
scrape_interval: 30s
scheme: http
relabel_configs: - source_labels:
- job
target_label: __tmp_prometheus_job_name
- job
- action: keep
source_labels:- __meta_kubernetes_service_label_app
- __meta_kubernetes_service_labelpresent_app
regex: (opa-exporter);true
- action: keep
source_labels:- __meta_kubernetes_endpoint_port_name
regex: "9141"
- __meta_kubernetes_endpoint_port_name
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Node;(.*)
replacement: ${1}
target_label: node
- source_labels:
- __meta_kubernetes_endpoint_address_target_kind
- __meta_kubernetes_endpoint_address_target_name
separator: ;
regex: Pod;(.*)
replacement: ${1}
target_label: pod
- source_labels:
- __meta_kubernetes_namespace
target_label: namespace - source_labels:
- __meta_kubernetes_service_name
target_label: service
- __meta_kubernetes_service_name
- __meta_kubernetes_namespace
- source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- __meta_kubernetes_pod_name
- source_labels:
- __meta_kubernetes_pod_container_name
target_label: container
- __meta_kubernetes_pod_container_name
- action: drop
source_labels:- __meta_kubernetes_pod_phase
regex: (Failed|Succeeded)
metric_relabel_configs: []
- __meta_kubernetes_pod_phase
- role: endpoints
from cluster-monitoring-operator.
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
from cluster-monitoring-operator.
Related Issues (20)
- Support `Probe` resources HOT 3
- {Request} Ability to configure Prometheus Exporters HOT 5
- Invalid externalURL since ad2d747f2ef037647ebc9f7d5b22118d0dab4bd2 HOT 4
- Release 4.12 Checklist HOT 3
- Missing Metrics in Prometheus on openshift 3.11 HOT 4
- User workload prometheus scraps targets managed by monitoring prometheus instance HOT 4
- Release 4.13 Checklist HOT 5
- crio metrics via http is not safe HOT 7
- Allow kube-state-metrics configuration HOT 3
- Reject invalid PrometheusRule objects beforehand rather than failing the reconciliation HOT 5
- Alerts generated by user-workload-monitoring are not included in remoteWrite HOT 4
- typo in 4.14 CHANGELOG.md and CONTRIBUTING.md HOT 3
- OpenTelemetry Support HOT 16
- kubelet metrics not working in after upgrade to OKD 4.13 HOT 12
- wrong annotation for ThanosRulerConfig.Resources HOT 1
- I can't increase Prometheus startupProbe failureThreshold value HOT 6
- user-workload-monitoring doesn't support honoring labels HOT 4
- How to change default servicemonitors interval HOT 5
- Support enableRemoteWriteReceiver flag in prometheus{,K8s} config HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-monitoring-operator.