...
On the CLI the configuration available include the command "session-id hostname", the session-id is an Optional command which Specifies syslog message session ID tagging while the hostname command Includes the hostname in the session ID tag. "logging host {{ip}} vrf {{vrf_name}} transport {{protocol}} port {{port_number}} session-id {{parameters_value}}" logging host X.X.X.X vrf Mgmt-intf transport udp port XXX session-id hostname When trying to apply this comand via netconf, it was noticed the Yang module did not provide any option to get the session-id or hostname option.
The call is done by using the yang module "Cisco-IOS-XE-native.yang" which includes the "Cisco-IOS-XE-logging.yang".
configure the command via CLI
Yang module details at: https://github.com/YangModels/yang/blob/main/vendor/cisco/xe/1693/Cisco-IOS-XE-logging.yang From the container host, there is no option to add the session-id option and hostname parameter: container host { description "Set syslog server IP address and parameters"; list ipv4-host-list { key "ipv4-host"; leaf ipv4-host { type inet:host; } } list ipv4-host-transport-list { key "ipv4-host"; leaf ipv4-host { type inet:host; } uses logging-host-transport-group; uses logging-host-option-group; } list ipv4-host-vrf-list { key "ipv4-host vrf"; leaf ipv4-host { type inet:host; } leaf vrf { description "Set VRF option"; type string; } uses logging-host-option-group; } list ipv4-host-vrf-transport-list { key "ipv4-host vrf"; leaf ipv4-host { type inet:host; } leaf vrf { description "Set VRF option"; type string; } uses logging-host-transport-group; uses logging-host-option-group; } There is a container for transport to specify TCP or UDP and the port number: grouping logging-host-transport-group { container transport { container udp { leaf-list port { type uint16; } } container tcp { leaf-list port { type uint16; } } } } Finally there is an option to add a discriminator which includes the session-id option but there is no hostname parameter: grouping logging-host-option-group { leaf discriminator { description "Specify a message discriminator identifier for this logging session"; type string; } // filtered Enable filtered logging // sequence-num-session Include session sequence number tag in // syslog message // session-id Specify syslog message session ID tagging // xml Enable logging in XML }