Cisco Nexus 9000 Series NX-API CLI, Release 9.3(x)
Latest
- Cisco Nexus 9000 Series NX-API CLI Reference, Release 9.3x
- About NX-API CLI
- New and Changed
- AAA Commands
- Accounting Commands
- Banner Commands
- Bash Shell Commands
- BGP Commands
- Boot Commands
- Callhome Commands
- CDP Commands
- CFS Commands
- Checkpoint Commands
- CLI Commands
- Clock Commands
- Config-Replace Commands
- Diagnostic Commands
- Dot1Q Commands
- Dot1X Commands
- Environment Commands
- Event Manager Commands
- FHRP Commands
- FIPS Commands
- Host Commands
- HSRP Commands
- Install Commands
- Interface Commands
- IP Commands
- IPv6 Commands
- ISIS Commands
- Key Commands
- L2 Protocol Commands
- LACP Commands
- Line Commands
- LLDP Commands
- Logging Commands
- MAC-Address Commands
- Maintenance Commands
- Module Commands
- NAT Commands
- NTP Commands
- NVE Commands
- NXAPI Commands
- OSPF Commands
- Password Commands
- Port-Channel Commands
- Port-Profile Commands
- Port-Security Commands
- Process Commands
- RADIUS Commands
- Redundancy Commands
- RMON Commands
- Role Commands
- Rollback Commands
- Route Map Commands
- Snapshot Commands
- SNMP Commands
- Socket Commands
- Spanning-Tree Commands
- SSH Commands
- Switchname Commands
- Switch-Profile Commands
- System Commands
- TACACS Commands
- Telnet Commands
- Terminal Commands
- Track Commands
- User Account Commands
- User Passphrase Commands
- Users Commands
- Version Commands
- VLAN Commands
- vPC Commands
- VRRPv3 Commands
- VRRS Commands
show logging info
Python
Copy
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show logging info",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show logging info",
"msg": "Success",
"code": "200",
"body": {
"console_status": "disabled",
"monitor_status": "enabled",
"monitor_severity": "notifications",
"linecard_status": "enabled",
"linecard_severity": "notifications",
"log_timestamp": "Seconds",
"source_interface_status": "disabled",
"server_status": "disabled",
"origin_id_status": "disabled",
"logflash_status": "enabled",
"logflash_severity": "notifications",
"logfile_status": "enabled",
"logfile_name": "messages",
"logfile_severity": "notifications",
"logfile_size": 4194304,
"fac_info": "0-emergencies, 1-alerts, 2-critical, 3-errors, 4-warnings, 5-notifications, 6-information, 7-debugging",
"TABLE_facility": {
"ROW_facility": [
{
"fac_name": "aaa",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "acllog",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "aclmgr",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "aclqos",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "adbm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "arp",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "auth",
"def_level": 0,
"cur_level": 0
},
{
"fac_name": "authpriv",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "bootvar",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "callhome",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "capability",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "cdp",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "cert_enroll",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "cfs",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "clis",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "clk_mgr",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "confcheck",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "copp",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "cron",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "daemon",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "device_test",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "dhclient",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "diag_port_lb",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "diagclient",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "diagmgr",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "dot1x",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "ecp",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "eltm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "eth-port-sec",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "eth_port_channel",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "ethpm",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "evmc",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "evms",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "feature-mgr",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "fs-daemon",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "ftp",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "ifmgr",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "igmp_1",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "interface-vlan",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "ip",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "ipfib",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "ipqosmgr",
"def_level": 4,
"cur_level": 4
},
{
"fac_name": "ipv6",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "kern",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "l2fm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "l2pt",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "l3vm",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "ldap",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "licmgr",
"def_level": 6,
"cur_level": 6
},
{
"fac_name": "lldp",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "local0",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local1",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local2",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local3",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local4",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local5",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local6",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "local7",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "lpr",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "m2rib",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "m6rib",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "mail",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "mcm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "mfdm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "mmode",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "module",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "monitor",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "mrib",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "mvsh",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "news",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "ntp",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "otm",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "pfstat",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "pixm_gl",
"def_level": 4,
"cur_level": 4
},
{
"fac_name": "pixm_vl",
"def_level": 4,
"cur_level": 4
},
{
"fac_name": "platform",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "plcmgr",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "plugin",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "port-profile",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "radius",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "res_mgr",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "rpm",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "sal",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "securityd",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "sksd",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "smm",
"def_level": 4,
"cur_level": 4
},
{
"fac_name": "snmpd",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "span",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "spm",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "stp",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "syslog",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "sysmgr",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "tamnw",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "template_manager",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "u6rib",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "ufdm",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "urib",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "user",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "uucp",
"def_level": 3,
"cur_level": 3
},
{
"fac_name": "vdc_mgr",
"def_level": 6,
"cur_level": 6
},
{
"fac_name": "virtual-service",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "vlan_mgr",
"def_level": 2,
"cur_level": 2
},
{
"fac_name": "vshd",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "xbar",
"def_level": 5,
"cur_level": 5
},
{
"fac_name": "xmlma",
"def_level": 3,
"cur_level": 3
}
]
}
}
}
}
}
}