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
Jul 24 13:31:03.321710 osdx systemd-journald[2180]: Runtime Journal (/run/log/journal/3a8dbab828fc40a183893e468c03e10b) is 2.0M, max 13.8M, 11.8M free. Jul 24 13:31:03.324581 osdx systemd-journald[2180]: Received client request to rotate journal, rotating. Jul 24 13:31:03.324681 osdx systemd-journald[2180]: Vacuuming done, freed 0B of archived journals from /run/log/journal/3a8dbab828fc40a183893e468c03e10b. Jul 24 13:31:03.334345 osdx OSDxCLI[833017]: User 'admin' executed a new command: 'system journal clear'. Jul 24 13:31:03.578116 osdx OSDxCLI[833017]: User 'admin' executed a new command: 'system coredump delete all'. Jul 24 13:31:03.862872 osdx OSDxCLI[833017]: User 'admin' entered the configuration menu. Jul 24 13:31:03.934484 osdx OSDxCLI[833017]: User 'admin' added a new cfg line: 'set system description DESC1'. Jul 24 13:31:04.055036 osdx OSDxCLI[833017]: User 'admin' added a new cfg line: 'show working'. Jul 24 13:31:04.204758 osdx ubnt-cfgd[833283]: inactive Jul 24 13:31:04.221752 osdx INFO[833290]: FRR daemons did not change Jul 24 13:31:04.235538 osdx cfgd[1923]: [833017]Completed change to active configuration Jul 24 13:31:04.236032 osdx OSDxCLI[833017]: User 'admin' committed the configuration. Jul 24 13:31:04.265822 osdx OSDxCLI[833017]: 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-07-24 13:30
Step 4: Run the command system journal show | tail -n 20 on DUT0 and expect the following output:
Show output
Jul 24 13:31:03.321710 osdx systemd-journald[2180]: Runtime Journal (/run/log/journal/3a8dbab828fc40a183893e468c03e10b) is 2.0M, max 13.8M, 11.8M free. Jul 24 13:31:03.324581 osdx systemd-journald[2180]: Received client request to rotate journal, rotating. Jul 24 13:31:03.324681 osdx systemd-journald[2180]: Vacuuming done, freed 0B of archived journals from /run/log/journal/3a8dbab828fc40a183893e468c03e10b. Jul 24 13:31:03.334345 osdx OSDxCLI[833017]: User 'admin' executed a new command: 'system journal clear'. Jul 24 13:31:03.578116 osdx OSDxCLI[833017]: User 'admin' executed a new command: 'system coredump delete all'. Jul 24 13:31:03.862872 osdx OSDxCLI[833017]: User 'admin' entered the configuration menu. Jul 24 13:31:03.934484 osdx OSDxCLI[833017]: User 'admin' added a new cfg line: 'set system description DESC1'. Jul 24 13:31:04.055036 osdx OSDxCLI[833017]: User 'admin' added a new cfg line: 'show working'. Jul 24 13:31:04.204758 osdx ubnt-cfgd[833283]: inactive Jul 24 13:31:04.221752 osdx INFO[833290]: FRR daemons did not change Jul 24 13:31:04.235538 osdx cfgd[1923]: [833017]Completed change to active configuration Jul 24 13:31:04.236032 osdx OSDxCLI[833017]: User 'admin' committed the configuration. Jul 24 13:31:04.265822 osdx OSDxCLI[833017]: User 'admin' left the configuration menu. Jul 24 13:31:04.440572 osdx OSDxCLI[833017]: User 'admin' executed a new command: 'system journal show | tail -n 20'. Jul 24 13:31:04.532515 osdx OSDxCLI[833017]: 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-07-24 13:31:05.283976 auth-notice , OSDxCLI: User 'admin' committed the configuration. 2026-07-24 13:31:05.310773 auth-notice , OSDxCLI: User 'admin' left the configuration menu. 2026-07-24 13:31:05.409774 auth-notice , OSDxCLI: User 'admin' has logged out. 2026-07-24 13:31:07.223580 auth-notice , OSDxCLI: User 'admin' has logged in. 2026-07-24 13:31:07.385158 auth-notice , OSDxCLI: User 'admin' entered the configuration menu. 2026-07-24 13:31:07.507913 auth-notice , OSDxCLI: User 'admin' added a new cfg line: 'set system description DESC2'. 2026-07-24 13:31:07.619266 auth-notice , OSDxCLI: User 'admin' added a new cfg line: 'show changes'. 2026-07-24 13:31:07.777082 auth-notice , OSDxCLI: User 'admin' committed the configuration. 2026-07-24 13:31:07.800203 auth-notice , OSDxCLI: User 'admin' left the configuration menu.