netgate-logging API (24.10)

This YANG module provides specifications of operations and data related to logging management on TNSR.

Copyright 2024 Rubicon Communications, LLC.

logging-config

returns netgate.logging.LoggingConfig

Logging configuration parameters.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-logging:logging-config": {
    }
}

creates netgate.logging.LoggingConfig

Logging configuration parameters.

Request Body schema: application/yang-data+json

netgate.logging.LoggingConfig to be added to list

object (netgate.logging.loggingconfig.RemoteServers)

Remote servers.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-servers": {
    }
}

creates or updates netgate.logging.LoggingConfig

Logging configuration parameters.

Request Body schema: application/yang-data+json

netgate.logging.LoggingConfig to be added or updated

object (netgate.logging.LoggingConfig)

Logging configuration parameters.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:logging-config": {
    }
}

removes netgate.logging.LoggingConfig

Logging configuration parameters.

Responses

Request samples

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))

}

returns netgate.logging.loggingconfig.RemoteServers

Remote servers.

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-servers": {
    }
}

creates netgate.logging.loggingconfig.RemoteServers

Remote servers.

Request Body schema: application/yang-data+json

netgate.logging.loggingconfig.RemoteServers to be added to list

Array of objects (netgate.logging.loggingconfig.remoteservers.RemoteServer)

Server name.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-server": [
    ]
}

creates or updates netgate.logging.loggingconfig.RemoteServers

Remote servers.

Request Body schema: application/yang-data+json

netgate.logging.loggingconfig.RemoteServers to be added or updated

object (netgate.logging.loggingconfig.RemoteServers)

Remote servers.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-servers": {
    }
}

removes netgate.logging.loggingconfig.RemoteServers

Remote servers.

Responses

Request samples

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))

}

creates netgate.logging.loggingconfig.remoteservers.RemoteServer

Server name.

Request Body schema: application/yang-data+json

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.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:filter": [
    ],
  • "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"
}

returns netgate.logging.loggingconfig.remoteservers.RemoteServer

Server name.

path Parameters
name
required
string

Id of remote-server

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-server": {
    }
}

creates or updates netgate.logging.loggingconfig.remoteservers.RemoteServer

Server name.

path Parameters
name
required
string

Id of remote-server

Request Body schema: application/yang-data+json

netgate.logging.loggingconfig.remoteservers.RemoteServer to be added or updated

object (netgate.logging.loggingconfig.remoteservers.RemoteServer)

Server name.

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:remote-server": {
    }
}

removes netgate.logging.loggingconfig.remoteservers.RemoteServer

Server name.

path Parameters
name
required
string

Id of remote-server

Responses

Request samples

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))

}

creates netgate.logging.loggingconfig.remoteservers.remoteserver.Filter

Filters by facility

path Parameters
name
required
string

Id of remote-server

Request Body schema: application/yang-data+json

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

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:priority": "emerg",
  • "netgate-logging:facility": "string"
}

returns netgate.logging.loggingconfig.remoteservers.remoteserver.Filter

Filters by facility

path Parameters
name
required
string

Id of remote-server

facility
required
string

Id of filter

Responses

Request samples

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))

}

Response samples

Content type
application/yang-data+json
{
  • "netgate-logging:filter": {
    }
}

creates or updates netgate.logging.loggingconfig.remoteservers.remoteserver.Filter

Filters by facility

path Parameters
name
required
string

Id of remote-server

facility
required
string

Id of filter

Request Body schema: application/yang-data+json

netgate.logging.loggingconfig.remoteservers.remoteserver.Filter to be added or updated

object (netgate.logging.loggingconfig.remoteservers.remoteserver.Filter)

Filters by facility

Responses

Request samples

Content type
application/yang-data+json
{
  • "netgate-logging:filter": {
    }
}

removes netgate.logging.loggingconfig.remoteservers.remoteserver.Filter

Filters by facility

path Parameters
name
required
string

Id of remote-server

facility
required
string

Id of filter

Responses

Request samples

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))

}

logging-get-messages

operates on netgate.logging.LoggingGetMessages

operates on netgate.logging.LoggingGetMessages

Request Body schema: application/yang-data+json
object (netgate.logging.logginggetmessages.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}

rsyslog-control

operates on netgate.logging.RsyslogControl

operates on netgate.logging.RsyslogControl

Request Body schema: application/yang-data+json
object (netgate.logging.rsyslogcontrol.Input)

Responses

Request samples

Content type
application/yang-data+json
{
  • "input": {
    }
}

Response samples

Content type
application/yang-data+json
{
  • "output": {
    }
}