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-server-conf

thanks,
prashant

On Mon, Sep 18, 2023 at 12:52 PM Stuart Clark 
wrote:

> 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 prometheus-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/762c7be3990926a7c2867148f68db2f0%40Jahingo.com
> .
>

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CALGft8xXX9MvHQD1_ziNcUpSaF8TuW%3DbRRSgT4OqN2Yc9zJDcg%40mail.gmail.com.


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 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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/762c7be3990926a7c2867148f68db2f0%40Jahingo.com.


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

2023-09-18 Thread Prashant Singh
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;


Thanks,
prashant

-- 
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/da1b6519-5095-4ec5-b5f1-ee5da0850350n%40googlegroups.com.