Provide RPCs to control VPP Prometheus Exporter Copyright 2018-2020 Rubicon Communications, LLC.
configuration of the prometheus exporter
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)) }
{- "netgate-vpp-prometheus:prometheus-exporter": {
- "netgate-vpp-prometheus:dataplane-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}, - "netgate-vpp-prometheus:host-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
}
configuration of the prometheus exporter
netgate.vpp.prometheus.PrometheusExporter to be added to list
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpace) | |
object (netgate.vpp.prometheus.prometheusexporter.HostSpace) |
{- "netgate-vpp-prometheus:dataplane-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}, - "netgate-vpp-prometheus:host-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
configuration of the prometheus exporter
netgate.vpp.prometheus.PrometheusExporter to be added or updated
object (netgate.vpp.prometheus.PrometheusExporter) configuration of the prometheus exporter |
{- "netgate-vpp-prometheus:prometheus-exporter": {
- "netgate-vpp-prometheus:dataplane-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}, - "netgate-vpp-prometheus:host-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
}
configuration of the prometheus exporter
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
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)) }
{- "netgate-vpp-prometheus:dataplane-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
creates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace
netgate.vpp.prometheus.prometheusexporter.DataplaneSpace to be added to list
object (netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters) list of data items to export |
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
creates or updates netgate.vpp.prometheus.prometheusexporter.DataplaneSpace
netgate.vpp.prometheus.prometheusexporter.DataplaneSpace to be added or updated
object (netgate.vpp.prometheus.prometheusexporter.DataplaneSpace) |
{- "netgate-vpp-prometheus:dataplane-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
removes netgate.vpp.prometheus.prometheusexporter.DataplaneSpace
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)) }
list of data items to export
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)) }
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
list of data items to export
netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters to be added to list
netgate-vpp-prometheus:filter | Array of strings regular expression for data to export |
{- "netgate-vpp-prometheus:filter": [
- "string"
]
}
list of data items to export
netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters to be added or updated
object (netgate.vpp.prometheus.prometheusexporter.dataplanespace.Filters) list of data items to export |
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
list of data items to export
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
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)) }
{- "netgate-vpp-prometheus:host-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
creates netgate.vpp.prometheus.prometheusexporter.HostSpace
netgate.vpp.prometheus.prometheusexporter.HostSpace to be added to list
object (netgate.vpp.prometheus.prometheusexporter.hostspace.Filters) list of data items to export |
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
creates or updates netgate.vpp.prometheus.prometheusexporter.HostSpace
netgate.vpp.prometheus.prometheusexporter.HostSpace to be added or updated
object (netgate.vpp.prometheus.prometheusexporter.HostSpace) |
{- "netgate-vpp-prometheus:host-space": {
- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
}
removes netgate.vpp.prometheus.prometheusexporter.HostSpace
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)) }
list of data items to export
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)) }
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
list of data items to export
netgate.vpp.prometheus.prometheusexporter.hostspace.Filters to be added to list
netgate-vpp-prometheus:filter | Array of strings regular expression for data to export |
{- "netgate-vpp-prometheus:filter": [
- "string"
]
}
list of data items to export
netgate.vpp.prometheus.prometheusexporter.hostspace.Filters to be added or updated
object (netgate.vpp.prometheus.prometheusexporter.hostspace.Filters) list of data items to export |
{- "netgate-vpp-prometheus:filters": {
- "netgate-vpp-prometheus:filter": [
- "string"
]
}
}
list of data items to export
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("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
operates on netgate.vpp.prometheus.PrometheusControl
object (netgate.vpp.prometheus.prometheuscontrol.Input) |
{- "input": {
- "netgate-vpp-prometheus:namespace": "host",
- "netgate-vpp-prometheus:operation": "start"
}
}
{- "output": {
- "netgate-vpp-prometheus:stdout": "string"
}
}