Wired Intelligent Edge (Campus Switching and Routing)

Reply
Occasional Contributor II

Exctract running config via SNMP or API Switch 2930F

Hi all,

 

We've recently purchased some aruba switches 2930F. We are investigating how to automatically back up the configs. Do you know or can you suggest how to do it? We have some other devices that can do it via SNMP or API, but in aruba system I don't find it.

 

Additionally we want to monoitor some parameters as CPU, Memory, Temperature. Do you know if we can extract them from a snmpwalk? I don't find the OID MIB to match it!

 

Many thanks in advance!

 

Best regards,

Roger

MVP Expert

Re: Exctract running config via SNMP or API Switch 2930F

Hi Roger,

 

For Memory/CPU on SNMP, it is the standard MIB.

 

for get configuration, you use API (via AnyCLI)

 

there is also auto-tftp command for automally push configuration on tftp server

 

 



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Occasional Contributor II

Re: Exctract running config via SNMP or API Switch 2930F

Hi,

 

Many thanks for you answer. We are trying to do it via anyCLI, but we have a problem with the POST command. We want to extract the running config like this (as we see from Internet)

curl -s --insecure --cookie <cookie> -X POST -d '{"cmd":"show config"}' https://<IP switch>/rest/v3/cli | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["result_base64_encoded"]'| base64 --decode

But it doesn't work.

We don't know what is happening.We are thinking in a possible conflict between usesrs or permissions.

 

400 Bad Request</TITLE>
<H1>Bad Request</H1>Access is unauthorized.

 

Do we need to enable something special.

 

We have read that there is the command aaa authen rest-int

 

But on our switch there's no this command.

 

Best regds!

 

 

 

Highlighted
MVP Expert

Re: Exctract running config via SNMP or API Switch 2930F

a another command work ? (like get vlan ?)

 

 



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Occasional Contributor II

Re: Exctract running config via SNMP or API Switch 2930F

Hi!

It seems yes!

 

bash-4.1# curl -s --insecure --cookie <cookie> -X GET https://192.168.2.201/rest/v3/vlans

 

{"collection_result":{"total_elements_count":7,"filtered_elements_count":7},"vlan_element":[{"uri":"/vlans/1","vlan_id":1,"name":"DEFAULT_VLAN","status":"VS_PORT_BASED","type":"VT_STATIC","is_voice_enabled":false,"is_jumbo_enabled":false,"is_dsnoop_enabled":false,"is_dhcp_server_enabled":false},{"uri":"/vlans/2","vlan_id":2,"name":"DADES","status":"VS_PORT_BASED","type":"VT_STATIC","is_voice_enabled":false,"is_jumbo_enabled":false,"is_dsnoop_enabled":false,"is_dhcp_server_enabled":false},{"uri":"/vlans/20","vlan_id":20,"name":"VLAN20",..................................

 

 

 

MVP Expert

Re: Exctract running config via SNMP or API Switch 2930F

do you have check the switch log ?

 

You are connected on the switch ? (Needed for POST method)



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
Occasional Contributor II

Re: Exctract running config via SNMP or API Switch 2930F

Hi,

 

Many thanks for your help. Now we have automated backups via curl.

 

I have last question for you. We have Nagios to monitor all the network and most of the NTP controls (just say if the machin is synchrinized or no) come via SNMP: I have been looking for this information thru an SNMPWALK but I'm not able to find any parameter that is related to NTP.

 

Do you know which OID is related with the parameter that says if the machine is synchronized or not?

 

Many thanks in advance!

 

Best regards,

Roger

MVP Expert

Re: Exctract running config via SNMP or API Switch 2930F

Sorry no idea and i don't known if there is a API for this



PowerArubaSW: Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP... More info

PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...) More info

PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)

PowerArubaIAP: Powershell Module to use Aruba Instant AP

PowerArubaMC: Powershell Module to use Mobility Controller / Master


ACMP 6.4 / ACMX #107 / ACCP 6.5 / ACSP
New Contributor

Re: Exctract running config via SNMP or API Switch 2930F

Hello Roger,

Could you let me know how did you achieve the automated backups using CURL. i am in the same situation as yours.

 

Regards,

Fai

Occasional Contributor II

Re: Exctract running config via SNMP or API Switch 2930F

Hi Fai,

Finally after many attempts this command extracts the config:

 

curl -s --insecure --cookie $cookie -X POST https://192.168.9.201/rest/v4/cli -d '{\"cmd\":\"show run\"}

 

You can see in black bold that the post is in v4

 

Remember first to save the cookie in a variable

 

 

 

Many thanks,

Roger

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: