Consul is a Hashicorp product. How you configure and manage consul is not 
really a topic for a Prometheus mailing list. 

See https://www.consul.io/community for a list of Consul community 
resources.

On Thursday 29 February 2024 at 00:33:07 UTC+7 sri L wrote:

> Hi all,
>
> I am trying to register onprem multiple nodes in consul DB using single 
> json file but while registering through API, getting syntax error (*Request 
> decode failed: json: cannot unmarshal array into Go value of type 
> structs.RegisterRequest*)
>
>
> I am using below curl command for registering nodes
>
> curl --request PUT --data @nodes.json 
> http://x.x.x.x:8500/v1/catalog/register
>
> Below is the node json file I am using:
>
> [
> {
>   "Node": "ABC",
>   "Address": "ABC.net",
>   "NodeMeta": {
>     "external-node": "true",
>     "external-probe": "true"
>   },
>   "Service": {
>     "ID": "node_exporter",
>     "Service": "monitoring",
>     "Tags": ["node_exporter"],
>     "Port": 9100
>   }
> },
> {
>   "Node": "XYZ",
>   "Address": "XYZ.net",
>   "NodeMeta": {
>     "external-node": "true",
>     "external-probe": "true"
>   },
>   "Service": {
>     "ID": "node_exporter",
>     "Service": "monitoring",
>     "Tags": ["node_exporter"],
>     "Port": 9100
>   }
> }
> ]
>
> I am not installing consul agent in those nodes, just trying to register 
> those external nodes in consul DB and from their Prometheus has to discover 
> those nodes.
>
> Can anyone please suggest on adding multiple nodes with one json file.
>
> Thanks
>
>
>

-- 
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/4d8f6e43-58d4-450a-889a-40d8f22e3d16n%40googlegroups.com.

Reply via email to