Check Logging
The following scenario shows how to display and register user actions performed on the OSDx CLI (Command Line Interface).
Test CLI Events Logging
Description
This scenario demonstrates how to show and store in a file the different actions that users perform on the CLI.
Scenario
Step 1: Set the following configuration in DUT0 :
set system description DESC1 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Run the command system journal show | tail -n 20 on DUT0 and expect the following output:
Show output
May 19 16:09:28.270528 osdx systemd-journald[505760]: Runtime Journal (/run/log/journal/d1b141b298644f3ea5560bad25bf4943) is 1.9M, max 13.8M, 11.9M free. May 19 16:09:28.271529 osdx systemd-journald[505760]: Received client request to rotate journal, rotating. May 19 16:09:28.271567 osdx systemd-journald[505760]: Vacuuming done, freed 0B of archived journals from /run/log/journal/d1b141b298644f3ea5560bad25bf4943. May 19 16:09:28.281565 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system journal clear'. May 19 16:09:28.490074 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system coredump delete all'. May 19 16:09:28.704027 osdx OSDxCLI[529748]: User 'admin' entered the configuration menu. May 19 16:09:28.797951 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system description DESC1'. May 19 16:09:28.857880 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'show working'. May 19 16:09:28.943818 osdx ubnt-cfgd[539023]: inactive May 19 16:09:28.959625 osdx INFO[539030]: FRR daemons did not change May 19 16:09:28.970512 osdx cfgd[1918]: [529748]Completed change to active configuration May 19 16:09:28.970968 osdx OSDxCLI[529748]: User 'admin' committed the configuration. May 19 16:09:28.985131 osdx OSDxCLI[529748]: User 'admin' left the configuration menu.
Step 3: Run the command system login show users on DUT0 and expect the following output:
Show output
NAME LINE TIME COMMENT admin ttyS0 2026-05-19 16:05
Step 4: Run the command system journal show | tail -n 20 on DUT0 and expect the following output:
Show output
May 19 16:09:28.270528 osdx systemd-journald[505760]: Runtime Journal (/run/log/journal/d1b141b298644f3ea5560bad25bf4943) is 1.9M, max 13.8M, 11.9M free. May 19 16:09:28.271529 osdx systemd-journald[505760]: Received client request to rotate journal, rotating. May 19 16:09:28.271567 osdx systemd-journald[505760]: Vacuuming done, freed 0B of archived journals from /run/log/journal/d1b141b298644f3ea5560bad25bf4943. May 19 16:09:28.281565 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system journal clear'. May 19 16:09:28.490074 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system coredump delete all'. May 19 16:09:28.704027 osdx OSDxCLI[529748]: User 'admin' entered the configuration menu. May 19 16:09:28.797951 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'set system description DESC1'. May 19 16:09:28.857880 osdx OSDxCLI[529748]: User 'admin' added a new cfg line: 'show working'. May 19 16:09:28.943818 osdx ubnt-cfgd[539023]: inactive May 19 16:09:28.959625 osdx INFO[539030]: FRR daemons did not change May 19 16:09:28.970512 osdx cfgd[1918]: [529748]Completed change to active configuration May 19 16:09:28.970968 osdx OSDxCLI[529748]: User 'admin' committed the configuration. May 19 16:09:28.985131 osdx OSDxCLI[529748]: User 'admin' left the configuration menu. May 19 16:09:29.110038 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system journal show | tail -n 20'. May 19 16:09:29.166748 osdx OSDxCLI[529748]: User 'admin' executed a new command: 'system login show users'.
Step 5: Modify the following configuration lines in DUT0 :
set system syslog file CLI filter def app OSDxCLI set system syslog file CLI filter def level info
Step 6: Login as admin user on DUT0:
admin@osdx
Step 7: Modify the following configuration lines in DUT0 :
set system description DESC2
Step 8: Run the command file show running://log/user/CLI/CLI on DUT0 and expect the following output:
Show output
2026-05-19 16:09:29.730900 auth-notice , OSDxCLI: User 'admin' committed the configuration. 2026-05-19 16:09:29.744809 auth-notice , OSDxCLI: User 'admin' left the configuration menu. 2026-05-19 16:09:29.831504 auth-notice , OSDxCLI: User 'admin' has logged out. 2026-05-19 16:09:31.410763 auth-notice , OSDxCLI: User 'admin' has logged in. 2026-05-19 16:09:31.543092 auth-notice , OSDxCLI: User 'admin' entered the configuration menu. 2026-05-19 16:09:31.595146 auth-notice , OSDxCLI: User 'admin' added a new cfg line: 'set system description DESC2'. 2026-05-19 16:09:31.691203 auth-notice , OSDxCLI: User 'admin' added a new cfg line: 'show changes'. 2026-05-19 16:09:31.773204 auth-notice , OSDxCLI: User 'admin' committed the configuration. 2026-05-19 16:09:31.799236 auth-notice , OSDxCLI: User 'admin' left the configuration menu.