[prometheus-users] Can we have multiple alertmanager config in kube prom stack

2023-09-18 Thread 'Laxman Soma' via Prometheus Users
Hello All - We recently implemented alertmanagerconfig using global alertmanager configuration in monitoring namespace , but we had a recent requirement to have multiple alertmanager config and wanted to check if anyone implemented the same as we are not able to send alerts -- You received

Re: [prometheus-users] Not able add remote_write in Prometheus config for k8s monitoring

2023-09-18 Thread Prashant Singh
Yes , got solution , below code is working for config and also working remote_write . config file : apiVersion: v1 kind: ConfigMap metadata: name: prometheus-config namespace: monitoring metadata: name: prometheus-server-conf namespace: monitoring labels: name: prometheus-s

Re: [prometheus-users] Optimizing query with many duplicate calls

2023-09-18 Thread Brian Candler
One possibility is to use a recording rule for the expensive repeated query. If I rewrite avg_over_time(ambient_pm25_env{instance=~"$room.*"}[$aqi_interval]) to X, I get: ((50 - 0) / (12 - 0) * ((X <= 12) - 0) + 0) or ((100 - 51) / (35.4 - 12.1) * ((X > 12 and X <= 35.4) - 12.1) + 51) or ((150

Re: [prometheus-users] Not able add remote_write in Prometheus config for k8s monitoring

2023-09-18 Thread Stuart Clark
On 2023-09-18 07:20, Prashant Singh wrote: Hello, I am not able add remote_write detail in k8s prometheus config file. kubectl version: 1.27 error : Error from server (BadRequest): error when creating "config-map.yaml": ConfigMap in version "v1" cannot be handled as a ConfigMap: strict decoding