Comments (8)
This looks to be question for kube-prometheus config
Did you check https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md?
from kube-prometheus.
Is this scenario unable to be solved through prometheus-operator ? What methods can you recommend? Thank you.
from kube-prometheus.
This looks to be question for kube-prometheus config
Did you check https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizing.md?
The kube-prometheus has been deployed in the production environment. I hope it can be modified on the existing basis. What are the ways? Thank you.
from kube-prometheus.
https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig is available if you want to add new relabelling. IIUC you are asking how to do this since you deploy operator through kube-prometheus?
from kube-prometheus.
如果您想添加新的重新标签,可以使用 https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig。IIUC 您问如何做到这一点,因为您通过 kube-prometheus 部署了 operator?
We are from different teams. The previously deployed personnel have left. The current production environment is deployed with kube-prometheus version 0.8. We currently want the indicators collected by kube-state-metrics to be processed based on the external relationship file json, but the configuration of prometheus is done by Prometheus. Generated by operator, that is, the secret in the monitor and Prometheus.yaml.gz in prometheus-k8s. At present, I have not found the location to change the configuration. It seems that I can only redeploy it.
from kube-prometheus.
https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.RelabelConfig is available if you want to add new relabelling. IIUC you are asking how to do this since you deploy operator through kube-prometheus?
Would you like to know how to modify the prometheus configuration file deployed by prometheus-operator and ensure that it takes effect permanently? The current one is the default - --config.file=/etc/prometheus/config_out/prometheus.env.yaml. Thank you very much.
from kube-prometheus.
The scrape configuration comes from a ServiceMonitor object which you'd need to modify.
If the installation has been made via kube-prometheus, the object is named "kube-state-metrics":
kubectl get -n monitoring servicemonitors kube-state-metrics
from kube-prometheus.
The scrape configuration comes from a ServiceMonitor object which you'd need to modify. If the installation has been made via kube-prometheus, the object is named "kube-state-metrics":
kubectl get -n monitoring servicemonitors kube-state-metrics
The scrape configuration comes from a ServiceMonitor object which you'd need to modify. If the installation has been made via kube-prometheus, the object is named "kube-state-metrics":
kubectl get -n monitoring servicemonitors kube-state-metrics
Thanks for your help, but there still seems to be a problem
I edited kubeStateMetrics-serviceMonitor.yaml and added the following:
`
relabelings:
- action: labeldrop
regex: (pod|service|endpoint|namespace)
- sourceLabels: [app]
regex: nginx
replacement: 'my-nginx-test'
targetLabel: module
- sourceLabels: [label_app]
regex: nginx
replacement: 'my-nginx-test-label'
targetLabel: module
- sourceLabels: [app]
regex: tip-1
replacement: '\u540e\u7aef\u6a21\u5757'
targetLabel: module
- sourceLabels: [app]
regex: tip-2
replacement: '\u524d\u7aef\u6a21\u5757'
targetLabel: module
`
Enter the prometheus container and you can see that it has taken effect, but it seems that the indicators still have not changed.
from kube-prometheus.
Related Issues (20)
- Why can't I add remote write
- Disable KubePersistentVolumeFillingUp HOT 1
- Unable to build manifests from main branch HOT 2
- The collected indicators do not contain resource tags, and the default configuration of kube-prometheus is used. HOT 1
- 怎么修改Prometheus全局配置
- how to add new relabel_configs and metric_relabel_configs for job_name monitoring/kube-state-metrics/0 and job_name monitoring/kube-state-metrics/1 HOT 1
- How to add and modify existing scrape_configs to existing kube-prometheus HOT 1
- Using Traefik for Ingress HOT 3
- Prometheus stack not respecting retention
- how to not use cpu requst & limit ? HOT 2
- Appears to be an issue with the Grafana grid.libsonnet HOT 3
- Support the Gateway API
- forgot grafana password,How can I changeit
- persistent volume monitor
- Decrease value of limit before "Namespace quota is going to be full. HOT 1
- Warning - 'bearerTokenFile' is deprecated HOT 1
- Request for Guidance on Deploying kube-prometheus Using ArgoCD HOT 1
- Easily configure arguments of node exporter
- kube-prometheus-release-0.13 不能与rancher 同时部署吗 HOT 1
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 kube-prometheus.