This YANG module provides specifications of operations and data related to logging management on TNSR.
Copyright 2024 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config" 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-logging:logging-config": {
- "netgate-logging:remote-servers": {
- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
}
}
Logging configuration parameters.
netgate.logging.LoggingConfig to be added to list
object (netgate.logging.loggingconfig.RemoteServers) Remote servers. |
{- "netgate-logging:remote-servers": {
- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
}
Logging configuration parameters.
netgate.logging.LoggingConfig to be added or updated
object (netgate.logging.LoggingConfig) Logging configuration parameters. |
{- "netgate-logging:logging-config": {
- "netgate-logging:remote-servers": {
- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config" 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)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers" 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-logging:remote-servers": {
- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
}
Remote servers.
netgate.logging.loggingconfig.RemoteServers to be added to list
Array of objects (netgate.logging.loggingconfig.remoteservers.RemoteServer) Server name. |
{- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
Remote servers.
netgate.logging.loggingconfig.RemoteServers to be added or updated
object (netgate.logging.loggingconfig.RemoteServers) Remote servers. |
{- "netgate-logging:remote-servers": {
- "netgate-logging:remote-server": [
- {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
]
}
}
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers" 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)) }
Server name.
netgate.logging.loggingconfig.remoteservers.RemoteServer to be added to list
Array of objects (netgate.logging.loggingconfig.remoteservers.remoteserver.Filter) Filters by facility | |
netgate-logging:address | string IPv4 or IPv6 or FQDN address |
netgate-logging:transport-protocol | string (netgate.logging.LogserverTransportProtocolT) Enum: "udp" "tcp" |
netgate-logging:port | integer <int32> Logging server port |
netgate-logging:namespace | string (netgate.logging.Namespace) Enum: "host" "dataplane" |
netgate-logging:name | string A name you give to a server. |
netgate-logging:description | string A text description for the log server. |
{- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
Server name.
name required | string Id of remote-server |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers/remote-server=%7Bname%7D" 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-logging:remote-server": {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
}
Server name.
name required | string Id of remote-server |
netgate.logging.loggingconfig.remoteservers.RemoteServer to be added or updated
object (netgate.logging.loggingconfig.remoteservers.RemoteServer) Server name. |
{- "netgate-logging:remote-server": {
- "netgate-logging:filter": [
- {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
], - "netgate-logging:address": "string",
- "netgate-logging:transport-protocol": "udp",
- "netgate-logging:port": 0,
- "netgate-logging:namespace": "host",
- "netgate-logging:name": "string",
- "netgate-logging:description": "string"
}
}
Server name.
name required | string Id of remote-server |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers/remote-server=%7Bname%7D" 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)) }
Filters by facility
name required | string Id of remote-server |
netgate.logging.loggingconfig.remoteservers.remoteserver.Filter to be added to list
netgate-logging:priority | string (netgate.logging.SystemdPriorityT) Enum: "emerg" "alert" "crit" "err" "warning" "notice" "info" "debug" |
netgate-logging:facility | string Syslog facility |
{- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
Filters by facility
name required | string Id of remote-server |
facility required | string Id of filter |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers/remote-server=%7Bname%7D/filter=%7Bfacility%7D" 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-logging:filter": {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
}
Filters by facility
name required | string Id of remote-server |
facility required | string Id of filter |
netgate.logging.loggingconfig.remoteservers.remoteserver.Filter to be added or updated
object (netgate.logging.loggingconfig.remoteservers.remoteserver.Filter) Filters by facility |
{- "netgate-logging:filter": {
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": "string"
}
}
Filters by facility
name required | string Id of remote-server |
facility required | string Id of filter |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-logging:logging-config/remote-servers/remote-server=%7Bname%7D/filter=%7Bfacility%7D" 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.logging.LoggingGetMessages
object (netgate.logging.logginggetmessages.Input) |
{- "input": {
- "netgate-logging:after-time": 0,
- "netgate-logging:identifier": [
- "string"
], - "netgate-logging:unit": [
- "ipsec"
], - "netgate-logging:recent-lines": 0,
- "netgate-logging:before-time": 0,
- "netgate-logging:kernel": true,
- "netgate-logging:reverse": true,
- "netgate-logging:priority": "emerg",
- "netgate-logging:facility": [
- "kern"
]
}
}
{- "output": {
- "netgate-logging:stdout": "string"
}
}
operates on netgate.logging.RsyslogControl
object (netgate.logging.rsyslogcontrol.Input) |
{- "input": {
- "netgate-logging:namespace": "host",
- "netgate-logging:operation": "start"
}
}
{- "output": {
- "netgate-logging:stdout": "string"
}
}