show radius-server

show radius-server

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 radius-server",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_server": {
                        "ROW_server": [
                            {
                                "acct_port": 1813, 
                                "auth_port": 1812, 
                                "secretKey": "********", 
                                "server_ip": "172.31.201.133"
                            }, 
                            {
                                "acct_port": 1813, 
                                "auth_port": 1812, 
                                "secretKey": "********", 
                                "server_ip": "172.31.200.255"
                            }
                        ]
                    }, 
                    "global_deadtime": 0, 
                    "global_source_intf": "any available", 
                    "global_timeout": 5, 
                    "retransmissionCount": 1, 
                    "server_count": 2
                }, 
                "code": "200", 
                "input": "show radius-server", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show radius-server command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show radius-server
timeout value:5
retransmission count:1
deadtime value:0
source interface:any available
total number of servers:2

following RADIUS servers are configured:
        172.31.201.133:
                available for authentication on port: 1812
                available for accounting on port: 1813
                Radius shared secret:**
        172.31.200.255:
                available for authentication on port: 1812
                available for accounting on port: 1813
                Radius shared secret:**

show radius-server directed-request

show radius-server directed-request

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 radius-server directed-request",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "radius_directedRequest_status": "disabled"
                }, 
                "code": "200", 
                "input": "show radius-server directed-request", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show radius-server directed-request command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show radius-server directed-request
disabled

show radius-server groups

show radius-server groups

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 radius-server groups",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_group": {
                        "ROW_group": [
                            {
                                "dead_time": 0, 
                                "group_name": "radius"
                            }, 
                            {
                                "TABLE_server": {
                                    "ROW_server": {
                                        "acct_port": 1813, 
                                        "auth_port": 1812, 
                                        "server_ip": "172.31.201.133"
                                    }
                                }, 
                                "dead_time": 0, 
                                "group_name": "radtest1", 
                                "vrf_name": "management"
                            }, 
                            {
                                "TABLE_server": {
                                    "ROW_server": {
                                        "acct_port": 1813, 
                                        "auth_port": 1812, 
                                        "server_ip": "172.31.200.255"
                                    }
                                }, 
                                "dead_time": 0, 
                                "group_name": "ACStest1", 
                                "vrf_name": "management"
                            }
                        ]
                    }, 
                    "num_of_groups": 3
                }, 
                "code": "200", 
                "input": "show radius-server groups", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show radius-server groups command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show radius-server groups
total number of groups:3

following RADIUS server groups are configured:
        group radius:
                server: all configured radius servers
                deadtime is 0
        group radtest1:
                server: 172.31.201.133 on auth-port 1812, acct-port 1813
                deadtime is 0
                vrf is management
        group ACStest1:
                server: 172.31.200.255 on auth-port 1812, acct-port 1813
                deadtime is 0
                vrf is management

show radius-server sorted

show radius-server sorted

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 radius-server sorted ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "TABLE_server": {
                        "ROW_server": [
                            {
                                "acct_port": 1813, 
                                "auth_port": 1812, 
                                "secretKey": "********", 
                                "server_ip": "172.31.200.255"
                            }, 
                            {
                                "acct_port": 1813, 
                                "auth_port": 1812, 
                                "secretKey": "********", 
                                "server_ip": "172.31.201.133"
                            }
                        ]
                    }, 
                    "global_deadtime": 0, 
                    "global_source_intf": "any available", 
                    "global_timeout": 5, 
                    "retransmissionCount": 1, 
                    "server_count": 2
                }, 
                "code": "200", 
                "input": "show radius-server sorted ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show radius-server sorted command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show radius-server sorted 
timeout value:5
retransmission count:1
deadtime value:0
source interface:any available
total number of servers:2

following RADIUS servers are configured:
        172.31.200.255:
                available for authentication on port: 1812
                available for accounting on port: 1813
                Radius shared secret:**
        172.31.201.133:
                available for authentication on port: 1812
                available for accounting on port: 1813
                Radius shared secret:**

show radius-server statistics 172.31.200.255

show radius-server statistics 172.31.200.255

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 radius-server statistics 172.31.200.255 ",
  "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": {
        "outputs": {
            "output": {
                "body": {
                    "acct_statistics": {
                        "acct_failed_transactions": 0, 
                        "acct_req_sent": 0, 
                        "acct_req_timedout": 0, 
                        "acct_resp_error": 0, 
                        "acct_resp_no_match": 0, 
                        "acct_resp_not_processed": 0, 
                        "acct_succ_transactions": 0
                    }, 
                    "auth_statistics": {
                        "auth_failed_transactions": 0, 
                        "auth_req_sent": 0, 
                        "auth_req_timedout": 0, 
                        "auth_resp_error": 0, 
                        "auth_resp_no_match": 0, 
                        "auth_resp_not_processed": 0, 
                        "auth_succ_transactions": 0
                    }, 
                    "server_state": "not monitored"
                }, 
                "code": "200", 
                "input": "show radius-server statistics 172.31.200.255 ", 
                "msg": "Success"
            }
        }, 
        "sid": "eoc", 
        "type": "cli_show", 
        "version": "1.0"
    }
}

The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show radius-server statistics 172.31.200.255 command, see the CLI command reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 7.0(3)I7(4).

CLI Output
Switch# show radius-server statistics 172.31.200.255 
Server is not monitored

Authentication Statistics
        failed transactions: 0
        sucessfull transactions: 0
        requests sent: 0
        requests timed out: 0
        responses with no matching requests: 0
        responses not processed: 0
        responses containing errors: 0

Accounting Statistics
        failed transactions: 0
        sucessfull transactions: 0
        requests sent: 0
        requests timed out: 0
        responses with no matching requests: 0
        responses not processed: 0
        responses containing errors: 0