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 error: unknown field "remote_write"

prometheus config file:
apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-server-conf
  labels:
    name: prometheus-server-conf
  namespace: monitoring

remote_write:
   - url: "http://x.x.x.x:31000/api/prom/push";


Not really a Prometheus thing, but that isn't a valid ConfigMap. It is expecting top level fields called "metatdata" and "data", with a filename within the data section that then contains whatever data you are wanting (which for Prometheus is a YAML config file).

--
Stuart Clark

--
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/762c7be3990926a7c2867148f68db2f0%40Jahingo.com.

Reply via email to