Bits&Bricks
$ show search

Searches the blog, kb and courses. Press / to open it from anywhere, ↓ ↑ to move through the results and Enter to open one. On notes and lessons, [ and ] go to the previous and next page.

$ show running-config | section management-appliance

Commands in management-appliance/

21 snippets from 2 notes, in tree order. Each heading links to its note. for a cheat sheet.

Device Internal Error catalyst-center/common-issues

#!/bin/bash
read -p "DNAC IP: " IP
read -p "DEVICE ID: " DEVICEID
read -p "Username: " USERNAME
read -p "Enter your password: " -s PASSWORD

TOKEN=`curl -X POST -u $USERNAME:$PASSWORD -s https://${IP}/api/system/v1/identitymgmt/token --insecure | jq '.Token' | tr -d '"'`
curl -X PUT -H "content-type: application/json" -H "X-AUTH-TOKEN:$TOKEN" -d "$DEVICEID" "https://${IP}/api/v1/network-device/sync-with-cleanup?forceSync=true" --insecure

General catalyst-center

magctl appstack status
magctl service status <service>
magctl service restart -d <service>
magctl rbac external_auth_fallback display
magctl rbac external_auth_fallback enable
magctl rbac external_auth_fallback disable
magctl service logs -rf <service> | lql
magctl service logs -rf catalogserver | grep -i -e pull -e push -e download -e checksum -e layer -e connectdna -e allversion -e failed -e failure -e timeout -e exception -e meta -e exception -e checksum -e error | lql
$ maglev catalog settings display
$ maglev catalog release_channel display -V
$ maglev package status
$ maglev catalog system_update_package display   
$ maglev system_updater update_info
$ maglev system_updater update_info -s
   You can use the above command as a fallback and this is only available after the CLI is
 updated in SW 1.3+
$ maglev system_update_package status
$ maglev catalog package status system
$ watch -d -n 0.5 'maglev catalog system_update_package display'
$ watch -d -n 0.5 "maglev system_updater update_info"
$ watch -d -n 0.5 "maglev catalog package status system"
$ watch -d -n 0.5 "maglev system_update_package status"
maglev catalog package display
$ maglev package status | grep %
$ watch -d -n 0.5 "maglev package status | grep %"
$ magctl service logs -rf <upgrade related service name> | lql
$ magctl service logs -rf catalog | grep -i -e download -e pull -e push -e connectdna 
-e layer -e exception -e error | lql
$ magctl service logs -r system-updater | lql > system_updater.log
/var/log/maglev-node-updater-<node-name>.log
$ kubectl get node
maglev system_updater update_info
maglev catalog settings display
maglev catalog package display
maglev package status
magctl workflow status
magctl workflow revoke <ID>

magctl workflow status
magctl workflow revoke <ID>
maglev catalog settings display
magctl service unsetenv catalogserver PARENT_CATALOG_SERVER_REPOSITORY
magctl service unsetenv catalogserver PARENT_CATALOG_SERVER
magctl service unsetenv catalogserver PARENT_CATALOG_OVERRIDE
magctl service setenv catalogserver PARENT_CATALOG_SERVER_REPOSITORY dnac212
maglev catalog check_for_updates
maglev catalog package display
for package in $(maglev catalog package display -o json | jq -r '.[] | .name'); do maglev catalog package pull $package;done