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 login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
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
2025-05-19 18:39:48.517999 daemon-err , modulelauncher[485467]:  Command 'useradd -s '/sbin/tacacs_shell' -m -N -g 'cfg_admin' -G 'frrvty,frr,osdxcfg,sudo,adm,dip,disk,users' tacacs15' returned non-zero exit status 9.
2025-05-19 18:39:57.894785 authpriv-err , login[485575]:  Unable to open config file /etc/aaa/tacacs/acct-tacgroup1: No such file or directory
2025-05-19 18:43:36.823799 authpriv-err , login[487020]:  pam_mail(login:session): pam_putenv: delete non-existent entry; MAIL
2025-05-19 18:46:58.692043 user-err , OSDxCLI:   Session idle timeout reached. Closing session
2025-05-19 18:47:20.133878 user-err , OSDxCLI:   Session idle timeout reached. Closing session
2025-05-19 18:47:41.240285 user-err , OSDxCLI:   Session idle timeout reached. Closing session
2025-05-19 18:48:26.098988 authpriv-err , login[490430]:  Permission denied
2025-05-19 18:48:26.456891 auth-err , sshd[490438]:  error: PAM: pam_open_session(): Permission denied
2025-05-19 18:48:43.359303 user-crit , systemd-coredump[490785]:  Process 490729 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 490729: #0  0x00007f64ca09d9dc pselect (libc.so.6 + 0xfe9dc) #1  0x00005644014f32ef n/a (cnm-client + 0x532ef) #2  0x00005644014f505f n/a (cnm-client + 0x5505f) #3  0x00005644014cb94b n/a (cnm-clie
nt + 0x2b94b) #4  0x00007f64c9fc624a n/a (libc.so.6 + 0x2724a) #5  0x00007f64c9fc6305 __libc_start_main (libc.so.6 + 0x27305) #6  0x00005644014d2f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:48:46.307512 user-err , cfgd_watchdog:  Received signal 1 from parent. Exiting...
2025-05-19 18:48:46.362710 local0-notice , osdx-reboot:  shutdown v4.2.3.3 2025-05-19 14:16:18 - 2025-05-19 18:48:46 (up 4 hours, 32 minutes)
2025-05-19 18:49:12.267038 kern-err , kernel: [    8.428004] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:12.267039 kern-err , kernel: [    8.429100] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:12.267042 kern-err , kernel: [    8.510993] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:12.267042 kern-err , kernel: [    8.512148] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:12.267111 kern-err , kernel: [   10.740109] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:12.267111 kern-err , kernel: [   10.740112] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:13.649890 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:49:13 (reason: Performed by user)
2025-05-19 18:49:55.949006 kern-err , kernel: [    8.207072] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:55.949007 kern-err , kernel: [    8.208220] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:55.949013 kern-err , kernel: [    8.293591] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:55.949046 kern-err , kernel: [    8.294314] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:55.949085 kern-err , kernel: [   10.486934] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:49:55.949085 kern-err , kernel: [   10.486937] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:49:58.491939 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:49:58 (reason: Panic)
2025-05-19 18:50:12.520508 user-crit , systemd-coredump[2307]:  Process 2251 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2251: #0  0x00007f93f2e949dc pselect (libc.so.6 + 0xfe9dc) #1  0x000055dc724fa2ef n/a (cnm-client + 0x532ef) #2  0x000055dc724fc05f n/a (cnm-client + 0x5505f) #3  0x000055dc724d294b n/a (cnm-client + 0
x2b94b) #4  0x00007f93f2dbd24a n/a (libc.so.6 + 0x2724a) #5  0x00007f93f2dbd305 __libc_start_main (libc.so.6 + 0x27305) #6  0x000055dc724d9f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:50:17.277222 user-crit , systemd-coredump[2440]:  Process 2386 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2386: #0  0x00007f5e016ad9dc pselect (libc.so.6 + 0xfe9dc) #1  0x0000564532a042ef n/a (cnm-client + 0x532ef) #2  0x0000564532a0605f n/a (cnm-client + 0x5505f) #3  0x00005645329dc94b n/a (cnm-client + 0
x2b94b) #4  0x00007f5e015d624a n/a (libc.so.6 + 0x2724a) #5  0x00007f5e015d6305 __libc_start_main (libc.so.6 + 0x27305) #6  0x00005645329e3f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:50:22.118069 user-crit , systemd-coredump[2573]:  Process 2520 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2520: #0  0x00007f6554de19dc pselect (libc.so.6 + 0xfe9dc) #1  0x00005607e6ecf2ef n/a (cnm-client + 0x532ef) #2  0x00005607e6ed105f n/a (cnm-client + 0x5505f) #3  0x00005607e6ea794b n/a (cnm-client + 0
x2b94b) #4  0x00007f6554d0a24a n/a (libc.so.6 + 0x2724a) #5  0x00007f6554d0a305 __libc_start_main (libc.so.6 + 0x27305) #6  0x00005607e6eaef61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:51:09.840248 kern-err , kernel: [    8.229413] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:51:09.840249 kern-err , kernel: [    8.230121] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:51:09.840251 kern-err , kernel: [    8.313482] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:51:09.840254 kern-err , kernel: [    8.314209] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:51:09.840349 kern-err , kernel: [   10.518885] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:51:09.840350 kern-err , kernel: [   10.518889] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:51:12.271148 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:51:12 (reason: Panic)
2025-05-19 18:51:19.992109 user-crit , systemd-coredump[2086]:  Process 2032 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2032: #0  0x00007f5bb35089dc pselect (libc.so.6 + 0xfe9dc) #1  0x00005647cce662ef n/a (cnm-client + 0x532ef) #2  0x00005647cce6805f n/a (cnm-client + 0x5505f) #3  0x00005647cce3e94b n/a (cnm-client + 0
x2b94b) #4  0x00007f5bb343124a n/a (libc.so.6 + 0x2724a) #5  0x00007f5bb3431305 __libc_start_main (libc.so.6 + 0x27305) #6  0x00005647cce45f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:51:24.845674 user-crit , systemd-coredump[2219]:  Process 2169 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2169: #0  0x00007f90201689dc pselect (libc.so.6 + 0xfe9dc) #1  0x000055dedaa762ef n/a (cnm-client + 0x532ef) #2  0x000055dedaa7805f n/a (cnm-client + 0x5505f) #3  0x000055dedaa4e94b n/a (cnm-client + 0
x2b94b) #4  0x00007f902009124a n/a (libc.so.6 + 0x2724a) #5  0x00007f9020091305 __libc_start_main (libc.so.6 + 0x27305) #6  0x000055dedaa55f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:51:36.250376 user-crit , systemd-coredump[2599]:  Process 2544 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2544: #0  0x00007f07c0a6d9dc pselect (libc.so.6 + 0xfe9dc) #1  0x000055a010d112ef n/a (cnm-client + 0x532ef) #2  0x000055a010d1305f n/a (cnm-client + 0x5505f) #3  0x000055a010ce994b n/a (cnm-client + 0
x2b94b) #4  0x00007f07c099624a n/a (libc.so.6 + 0x2724a) #5  0x00007f07c0996305 __libc_start_main (libc.so.6 + 0x27305) #6  0x000055a010cf0f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:52:16.831981 kern-err , kernel: [    8.224126] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:52:16.831981 kern-err , kernel: [    8.224856] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:52:16.831985 kern-err , kernel: [    8.309383] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:52:16.832017 kern-err , kernel: [    8.310469] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:52:16.832057 kern-err , kernel: [   10.585431] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:52:16.832057 kern-err , kernel: [   10.585435] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:52:19.499399 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:52:19 (reason: Panic)
2025-05-19 18:52:37.384255 user-crit , systemd-coredump[2396]:  Process 2338 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2338: #0  0x00007fa3312769dc pselect (libc.so.6 + 0xfe9dc) #1  0x000055dcb78db2ef n/a (cnm-client + 0x532ef) #2  0x000055dcb78dd05f n/a (cnm-client + 0x5505f) #3  0x000055dcb78b394b n/a (cnm-client + 0
x2b94b) #4  0x00007fa33119f24a n/a (libc.so.6 + 0x2724a) #5  0x00007fa33119f305 __libc_start_main (libc.so.6 + 0x27305) #6  0x000055dcb78baf61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:53:19.149427 kern-err , kernel: [    8.271115] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:53:19.149427 kern-err , kernel: [    8.271874] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:53:19.149431 kern-err , kernel: [    8.363240] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:53:19.149466 kern-err , kernel: [    8.363973] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:53:19.149497 kern-err , kernel: [   10.572610] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:53:19.149497 kern-err , kernel: [   10.572614] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:53:21.700907 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:53:21 (reason: Panic)
2025-05-19 18:53:36.560051 user-crit , systemd-coredump[2318]:  Process 2260 (cnm-client) of user 0 dumped core.  Module libsystemd.so.0 from deb systemd-252.17-1~deb12u1.amd64 Stack trace of thread 2260: #0  0x00007f2c851f69dc pselect (libc.so.6 + 0xfe9dc) #1  0x000055a7a84552ef n/a (cnm-client + 0x532ef) #2  0x000055a7a845705f n/a (cnm-client + 0x5505f) #3  0x000055a7a842d94b n/a (cnm-client + 0
x2b94b) #4  0x00007f2c8511f24a n/a (libc.so.6 + 0x2724a) #5  0x00007f2c8511f305 __libc_start_main (libc.so.6 + 0x27305) #6  0x000055a7a8434f61 n/a (cnm-client + 0x32f61) ELF object binary architecture: AMD x86-64
2025-05-19 18:54:16.796179 kern-err , kernel: [    8.122793] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:54:16.796181 kern-err , kernel: [    8.123541] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:54:16.796184 kern-err , kernel: [    8.206857] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:54:16.796233 kern-err , kernel: [    8.207601] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:54:16.796262 kern-err , kernel: [   10.408171] I/O error, dev sdb, sector 63 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 2
2025-05-19 18:54:16.796262 kern-err , kernel: [   10.408174] Buffer I/O error on dev sdb1, logical block 0, lost sync page write
2025-05-19 18:54:19.471702 local0-notice , osdx-reboot:  bootup v4.2.3.3 2025-05-19 18:54:19 (reason: Panic)
2025-05-19 18:54:24.033295 user-err , file_operation.py:  osdx.utils.xos cmd error: cp /opt/vyatta/etc/config/coredump/core.cnm-client.0.e23f0016e3b744508487d439f28f4e81.2260.1747680816000000.zst /tmp/volatile/core.cnm-client.0.e23f0016e3b744508487d439f28f4e81.2260.1747680816000000.zst 2>/dev/null
2025-05-19 18:54:24.033339 user-err , file_operation.py:  Command 'cp /opt/vyatta/etc/config/coredump/core.cnm-client.0.e23f0016e3b744508487d439f28f4e81.2260.1747680816000000.zst /tmp/volatile/core.cnm-client.0.e23f0016e3b744508487d439f28f4e81.2260.1747680816000000.zst 2>/dev/null' returned non-zero exit status 1.
2025-05-19 18:54:24.373026 user-err , file_operation.py:  osdx.utils.xos cmd error: cp /opt/vyatta/etc/config/coredump/202505191854_kernel_panic.tar.gz /tmp/volatile/202505191854_kernel_panic.tar.gz 2>/dev/null
2025-05-19 18:54:24.373055 user-err , file_operation.py:  Command 'cp /opt/vyatta/etc/config/coredump/202505191854_kernel_panic.tar.gz /tmp/volatile/202505191854_kernel_panic.tar.gz 2>/dev/null' returned non-zero exit status 1.
2025-05-19 18:54:25.822772 user-err , file_operation.py:  osdx.utils.xos cmd error: cp /opt/vyatta/etc/config/coredump/dmesg.202505191854 /tmp/volatile/dmesg.202505191854 2>/dev/null
2025-05-19 18:54:25.822814 user-err , file_operation.py:  Command 'cp /opt/vyatta/etc/config/coredump/dmesg.202505191854 /tmp/volatile/dmesg.202505191854 2>/dev/null' returned non-zero exit status 1.
2025-05-19 18:55:09.322967 daemon-err , cfgd[1655]:  [13622]Command output: File name reserved Value validation failed
2025-05-19 18:55:14.448658 daemon-notice , cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19 18:55:14.450573 auth-notice , OSDxCLI:  User 'admin' committed the configuration.
2025-05-19 18:55:14.475887 auth-notice , OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19 18:55:14.595388 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 login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog file systemd_msg filter def app systemd
set system syslog file systemd_msg filter def level info

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
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog file systemd_msg filter def app systemd
set system syslog file systemd_msg filter def level info

Step 3: Run command file show running://log/user/systemd_msg/systemd_msg | cat at DUT0 and check if output matches the following regular expressions:

systemd\[1\]:\s+Started.*"DHCP Server Service instance main"\.
Show output
2025-05-19 18:55:21.365384 daemon-info , systemd[1]:  Created slice system-dhcpd.slice - Slice /system/dhcpd.
2025-05-19 18:55:21.408312 daemon-info , systemd[1]:  Started dhcpd@main.service - "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 login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog file systemd_msg archive files 10
set system syslog file systemd_msg archive size 100
set system syslog file systemd_msg filter def app systemd
set system syslog file systemd_msg filter def level info

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
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog file systemd_msg archive files 10
set system syslog file systemd_msg archive size 100
set system syslog file systemd_msg filter def app systemd
set system syslog file systemd_msg filter def level info

Step 3: Run command file show running://log/user/systemd_msg/systemd_msg | cat at DUT0 and check if output matches the following regular expressions:

Started.*"DHCP Server Service instance main"\.
Show output
2025-05-19 18:55:28.491463 daemon-info , systemd[1]:  Started dhcpd@main.service - "DHCP Server Service instance main".

Test Syslog Regex

Description

Create a new syslog file and collect all the syslog messages matching a specified regex.

Scenario

Step 1: Set the following configuration in DUT0 :

set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog file cli_msg filter CLI app OSDxCLI
set system syslog file cli_msg filter CLI level notice
set system syslog file cli_msg filter CLI regex '(^|[^a-zA-Z0-9_])alert([^a-zA-Z0-9_]|$)'

Step 2: Run command command with alert word at DUT0 and expect this output:

Show output
Command validation failed:
CLI Error: Invalid token [command]
CLI Error: Command error

Step 3: Run command command with alerted word at DUT0 and expect this output:

Show output
Command validation failed:
CLI Error: Invalid token [command]
CLI Error: Command error

Step 4: Run command file show running://log/user/cli_msg/cli_msg | cat at DUT0 and expect this output:

Show output
2025-05-19 18:55:34.831467 auth-notice , OSDxCLI:  User 'admin' entered an invalid command: 'command with alert word'.

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 interfaces ethernet eth0 address 10.215.168.64/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 port 514
set system syslog host 10.215.168.1 protocol udp

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show 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.152 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.152/0.152/0.152/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/10.215.168.64/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:55:41.145292+00:00 10.215.168.64  2025-05-19T18:55:40.805143+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:55:41.171527+00:00 10.215.168.64  2025-05-19T18:55:40.831537+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:55:41.201385+00:00 10.215.168.64  2025-05-19T18:55:40.861464+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:55:41.367401+00:00 10.215.168.64  2025-05-19T18:55:41.027503+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
2025-05-19T18:55:41.446175+00:00 10.215.168.64  2025-05-19T18:55:41.106247+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 interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth0 vrf VRF0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 local-vrf VRF0
set system syslog host 10.215.168.1 port 514
set system syslog host 10.215.168.1 protocol udp
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 1
Show 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.156 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.156/0.156/0.156/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/10.215.168.64/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:55:41.859803+00:00 10.215.168.64  2025-05-19T18:55:41.519780+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show version'.
2025-05-19T18:55:42.108877+00:00 10.215.168.64  2025-05-19T18:55:41.768957+00:00 user-warning osdx OSDxCLI:  Signal 10 received
2025-05-19T18:55:42.121652+00:00 10.215.168.64  2025-05-19T18:55:41.781694+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'set system mode user'.
2025-05-19T18:55:42.986235+00:00 10.215.168.64  2025-05-19T18:55:42.646234+00:00 auth-notice osdx OSDxCLI:  User 'admin' entered the configuration menu.
2025-05-19T18:55:43.094628+00:00 10.215.168.64  2025-05-19T18:55:42.754614+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'delete '.
2025-05-19T18:55:43.163858+00:00 10.215.168.64  2025-05-19T18:55:42.823848+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'.
2025-05-19T18:55:43.266281+00:00 10.215.168.64  2025-05-19T18:55:42.926251+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'show working'.
2025-05-19T18:55:47.517442+00:00 10.215.168.64  2025-05-19T18:55:47.121292+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:55:47.543939+00:00 10.215.168.64  2025-05-19T18:55:47.147860+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:55:47.573859+00:00 10.215.168.64  2025-05-19T18:55:47.177834+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:55:47.737254+00:00 10.215.168.64  2025-05-19T18:55:47.341227+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'.
2025-05-19T18:55:47.805576+00:00 10.215.168.64  2025-05-19T18:55:47.409508+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 interfaces ethernet eth0 address 10.215.168.64/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 local-interface eth0
set system syslog host 10.215.168.1 port 514
set system syslog host 10.215.168.1 protocol udp

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show 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.150 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.150/0.150/0.150/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/10.215.168.64/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:55:48.196986+00:00 10.215.168.64  2025-05-19T18:55:47.794148+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show version'.
2025-05-19T18:55:48.426102+00:00 10.215.168.64  2025-05-19T18:55:48.029780+00:00 user-warning osdx OSDxCLI:  Signal 10 received
2025-05-19T18:55:48.458196+00:00 10.215.168.64  2025-05-19T18:55:48.062115+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'set system mode user'.
2025-05-19T18:55:49.349065+00:00 10.215.168.64  2025-05-19T18:55:48.952918+00:00 auth-notice osdx OSDxCLI:  User 'admin' entered the configuration menu.
2025-05-19T18:55:49.414185+00:00 10.215.168.64  2025-05-19T18:55:49.018054+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'delete '.
2025-05-19T18:55:49.532924+00:00 10.215.168.64  2025-05-19T18:55:49.136748+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'.
2025-05-19T18:55:49.601370+00:00 10.215.168.64  2025-05-19T18:55:49.205219+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'show working'.
2025-05-19T18:55:53.861641+00:00 10.215.168.64  2025-05-19T18:55:52.897199+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:55:53.887839+00:00 10.215.168.64  2025-05-19T18:55:52.923563+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:55:53.924856+00:00 10.215.168.64  2025-05-19T18:55:52.960620+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:55:54.071076+00:00 10.215.168.64  2025-05-19T18:55:53.106858+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
2025-05-19T18:55:54.131573+00:00 10.215.168.64  2025-05-19T18:55:53.167222+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show host name'.

Test Syslog Remote With Local-address and UDP

Description

Add a remote host to send syslog messages through a specific local-address and show the host name.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 33.33.33.33/24
set interfaces ethernet eth0 address 10.215.168.64/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 local-address 33.33.33.33
set system syslog host 10.215.168.1 port 514
set system syslog host 10.215.168.1 protocol udp

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show 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.135 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.135/0.135/0.135/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/33.33.33.33/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:56:00.259719+00:00 33.33.33.33  2025-05-19T18:55:59.992671+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:56:00.299106+00:00 33.33.33.33  2025-05-19T18:56:00.032377+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:56:00.322978+00:00 33.33.33.33  2025-05-19T18:56:00.056317+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:56:00.477870+00:00 33.33.33.33  2025-05-19T18:56:00.211216+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
2025-05-19T18:56:00.546019+00:00 33.33.33.33  2025-05-19T18:56:00.279329+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show host name'.

Test Syslog Remote With Local-address and VRF

Description

Add a remote host to send syslog messages through a VRF and a local-address and show the host name.

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 33.33.33.33/24
set interfaces ethernet eth0 address 10.215.168.64/24
set interfaces ethernet eth0 vrf VRF0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 local-address 33.33.33.33
set system syslog host 10.215.168.1 local-vrf VRF0
set system syslog host 10.215.168.1 port 514
set system syslog host 10.215.168.1 protocol udp
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 1
Show 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.147 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.147/0.147/0.147/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/33.33.33.33/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:56:01.063165+00:00 33.33.33.33  2025-05-19T18:56:00.796419+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show version'.
2025-05-19T18:56:01.280283+00:00 33.33.33.33  2025-05-19T18:56:01.013524+00:00 user-warning osdx OSDxCLI:  Signal 10 received
2025-05-19T18:56:01.296819+00:00 33.33.33.33  2025-05-19T18:56:01.030063+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'set system mode user'.
2025-05-19T18:56:02.258626+00:00 33.33.33.33  2025-05-19T18:56:01.991794+00:00 auth-notice osdx OSDxCLI:  User 'admin' entered the configuration menu.
2025-05-19T18:56:02.326346+00:00 33.33.33.33  2025-05-19T18:56:02.059526+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'delete '.
2025-05-19T18:56:02.427026+00:00 33.33.33.33  2025-05-19T18:56:02.160225+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'.
2025-05-19T18:56:02.487443+00:00 33.33.33.33  2025-05-19T18:56:02.220646+00:00 auth-notice osdx OSDxCLI:  User 'admin' added a new cfg line: 'show working'.
2025-05-19T18:56:07.038183+00:00 33.33.33.33  2025-05-19T18:56:06.265116+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:56:07.038183+00:00 33.33.33.33  2025-05-19T18:56:06.265285+00:00 syslog-warning osdx rsyslogd:  bound address 33.33.33.33 IP free [v8.2302.0 try https://www.rsyslog.com/e/2186 ]
2025-05-19T18:56:07.063877+00:00 33.33.33.33  2025-05-19T18:56:06.291032+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:56:07.080508+00:00 33.33.33.33  2025-05-19T18:56:06.307703+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:56:07.232407+00:00 33.33.33.33  2025-05-19T18:56:06.459610+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'.
2025-05-19T18:56:07.292097+00:00 33.33.33.33  2025-05-19T18:56:06.519246+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 interfaces ethernet eth0 address 10.215.168.64/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def 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 permitted-peer rsyslog.server.com

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show 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.261 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.261/0.261/0.261/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/10.215.168.64/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:56:13.865973+00:00 10.215.168.64  2025-05-19T18:56:12.964928+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:56:13.910920+00:00 10.215.168.64  2025-05-19T18:56:13.000467+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:56:13.910920+00:00 10.215.168.64  2025-05-19T18:56:13.031621+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:56:13.910920+00:00 10.215.168.64  2025-05-19T18:56:13.192607+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
2025-05-19T18:56:13.910920+00:00 10.215.168.64  2025-05-19T18:56:13.286596+00:00 syslog-warning osdx rsyslogd:  warning: certificate file is not set [v8.2302.0 try https://www.rsyslog.com/e/2330 ]
2025-05-19T18:56:13.910920+00:00 10.215.168.64  2025-05-19T18:56:13.286650+00:00 syslog-warning osdx rsyslogd:  warning: key file is not set [v8.2302.0 try https://www.rsyslog.com/e/2331 ]
2025-05-19T18:56:16.081656+00:00 10.215.168.64  2025-05-19T18:56:15.510170+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show host name'.

Test Syslog Remote Local Address Single TLS

Description

Add a secured remote host to send syslog messages and show the host name from a fiven local-address

Scenario

Step 1: Set the following configuration in DUT0 :

set interfaces dummy dum0 address 33.33.33.33/24
set interfaces ethernet eth0 address 10.215.168.64/24
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
set system syslog host 10.215.168.1 filter def level info
set system syslog host 10.215.168.1 local-address 33.33.33.33
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 permitted-peer rsyslog.server.com

Step 2: Ping IP address 10.215.168.1 from DUT0:

admin@DUT0$ ping 10.215.168.1 count 1 size 56 timeout 1
Show 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.254 ms

--- 10.215.168.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.254/0.254/0.254/0.000 ms

Step 3: Run command show host name at DUT0 and expect this output:

Show output
osdx

Note

Check the server /var/log/33.33.33.33/.log file and read the executed a new command: 'show host name' log message:

Show output
2025-05-19T18:56:22.832346+00:00 33.33.33.33  2025-05-19T18:56:22.240096+00:00 daemon-notice osdx cfgd[1655]:  [13622]Completed change to active configuration
2025-05-19T18:56:22.874931+00:00 33.33.33.33  2025-05-19T18:56:22.272504+00:00 auth-notice osdx OSDxCLI:  User 'admin' committed the configuration.
2025-05-19T18:56:22.874931+00:00 33.33.33.33  2025-05-19T18:56:22.289496+00:00 auth-notice osdx OSDxCLI:  User 'admin' left the configuration menu.
2025-05-19T18:56:22.874931+00:00 33.33.33.33  2025-05-19T18:56:22.457397+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'ping 10.215.168.1 count 1 size 56 timeout 1'.
2025-05-19T18:56:22.874931+00:00 33.33.33.33  2025-05-19T18:56:22.764122+00:00 syslog-warning osdx rsyslogd:  warning: certificate file is not set [v8.2302.0 try https://www.rsyslog.com/e/2330 ]
2025-05-19T18:56:22.874931+00:00 33.33.33.33  2025-05-19T18:56:22.764171+00:00 syslog-warning osdx rsyslogd:  warning: key file is not set [v8.2302.0 try https://www.rsyslog.com/e/2331 ]
2025-05-19T18:56:24.863777+00:00 33.33.33.33  2025-05-19T18:56:24.803514+00:00 auth-notice osdx OSDxCLI:  User 'admin' executed a new command: 'show host name'.