prometheus-operator

Prometheus alert manager doesnt send alert k8s

末鹿安然 提交于 2021-02-18 19:13:33
问题 Im using prometheus operator 0.3.4 and alert manager 0.20 and it doesnt work, i.e. I see that the alert is fired (on prometheus UI on the alerts tab) but I didnt get any alert to the email. by looking at the logs I see the following , any idea ? please see the warn in bold maybe this is the reason but not sure how to fix it... This is the helm of prometheus operator which I use: https://github.com/helm/charts/tree/master/stable/prometheus-operator level=info ts=2019-12-23T15:42:28.039Z caller

Dynamically update prometheus scrape config based on pod labels

左心房为你撑大大i 提交于 2021-02-16 14:54:13
问题 I'm trying to enhance my monitoring and want to expand the amount of metrics pulled into Prometheus from our Kube estate. We already have a stand alone Prom implementation which has a hard coded config file monitoring some bare metal servers, and hooks into cadvisor for generic Pod metrics. What i would like to do is configure Kube to monitor the apache_exporter metrics from a webserver deployed in the cluster, but also dynamically add a 2nd, 3rd etc webserver as the instances are scaled up.

How to query container memory limit in Prometheus

你。 提交于 2021-01-28 06:10:51
问题 I am using Prometheus tool for monitoring my Kubernetes cluster. I have set a resource limit(memory limit) in my deployments and need to configure a panel for showing the total memory available. Please let me know the query needed to run in Prometheus for getting the total memory limit available for my deployment. 回答1: It is possible using metrics kube_pod_container_resource_limits_memory_bytes (provided by kube-state-metrics) and container_memory_usage_bytes (provided by kubelet/cAdvisor)

How to enable persistence in helm prometheus-operator

筅森魡賤 提交于 2021-01-27 05:36:07
问题 I am using the prometheus-operator helm chart. I want the data in prometheus server to persist. But open restart of the prometheus StatefulSet , the data disappears. When inspecting the yaml definitions of the associated StatefulSet and Pod objects, there is no PersistVolumeClaim . I tried the following change to values.yaml , per the docs in https://github.com/helm/charts/tree/master/stable/prometheus: prometheus: server: persistentVolume: enabled: true but this has no effect on the end

sum of rate function in prometheus

三世轮回 提交于 2020-12-27 07:09:37
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

sum of rate function in prometheus

余生颓废 提交于 2020-12-27 07:03:30
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

sum of rate function in prometheus

最后都变了- 提交于 2020-12-27 07:02:06
问题 Given the following prometheus time series called requests : the vector query requests[3 seconds] is : and the rate of the vector query requests[3 seconds], rate(requests[3 sec]) (computed by the shown formula) is : My question is : what is sum(rate(requests[3 sec])) evaluated at seconds 5, 4 and 3 respectively is it 16.5, 6.5 and 1. Any idea? 回答1: You are misunderstanding the purpose of sum. It is not performing a sum over time but over the dimensions for your metric. In your example,

Setup Prometheus Operator to monitor .net core app

六月ゝ 毕业季﹏ 提交于 2020-04-18 05:28:42
问题 I have successfully setup prometheus and grafana on my kubernetes dev cluster (following this: https://itnext.io/kubernetes-monitoring-with-prometheus-in-15-minutes-8e54d1de2e13). Added this to Startup.cs for my sample .net core app: public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { var counter = Metrics.CreateCounter("PathCounter", "Counts requests to endpoints", new CounterConfiguration { LabelNames = new[] { "method", "endpoint" } }); app.Use((context, next) => {