SYSLOG-Netconf
SYSLOG
Section titled “SYSLOG”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /syslog | Y | merge, replace, create, delete | — |
| /syslog/remote-server/{ip} | Y | merge, replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage Syslog configurations on AsterNOS devices.
Modify Syslog Source Interface
Section titled “Modify Syslog Source Interface”The source-interface value must be a valid interface name that can be used as the source for syslog server communication. It can be one of the following types:
- The physical port, named like “Ethernet0”, etc
- The sub-vlan-interfaces, named like “Eth0.1”, etc
- Loopback interfaces, named like “Loopback0”, etc
- VLAN interfaces named with valid VLAN IDs ranging from 0 to 4094, such as “Vlan100”, etc
- The mgmt interface “eth0”
Request example to modify syslog source interface via edit-config.
<config> <top> <syslog> <source-interface>eth0</source-interface> </syslog> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2ae38810-e0b8-46fd-b32c-29db527e1bb2"> <ok/></rpc-reply>Create Remote Syslog Server
Section titled “Create Remote Syslog Server”When configuring a syslog server with VRF, ensure the VRF exists first; otherwise, connection errors may occur since the network update may delays syslog connectivity.
Request example to create remote syslog server via edit-config.
<config> <top> <syslog> <remote-server> <ip>192.168.1.1</ip> <port>514</port> <vrf>default</vrf> </remote-server> </syslog> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:33955930-8051-4a86-903b-e3a335fc0d22"> <ok/></rpc-reply>Modify Remote Syslog Server
Section titled “Modify Remote Syslog Server”When configuring a syslog server with VRF, ensure the VRF exists first; otherwise, connection errors may occur since the network update may delays syslog connectivity.
Request example to modify remote syslog server or source interface via edit-config.
<config> <top> <syslog> <remote-server> <ip>192.168.1.1</ip> </remote-server> <source-interface>eth0</source-interface> </syslog> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:33955930-8051-4a86-903b-e3a335fc0d22"> <ok/></rpc-reply>Delete Syslog Remote Server
Section titled “Delete Syslog Remote Server”Request example to delete syslog remote server via edit-config.
<config> <top> <syslog> <remote-server operation="delete"> <ip>192.168.1.1</ip> </remote-server> </syslog> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5e1e8349-d8e4-4d20-a8e5-89fa83712aee"> <ok/></rpc-reply>Delete Syslog Source Interface
Section titled “Delete Syslog Source Interface”Request example to delete syslog source interface via edit-config.
<config> <top> <syslog operation="merge"> <source-interface operation="delete"/> </syslog> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5e1e8349-d8e4-4d20-a8e5-89fa83712aee"> <ok/></rpc-reply>Delete All Syslog Configurations
Section titled “Delete All Syslog Configurations”Request example to delete syslog remote server and source interface via edit-config.
<config> <top> <syslog operation="delete"/> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5e1e8349-d8e4-4d20-a8e5-89fa83712aee"> <ok/></rpc-reply>Get All Syslog Configurations
Section titled “Get All Syslog Configurations”Request example to retrieve Syslog configurations via get-config with subtree filter.
<filter type="subtree"> <top> <syslog/> </top></filter>Response example
<data> <top> <syslog xmlns="http://asterfusion.com/ns/yang/asternos-syslog"> <source-interface>eth0</source-interface> <remote-server> <ip>192.168.1.1</ip> <port>514</port> <vrf>default</vrf> </remote-server> </syslog> </top></data>Properties Descriptions
Section titled “Properties Descriptions”Configuration for the syslog service
Section titled “Configuration for the syslog service”Tree Diagram
module: asternos-syslog +--rw syslog +--rw remote-server* [ip] | +--rw ip inet:ip-address-no-zone | +--rw port? uint16 | +--rw vrf? vrf:vrf-ref +--rw source-interface? stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| syslog | M | Path-only node, has no configurable value. Configuration for the syslog service. | |
| remote-server | M | Path-only node, has no configurable value. | |
| ip | O | inet:ip-address-no-zone | Remote syslog server ip |
| port | O | 1..65535 | Remote syslog server port,default: 514 Default value: 514 |
| vrf | O | vrf:vrf-ref | Set interface VRF. |
| source-interface | O | None | Syslog server source-interface |
Remote Server
Section titled “Remote Server”Tree Diagram
module: asternos-syslog +--rw syslog +--rw remote-server* [ip] +--rw ip inet:ip-address-no-zone +--rw port? uint16 +--rw vrf? vrf:vrf-refTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| remote-server | M | Path-only node, has no configurable value. | |
| ip | O | inet:ip-address-no-zone | Remote syslog server ip |
| port | O | 1..65535 | Remote syslog server port,default: 514 Default value: 514 |
| vrf | O | vrf:vrf-ref | Set interface VRF. |