netgate-vpp-prometheus API (24.02)

Provide RPCs to control VPP Prometheus Exporter Copyright 2018-2020 Rubicon Communications, LLC.

prometheus-exporter

returns netgate.vpp.prometheus.PrometheusExporter

get /data/netgate-vpp-prometheus:prometheus-exporter

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter

configuration of the prometheus exporter

Responses

200

netgate.vpp.prometheus.PrometheusExporter

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:prometheus-exporter-wrapper":
    {
    }
}

creates netgate.vpp.prometheus.PrometheusExporter

post /data/netgate-vpp-prometheus:prometheus-exporter

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter

configuration of the prometheus exporter

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.PrometheusExporter to be added to list

netgate-vpp-prometheus:prometheus-exporter
object (netgate.vpp.prometheus.PrometheusExporter)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:prometheus-exporter":
    {
    }
}

creates or updates netgate.vpp.prometheus.PrometheusExporter

put /data/netgate-vpp-prometheus:prometheus-exporter

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter

configuration of the prometheus exporter

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.PrometheusExporter to be added or updated

netgate-vpp-prometheus:prometheus-exporter-wrapper
object (netgate.vpp.prometheus.PrometheusExporterWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:prometheus-exporter-wrapper":
    {
    }
}

removes netgate.vpp.prometheus.PrometheusExporter

delete /data/netgate-vpp-prometheus:prometheus-exporter

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter

configuration of the prometheus exporter

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

get /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

returns netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

Responses

200

netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:dataplane-space-wrapper":
    {
    }
}

creates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

post /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

creates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.DataplaneSpace to be added to list

dataplane-space
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpace)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "dataplane-space":
    {
    }
}

creates or updates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

put /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

creates or updates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.DataplaneSpace to be added or updated

netgate-vpp-prometheus:dataplane-space-wrapper
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:dataplane-space-wrapper":
    {
    }
}

removes netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

delete /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space

removes netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters

get /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

list of data items to export

Responses

200

netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:filters-wrapper":
    {
    }
}

creates netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters

post /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

list of data items to export

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters to be added to list

filters
object (netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "filters":
    {
    }
}

creates or updates netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters

put /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

list of data items to export

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters to be added or updated

netgate-vpp-prometheus:filters-wrapper
object (netgate.vpp.prometheus.prometheusexporter.dataplanespace.FiltersWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:filters-wrapper":
    {
    }
}

removes netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters

delete /data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters

list of data items to export

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/dataplane-space/filters"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.vpp.prometheus.prometheusexporter.HostSpace

get /data/netgate-vpp-prometheus:prometheus-exporter/host-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space

returns netgate.vpp.prometheus.prometheusexporter.HostSpace

Responses

200

netgate.vpp.prometheus.prometheusexporter.HostSpace

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:host-space-wrapper":
    {
    }
}

creates netgate.vpp.prometheus.prometheusexporter.HostSpace

post /data/netgate-vpp-prometheus:prometheus-exporter/host-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space

creates netgate.vpp.prometheus.prometheusexporter.HostSpace

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.HostSpace to be added to list

host-space
object (netgate.vpp.prometheus.prometheusexporter.HostSpace)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "host-space":
    {
    }
}

creates or updates netgate.vpp.prometheus.prometheusexporter.HostSpace

put /data/netgate-vpp-prometheus:prometheus-exporter/host-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space

creates or updates netgate.vpp.prometheus.prometheusexporter.HostSpace

Request Body schema: application/yang-data+json

netgate.vpp.prometheus.prometheusexporter.HostSpace to be added or updated

netgate-vpp-prometheus:host-space-wrapper
object (netgate.vpp.prometheus.prometheusexporter.HostSpaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:host-space-wrapper":
    {
    }
}

removes netgate.vpp.prometheus.prometheusexporter.HostSpace

delete /data/netgate-vpp-prometheus:prometheus-exporter/host-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space

removes netgate.vpp.prometheus.prometheusexporter.HostSpace

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space"

	req, _ := http.NewRequest("DELETE", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

returns netgate.vpp.prometheus.prometheusexporter.hostspace.Filters

get /data/netgate-vpp-prometheus:prometheus-exporter/host-space/filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space/filters

list of data items to export

Responses

200

netgate.vpp.prometheus.prometheusexporter.hostspace.Filters

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/host-space/filters"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-vpp-prometheus:filters-wrapper":
    {