Syslog
Test suite to check syslog
Test Syslog
Description
Show the system host name and check the syslog message
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog global level info
Step 2: Run command show host name
at DUT0
and expect this output:
Show output
osdx
Step 3: Run command file show running://log/messages | tail -n 200
at DUT0
and check if output matches the following regular expressions:
executed a new command: 'show host name'Show output
2024-10-10 08:53:19.422859 daemon-err , cfgd[1323]: [16525]Command output:#012[ system ntp authentication-key 1 encrypted-key ]#012\"U2FsdGVkX18ZNMEGNPxW9F4Wl9qIOVarp+toGYfbmf4=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters#012Commit validation failed#012 2024-10-10 08:53:19.891036 daemon-err , cfgd[1323]: External python command [cfg.strong_password check_password system ntp authentication-key 1 encrypted-key U2FsdGVkX19jK8+fqv6CGMzMsDDTlQK/z8zu6uEGdgM=] finished with status 3 2024-10-10 08:53:19.891192 daemon-err , cfgd[1323]: [ system ntp authentication-key 1 encrypted-key ] 2024-10-10 08:53:19.891244 daemon-err , cfgd[1323]: \"U2FsdGVkX19jK8+fqv6CGMzMsDDTlQK/z8zu6uEGdgM=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters 2024-10-10 08:53:19.891286 daemon-err , cfgd[1323]: Commit validation failed 2024-10-10 08:53:19.893684 daemon-err , cfgd[1323]: [16525]Command output:#012[ system ntp authentication-key 1 encrypted-key ]#012\"U2FsdGVkX19jK8+fqv6CGMzMsDDTlQK/z8zu6uEGdgM=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters#012Commit validation failed#012 2024-10-10 08:53:20.349672 daemon-err , cfgd[1323]: External python command [cfg.strong_password check_password system ntp authentication-key 1 encrypted-key U2FsdGVkX1+kgtEeEnT8czHkF/vr4XkKMCWy3WfzzaM=] finished with status 3 2024-10-10 08:53:20.349846 daemon-err , cfgd[1323]: [ system ntp authentication-key 1 encrypted-key ] 2024-10-10 08:53:20.349907 daemon-err , cfgd[1323]: \"U2FsdGVkX1+kgtEeEnT8czHkF/vr4XkKMCWy3WfzzaM=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters 2024-10-10 08:53:20.349967 daemon-err , cfgd[1323]: Commit validation failed 2024-10-10 08:53:20.352109 daemon-err , cfgd[1323]: [16525]Command output:#012[ system ntp authentication-key 1 encrypted-key ]#012\"U2FsdGVkX1+kgtEeEnT8czHkF/vr4XkKMCWy3WfzzaM=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters#012Commit validation failed#012 2024-10-10 08:53:20.764458 daemon-err , cfgd[1323]: External python command [cfg.strong_password check_password system ntp authentication-key 1 encrypted-key U2FsdGVkX1/KJY4/txKGPY+o0CS4ytImYG6J9q3fRBo=] finished with status 3 2024-10-10 08:53:20.764507 daemon-err , cfgd[1323]: [ system ntp authentication-key 1 encrypted-key ] 2024-10-10 08:53:20.764528 daemon-err , cfgd[1323]: \"U2FsdGVkX1/KJY4/txKGPY+o0CS4ytImYG6J9q3fRBo=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters 2024-10-10 08:53:20.764553 daemon-err , cfgd[1323]: Commit validation failed 2024-10-10 08:53:20.765995 daemon-err , cfgd[1323]: [16525]Command output:#012[ system ntp authentication-key 1 encrypted-key ]#012\"U2FsdGVkX1/KJY4/txKGPY+o0CS4ytImYG6J9q3fRBo=\" strong-password: doesn't have uppercase, lowercase, numbers and special characters#012Commit validation failed#012 2024-10-10 08:53:21.272426 daemon-err , ntpd[19072]: AUTH: authreadkeys: reading /etc/ntp.keys 2024-10-10 08:53:21.272456 daemon-err , ntpd[19072]: AUTH: authreadkeys: added 1 keys 2024-10-10 08:53:21.663652 daemon-err , cfgd[1323]: [16525]Command output:#012Login password too weak, too short and/or has not lowercase, uppercase and special characters#012Value validation failed#012 2024-10-10 08:53:22.005757 daemon-err , cfgd[1323]: [16525]Command output:#012Login password too weak, too short and/or has not lowercase, uppercase and special characters#012Value validation failed#012 2024-10-10 08:53:22.386782 daemon-err , cfgd[1323]: [16525]Command output:#012Login password too weak, too short and/or has not lowercase, uppercase and special characters#012Value validation failed#012 2024-10-10 08:53:22.757264 daemon-err , cfgd[1323]: [16525]Command output:#012Login password too weak, too short and/or has not lowercase, uppercase and special characters#012Value validation failed#012 2024-10-10 08:54:33.403564 daemon-err , cfgd[1323]: External python command [op.pki scep info CSR] finished with status 1 2024-10-10 08:54:53.468988 daemon-err , cfgd[1323]: External python command [op.pki scep info CSR] finished with status 1 2024-10-10 08:54:59.710499 user-err , scep_controller: Failed to get CA certificate for CSR 'CSR' 2024-10-10 08:55:33.545567 daemon-info , systemd[1]: Stopping System Logging Service... 2024-10-10 08:55:33.545703 syslog-info , rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="16721" x-info="https://www.rsyslog.com"] exiting on signal 15. 2024-10-10 08:55:33.546143 daemon-info , systemd[1]: rsyslog.service: Succeeded. 2024-10-10 08:55:33.546386 daemon-info , systemd[1]: Stopped System Logging Service. 2024-10-10 08:55:33.547216 daemon-info , systemd[1]: Starting System Logging Service... 2024-10-10 08:55:33.549168 syslog-info , rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.1901.0] 2024-10-10 08:55:33.549211 daemon-info , systemd[1]: Started System Logging Service. 2024-10-10 08:55:33.549298 syslog-info , rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="22123" x-info="https://www.rsyslog.com"] start 2024-10-10 08:55:33.550079 daemon-notice , cfgd[1323]: [16525]Completed change to active configuration 2024-10-10 08:55:33.552277 auth-notice , OSDxCLI: User 'admin' committed the configuration. 2024-10-10 08:55:33.608264 auth-notice , OSDxCLI: User 'admin' left the configuration menu. 2024-10-10 08:55:33.728012 auth-notice , OSDxCLI: User 'admin' executed a new command: 'show host name'.
Test Syslog File
Description
Create a new DHCP server and collect all the syslog messages produced by systemd.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog file systemd_msg set system syslog file systemd_msg level info set system syslog file systemd_msg app systemd
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth1 address 192.168.100.100/24 set service dhcp-server shared-network test subnet 192.168.100.0/24 start 192.168.100.150 stop 192.168.100.155
Step 3: Run command file show running://log/user/systemd_msg/systemd_msg | cat
at DUT0
and check if output contains the following tokens:
systemd[1]: Started "DHCP Server Service instance main".Show output
2024-10-10 08:55:39.495097 daemon-info , systemd[1]: Stopping System Logging Service... 2024-10-10 08:55:39.495764 daemon-info , systemd[1]: rsyslog.service: Succeeded. 2024-10-10 08:55:39.495992 daemon-info , systemd[1]: Stopped System Logging Service. 2024-10-10 08:55:39.496766 daemon-info , systemd[1]: Starting System Logging Service... 2024-10-10 08:55:39.498606 daemon-info , systemd[1]: Started System Logging Service. 2024-10-10 08:55:39.986913 daemon-info , systemd[1]: Started "DHCP Server Service instance main".
Test Syslog File Rotate
Description
Create a new DHCP server and collect all syslog messages produced by systemd. This test also rotates 10 saved files when a file weighing 100 kbytes is used.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog file systemd_msg set system syslog file systemd_msg level info set system syslog file systemd_msg app systemd set system syslog file systemd_msg archive files 10 set system syslog file systemd_msg archive size 100
Step 2: Set the following configuration in DUT0
:
set interfaces ethernet eth1 address 192.168.100.100/24 set service dhcp-server shared-network test subnet 192.168.100.0/24 start 192.168.100.150 stop 192.168.100.155
Step 3: Run command file show running://log/user/systemd_msg/systemd_msg | cat
at DUT0
and check if output contains the following tokens:
Started "DHCP Server Service instance main".Show output
2024-10-10 08:55:44.923996 daemon-info , systemd[1]: Stopping System Logging Service... 2024-10-10 08:55:44.924587 daemon-info , systemd[1]: rsyslog.service: Succeeded. 2024-10-10 08:55:44.924816 daemon-info , systemd[1]: Stopped System Logging Service. 2024-10-10 08:55:44.925574 daemon-info , systemd[1]: Starting System Logging Service... 2024-10-10 08:55:44.927463 daemon-info , systemd[1]: Started System Logging Service. 2024-10-10 08:55:45.460867 daemon-info , systemd[1]: Started "DHCP Server Service instance main".
Test Syslog Remote
Description
Add a remote host to send syslog messages and show the host name.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog host 10.215.168.1 level info set system syslog host 10.215.168.1 port 514 set system syslog host 10.215.168.1 protocol udp set interfaces ethernet eth0 address 10.215.168.64/24
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.128 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.128/0.128/0.128/0.000 ms
Step 3: Run command show host name
at DUT0
and expect this output:
Show output
osdx
Note
Check the server {log_file}
file and read the
{log_msg}
log message:
Show output
2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.736239+00:00 daemon-info osdx systemd[1]: Stopping System Logging Service... 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.736565+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="22827" x-info="https://www.rsyslog.com"] exiting on signal 15. 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.736972+00:00 daemon-info osdx systemd[1]: rsyslog.service: Succeeded. 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.737218+00:00 daemon-info osdx systemd[1]: Stopped System Logging Service. 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.738117+00:00 daemon-info osdx systemd[1]: Starting System Logging Service... 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.740004+00:00 syslog-info osdx rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.1901.0] 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.740054+00:00 daemon-info osdx systemd[1]: Started System Logging Service. 2024-10-10T08:55:51.668873+00:00 10.215.168.64 2024-10-10T08:55:50.740101+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="22951" x-info="https://www.rsyslog.com"] start 2024-10-10T08:55:51.669028+00:00 10.215.168.64 2024-10-10T08:55:50.741035+00:00 daemon-notice osdx cfgd[1323]: [16525]Completed change to active configuration 2024-10-10T08:55:51.671254+00:00 10.215.168.64 2024-10-10T08:55:50.743143+00:00 auth-notice osdx OSDxCLI: User 'admin' committed the configuration. 2024-10-10T08:55:51.688952+00:00 10.215.168.64 2024-10-10T08:55:50.760901+00:00 auth-notice osdx OSDxCLI: User 'admin' left the configuration menu. 2024-10-10T08:55:51.817757+00:00 10.215.168.64 2024-10-10T08:55:50.889628+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'. 2024-10-10T08:55:51.872994+00:00 10.215.168.64 2024-10-10T08:55:50.944884+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show host name'.
Test Syslog Remote With VRF
Description
Add a remote host to send syslog messages through a VRF and show the host name.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog host 10.215.168.1 level info set system syslog host 10.215.168.1 port 514 set system syslog host 10.215.168.1 protocol udp set system syslog host 10.215.168.1 local-vrf VRF0 set interfaces ethernet eth0 address 10.215.168.64/24 set interfaces ethernet eth0 vrf VRF0 set system vrf VRF0
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 vrf VRF0 count 1 size 56 timeout 1Show output
ping: Warning: source address might be selected on device other than VRF0. PING 10.215.168.1 (10.215.168.1) from 10.215.168.64 VRF0: 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.180 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.180/0.180/0.180/0.000 ms
Step 3: Run command show host name
at DUT0
and expect this output:
Show output
osdx
Note
Check the server {log_file}
file and read the
{log_msg}
log message:
Show output
2024-10-10T08:55:52.261954+00:00 10.215.168.64 2024-10-10T08:55:51.333805+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show version'. 2024-10-10T08:55:52.471088+00:00 10.215.168.64 2024-10-10T08:55:51.542912+00:00 user-warning osdx OSDxCLI: Signal 10 received 2024-10-10T08:55:52.485773+00:00 10.215.168.64 2024-10-10T08:55:51.557464+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'set system mode user'. 2024-10-10T08:55:53.307187+00:00 10.215.168.64 2024-10-10T08:55:52.378952+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'system coredump show'. 2024-10-10T08:55:53.724639+00:00 10.215.168.64 2024-10-10T08:55:52.796388+00:00 auth-notice osdx OSDxCLI: User 'admin' entered the configuration menu. 2024-10-10T08:55:53.778434+00:00 10.215.168.64 2024-10-10T08:55:52.850200+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'delete'. 2024-10-10T08:55:53.878869+00:00 10.215.168.64 2024-10-10T08:55:52.950557+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'. 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.931239+00:00 daemon-info osdx systemd[1]: Stopping System Logging Service... 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.931369+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23072" x-info="https://www.rsyslog.com"] exiting on signal 15. 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.932345+00:00 daemon-info osdx systemd[1]: rsyslog.service: Succeeded. 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.932442+00:00 daemon-info osdx systemd[1]: Stopped System Logging Service. 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.933153+00:00 daemon-info osdx systemd[1]: Starting System Logging Service... 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.935262+00:00 daemon-info osdx systemd[1]: Started System Logging Service. 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.936259+00:00 daemon-notice osdx cfgd[1323]: [16525]Completed change to active configuration 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.936386+00:00 syslog-info osdx rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.1901.0] 2024-10-10T08:55:57.174361+00:00 10.215.168.64 2024-10-10T08:55:56.936413+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23224" x-info="https://www.rsyslog.com"] start 2024-10-10T08:55:57.176670+00:00 10.215.168.64 2024-10-10T08:55:56.938858+00:00 auth-notice osdx OSDxCLI: User 'admin' committed the configuration. 2024-10-10T08:55:57.196917+00:00 10.215.168.64 2024-10-10T08:55:56.959085+00:00 auth-notice osdx OSDxCLI: User 'admin' left the configuration menu. 2024-10-10T08:55:57.415776+00:00 10.215.168.64 2024-10-10T08:55:57.177885+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'ping 10.215.168.1 vrf VRF0 count 1 size 56 timeout 1'. 2024-10-10T08:55:57.482405+00:00 10.215.168.64 2024-10-10T08:55:57.244459+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show host name'.
Test Syslog Remote With Interface
Description
Add a remote host to send syslog messages through a specific interface and show the host name.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog host 10.215.168.1 level info set system syslog host 10.215.168.1 port 514 set system syslog host 10.215.168.1 protocol udp set interfaces ethernet eth0 address 10.215.168.64/24 set system syslog host 10.215.168.1 local-interface eth0
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.239 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.239/0.239/0.239/0.000 ms
Step 3: Run command show host name
at DUT0
and expect this output:
Show output
osdx
Note
Check the server {log_file}
file and read the
{log_msg}
log message:
Show output
2024-10-10T08:55:57.883801+00:00 10.215.168.64 2024-10-10T08:55:57.645743+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show version'. 2024-10-10T08:55:58.057910+00:00 10.215.168.64 2024-10-10T08:55:57.819969+00:00 user-warning osdx OSDxCLI: Signal 10 received 2024-10-10T08:55:58.067165+00:00 10.215.168.64 2024-10-10T08:55:57.829111+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'set system mode user'. 2024-10-10T08:55:58.716851+00:00 10.215.168.64 2024-10-10T08:55:58.478777+00:00 daemon-warning osdx zebra[1280]: [RZ3YY-GPH41][EC 100663310] snmp[warning]: Warning: Failed to connect to the agentx master agent ([NIL]): 2024-10-10T08:55:58.911956+00:00 10.215.168.64 2024-10-10T08:55:58.673831+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'system coredump show'. 2024-10-10T08:55:59.261006+00:00 10.215.168.64 2024-10-10T08:55:59.023042+00:00 auth-notice osdx OSDxCLI: User 'admin' entered the configuration menu. 2024-10-10T08:55:59.313019+00:00 10.215.168.64 2024-10-10T08:55:59.075045+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'delete'. 2024-10-10T08:55:59.421406+00:00 10.215.168.64 2024-10-10T08:55:59.183230+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'. 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.725510+00:00 daemon-info osdx systemd[1]: Stopping System Logging Service... 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.725887+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23345" x-info="https://www.rsyslog.com"] exiting on signal 15. 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.726544+00:00 daemon-info osdx systemd[1]: rsyslog.service: Succeeded. 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.726603+00:00 daemon-info osdx systemd[1]: Stopped System Logging Service. 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.727301+00:00 daemon-info osdx systemd[1]: Starting System Logging Service... 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.729157+00:00 syslog-info osdx rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.1901.0] 2024-10-10T08:56:02.592605+00:00 10.215.168.64 2024-10-10T08:56:01.729196+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23502" x-info="https://www.rsyslog.com"] start 2024-10-10T08:56:02.592626+00:00 10.215.168.64 2024-10-10T08:56:01.729229+00:00 daemon-info osdx systemd[1]: Started System Logging Service. 2024-10-10T08:56:02.592857+00:00 10.215.168.64 2024-10-10T08:56:01.730133+00:00 daemon-notice osdx cfgd[1323]: [16525]Completed change to active configuration 2024-10-10T08:56:02.595219+00:00 10.215.168.64 2024-10-10T08:56:01.732264+00:00 auth-notice osdx OSDxCLI: User 'admin' committed the configuration. 2024-10-10T08:56:02.610412+00:00 10.215.168.64 2024-10-10T08:56:01.747606+00:00 auth-notice osdx OSDxCLI: User 'admin' left the configuration menu. 2024-10-10T08:56:02.751709+00:00 10.215.168.64 2024-10-10T08:56:01.888885+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'. 2024-10-10T08:56:02.820363+00:00 10.215.168.64 2024-10-10T08:56:01.957512+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show host name'.
Test Syslog Remote Single TLS
Description
Add a secured remote host to send syslog messages and show the host name.
Scenario
Step 1: Set the following configuration in DUT0
:
set system syslog host 10.215.168.1 level info set system syslog host 10.215.168.1 port 10514 set system syslog host 10.215.168.1 protocol tcp set system syslog host 10.215.168.1 tls ca running://ca.crt set system syslog host 10.215.168.1 tls permittedPeer "rsyslog.server.com" set interfaces ethernet eth0 address 10.215.168.64/24
Step 2: Ping IP address 10.215.168.1
from DUT0
:
admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1Show output
PING 10.215.168.1 (10.215.168.1) 56(84) bytes of data. 64 bytes from 10.215.168.1: icmp_seq=1 ttl=64 time=0.286 ms --- 10.215.168.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.286/0.286/0.286/0.000 ms
Step 3: Run command show host name
at DUT0
and expect this output:
Show output
osdx
Note
Check the server {log_file}
file and read the
{log_msg}
log message:
Show output
2024-10-10T08:56:02.999879+00:00 10.215.168.64 2024-10-10T08:56:02.136872+00:00 daemon-warning osdx zebra[1280]: [RZ3YY-GPH41][EC 100663310] snmp[warning]: Warning: Failed to connect to the agentx master agent ([NIL]): 2024-10-10T08:56:03.224590+00:00 10.215.168.64 2024-10-10T08:56:02.358019+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show version'. 2024-10-10T08:56:03.448835+00:00 10.215.168.64 2024-10-10T08:56:02.585902+00:00 user-warning osdx OSDxCLI: Signal 10 received 2024-10-10T08:56:03.458609+00:00 10.215.168.64 2024-10-10T08:56:02.595656+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'set system mode user'. 2024-10-10T08:56:04.347132+00:00 10.215.168.64 2024-10-10T08:56:03.484152+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'system coredump show'. 2024-10-10T08:56:04.715964+00:00 10.215.168.64 2024-10-10T08:56:03.852936+00:00 auth-notice osdx OSDxCLI: User 'admin' entered the configuration menu. 2024-10-10T08:56:04.766692+00:00 10.215.168.64 2024-10-10T08:56:03.903685+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'delete'. 2024-10-10T08:56:04.878105+00:00 10.215.168.64 2024-10-10T08:56:04.015029+00:00 auth-notice osdx OSDxCLI: User 'admin' added a new cfg line: 'set system login user admin authentication encrypted-password $6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'. 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.797116+00:00 daemon-info osdx systemd[1]: Stopping System Logging Service... 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.797251+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23623" x-info="https://www.rsyslog.com"] exiting on signal 15. 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.797605+00:00 daemon-info osdx systemd[1]: rsyslog.service: Succeeded. 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.797831+00:00 daemon-info osdx systemd[1]: Stopped System Logging Service. 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.798603+00:00 daemon-info osdx systemd[1]: Starting System Logging Service... 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.803686+00:00 syslog-info osdx rsyslogd: imuxsock: Acquired UNIX socket '/run/systemd/journal/syslog' (fd 3) from systemd. [v8.1901.0] 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.803716+00:00 syslog-info osdx rsyslogd: [origin software="rsyslogd" swVersion="8.1901.0" x-pid="23751" x-info="https://www.rsyslog.com"] start 2024-10-10T08:56:08.153476+00:00 10.215.168.64 2024-10-10T08:56:07.803750+00:00 daemon-info osdx systemd[1]: Started System Logging Service. 2024-10-10T08:56:08.153507+00:00 10.215.168.64 2024-10-10T08:56:07.804641+00:00 daemon-notice osdx cfgd[1323]: [16525]Completed change to active configuration 2024-10-10T08:56:08.153507+00:00 10.215.168.64 2024-10-10T08:56:07.807511+00:00 auth-notice osdx OSDxCLI: User 'admin' committed the configuration. 2024-10-10T08:56:08.153507+00:00 10.215.168.64 2024-10-10T08:56:07.824180+00:00 auth-notice osdx OSDxCLI: User 'admin' left the configuration menu. 2024-10-10T08:56:08.240614+00:00 10.215.168.64 2024-10-10T08:56:07.962983+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'. 2024-10-10T08:56:08.395387+00:00 10.215.168.64 2024-10-10T08:56:08.117699+00:00 auth-notice osdx OSDxCLI: User 'admin' executed a new command: 'show host name'.