Hello,
I’m trying to understand how can access data specific to particular partition via SNMP or REST API.
Imagine that I have partition “MyPartition1” with SLB configured on it (servers, server groups, virtual servers).
How can get the SLB details from this partition ? From what I understand community string need to be modified by adding the partition name into the SNMP string (e.g. snmpstring@MyPartition1) for SNMPv2 or the context parameter need to be used for SNMP v3. Can somebody confirm that my understanding is correct ?
Another question is - can I get this info via REST API ? Which API point should I use ?
Thanks in advance, Mykola
Hi,
Regarding SNMP you can access to partition specific OID´s by appending @<partition_name> to the community:
Shared:
vThunder-vMaster1/1#sh run snmp-server
!Section configuration: 357 bytes
!
snmp-server enable service
!
snmp-server SNMPv1-v2c user admin
community read encrypted xmlx6dh/gZc8EIy41dsA5zwQjLjV2wDnPBCMuNXbAOc8EIy41dsA5zwQjLjV2wDn
oid .
!
snmp-server SNMPv1-v2c user public
community read encrypted 37O48xvi8uY8EIy41dsA5zwQjLjV2wDnPBCMuNXbAOc8EIy41dsA5zwQjLjV2wDn
oid 1.
!
snmp-server view allOID 172.16.1.4 included
!
vThunder-vMaster1/1#sh run ip nat pool
!Section configuration: 64 bytes
!
ip nat pool pool.nav 172.16.109.11 172.16.109.11 netmask /24
!
Partition cust1
vThunder-vMaster[1/1]cust1#sh run
!Current configuration: 78 bytes
!Configuration last updated at 16:43:46 IST Thu Apr 30 2020
!Configuration last saved at 16:22:52 IST Thu Apr 2 2020
!
active-partition cust1
!
!
!
ip nat pool testpool 4.5.6.7 4.5.6.7 netmask /30
!
slb server testsrv 5.5.6.7
!
end
You can consult object specific OID´s using this command under determined partition:
vThunder-vMaster[1/1]cust1#sh snmp oid server testsrv
OID for axServerStatTable
testsrv
axServerStatAddress:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.1.7.53.46.53.46.54.46.55
axServerStatName:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.2.7.53.46.53.46.54.46.55
axServerStatServerPktsIn:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.3.7.53.46.53.46.54.46.55
axServerStatServerBytesIn:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.4.7.53.46.53.46.54.46.55
axServerStatServerPktsOut:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.5.7.53.46.53.46.54.46.55
axServerStatServerBytesOut:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.6.7.53.46.53.46.54.46.55
axServerStatServerTotalConns:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.7.7.53.46.53.46.54.46.55
axServerStatServerCurConns:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.8.7.53.46.53.46.54.46.55
axServerStatServerPersistConns:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.9.7.53.46.53.46.54.46.55
axServerStatServerStatus:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.10.7.53.46.53.46.54.46.55
axServerStatServerTotalL7Reqs:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.11.7.53.46.53.46.54.46.55
axServerStatServerTotalCurrL7Reqs:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.12.7.53.46.53.46.54.46.55
axServerStatServerTotalSuccL7Reqs:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.13.7.53.46.53.46.54.46.55
axServerStatServerPeakConns:
1.3.6.1.4.1.22610.2.4.3.2.2.2.1.14.7.53.46.53.46.54.46.55
A10Spain:etc jserrano$ snmpwalk -v 2c -c a10@cust1 172.16.1.4 1.3.6.1.4.1.22610.2.4.3.18.100.1
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.1.8.116.101.115.116.112.111.111.108 = STRING: “testpool”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.2.8.116.101.115.116.112.111.111.108 = STRING: “4.5.6.7”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.3.8.116.101.115.116.112.111.111.108 = STRING: “4.5.6.7”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.4.8.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.5.8.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.6.8.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.7.8.116.101.115.116.112.111.111.108 = INTEGER: 0
A10Spain:etc jserrano$ snmpwalk -v 2c -c a10 172.16.1.4 1.3.6.1.4.1.22610.2.4.3.18.100.1
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.1.8.112.111.111.108.46.110.97.118 = STRING: “pool.nav”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.1.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = STRING: “"cust1":testpool”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.2.8.112.111.111.108.46.110.97.118 = STRING: “172.16.109.11”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.2.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = STRING: “4.5.6.7”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.3.8.112.111.111.108.46.110.97.118 = STRING: “172.16.109.11”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.3.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = STRING: “4.5.6.7”
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.4.8.112.111.111.108.46.110.97.118 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.4.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.5.8.112.111.111.108.46.110.97.118 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.5.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.6.8.112.111.111.108.46.110.97.118 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.6.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.7.8.112.111.111.108.46.110.97.118 = INTEGER: 0
SNMPv2-SMI::enterprises.22610.2.4.3.18.100.1.1.7.16.34.99.117.115.116.49.34.58.116.101.115.116.112.111.111.108 = INTEGER: 0
A10Spain:etc jserrano$ snmpwalk -v 2c -c a10 172.16.1.4 1.3.6.1.4.1.22610.2.4.3.2.2.2.1.2.7.53.46.53.46.54.46.55
SNMPv2-SMI::enterprises.22610.2.4.3.2.2.2.1.2.7.53.46.53.46.54.46.55 = No Such Instance currently exists at this OID
A10Spain:etc jserrano$ snmpwalk -v 2c -c a10@cust1 172.16.1.4 1.3.6.1.4.1.22610.2.4.3.2.2.2.1.2.7.53.46.53.46.54.46.55
SNMPv2-SMI::enterprises.22610.2.4.3.2.2.2.1.2.7.53.46.53.46.54.46.55 = STRING: “testsrv”
Regarding aXAPI you need to use “active-partition” method to jump into determined partition:
A10Spain:etc jserrano$curl -k https://172.16.1.4/axapi/v3/active-partition/cust1 -H “Content-Type:application/json” -H “authorization: A10 aff2fb862f71d49c918f0b1e7b1db4” -d “{ }”
{
“response”: {
“status”: “OK”
}
}
A10Spain:etc jserrano$~$ curl -k https://172.16.1.4/axapi/v3/active-partition -H “Content-Type:application/json” -H “authoriation: A10 aff2fb862f71d49c918f0b1e7b1db4”
{
“active-partition”: {
“partition-name”: “cust1”
}
}
Thanks a lot
This is really helpful. Appreciate your help.