netgate-vpp-prometheus API (21.03)

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":
    {
    }
}

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

dataplane-space
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpace)
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
{
  • "dataplane-space":
    {
    },
  • "host-space":
    {
    }
}

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
object (netgate.vpp.prometheus.PrometheusExporter)

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":
    {
    }
}

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/netgate-vpp-prometheus:dataplane-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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/netgate-vpp-prometheus: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":
    {
    }
}

creates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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

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

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpace)

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":
    {
    }
}

removes netgate.vpp.prometheus.prometheusexporter.DataplaneSpace

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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/netgate-vpp-prometheus: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/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus:filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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

filter
Array of strings

regular expression for data to export

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

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

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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
object (netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters)

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":
    {
    }
}

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

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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/netgate-vpp-prometheus:dataplane-space/netgate-vpp-prometheus: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/netgate-vpp-prometheus:host-space

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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/netgate-vpp-prometheus: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":
    {
    }
}

creates netgate.vpp.prometheus.prometheusexporter.HostSpace

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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

filters
object (netgate.vpp.prometheus.prometheusexporter.hostspace.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.HostSpace

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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
object (netgate.vpp.prometheus.prometheusexporter.HostSpace)

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":
    {
    }
}

removes netgate.vpp.prometheus.prometheusexporter.HostSpace

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

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus: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/netgate-vpp-prometheus: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/netgate-vpp-prometheus:host-space/netgate-vpp-prometheus:filters

Example URL

https://hostname/restconf/data/netgate-vpp-prometheus:prometheus-exporter/netgate-vpp-prometheus:host-space/netgate-vpp-prometheus: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/netgate-vpp-prometheus:host-space/netgate-vpp-prometheus: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":
    {
    }
}