This guide provides a generic example of how to leverage the built-in salt commands in the 128T, along with a specific set of commands to download all 128T router logs. It's important to note that the 128T router must be fully managed via the automated installer/provisioner (salt) for this functionality.
Generic Sample Scenarios From the shell of the conductor, execute the following commands to run any linux command directly on the 128T router:
- Get the asset/minion ID by viewing accepted salt keys:
$ sudo t128-salt-key
Accepted Keys:
S242344X7201033
Denied Keys:
Unaccepted Keys:
Rejected Keys:
$ sudo t128-salt 'S242344X7201033' cmd.run 'ip a'
S242344X7201033:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 0c:c4:7a:9f:88:0c brd ff:ff:ff:ff:ff:ff
3: eno2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 0c:c4:7a:9f:88:0d brd ff:ff:ff:ff:ff:ff
4: mgmt1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 0c:c4:7a:9f:88:0e brd ff:ff:ff:ff:ff:ff
inet 172.25.128.63/24 brd 172.25.128.255 scope global mgmt1
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe9f:880e/64 scope link
valid_lft forever preferred_lft forever
Scenario to Create 128T Router Logs and Upload to 128T Conductor
Configure the salt master (conductor) to allow receiving files (this process only needs to be done initially, if not configured previously):
$ sudo vi /etc/128technology/salt/master
...
# get presence change events for minions
presence_events: True
file_recv: True
$ sudo systemctl restart 128T
$ sudo t128-salt-key
Accepted Keys:
S242344X7201033
Denied Keys:
Unaccepted Keys:
Rejected Keys:
Note: Salt will error as shown below, but the process to restart the salt minion should complete successfully.
$ sudo t128-salt 'S242344X7201033' cmd.run 'sudo systemctl restart salt-minion'
S242344X7201033:
Minion did not return. [No response]
Execute the following commands now to create and send the 128T router logs:
Note: Salt could error, but the process to create compress and gzip all logs should complete successfully.
$ sudo t128-salt 'S242344X7201033' cmd.run 'su - admin -c "save tech-support-info"'
S242344X7201033:
Starting the PCLI...
Retrieving Tech Support Info...
/var/log/128technology/tech-support-info.tar.gz
Note: Salt could error, and in this case you will have to run the command again as the file will be partially downloaded.
$ sudo t128-salt 'S242344X7201033' cp.push '/var/log/128technology/tech-support-info.tar.gz'
S242344X7201033:
Starting the PCLI...
Retrieving Tech Support Info...
/var/log/128technology/tech-support-info.tar.gz
$ ls /var/cache/salt/master/minions/S242344X7201033/files/var/log/128technology/
tech-support-info.tar.gz
#Conductor#router