Retrieve KPIs
Complete these tasks to retrieve the key performance indicators (KPIs) of the Session Border Controller (SBC).
Table - Prerequisites
Prerequisite | More Information |
Authenticate | Authenticate |
This example assumes you have exported the access token to the variable $TOKEN
.
KPI Types
Retrieve the list of KPI types supported by the REST API.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes"
The response contains links to the schema or metadata for the available KPI types.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data/>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=globalSessions</link>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sessCapacityUtil</link>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sipRegistrations</link>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sysCPUUtil</link>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sysMemoryUtil</link>
</links>
</response>
The URL syntax for requesting KPI data is /rest/v1.1/statistics/kpis?type=<KPI name>
.
The URL syntax for requesting the KPI schema or metadata is /rest/v1.1/statistics/kpiTypes?type=<KPI name>
.
The globalSessions KPI
Retrieve the globalSessions
KPI data.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpis?type=globalSessions"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<globalSessions>
<sysGlobalCPS>0</sysGlobalCPS>
<sysGlobalConSessions>0</sysGlobalConSessions>
</globalSessions>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=globalSessions</link>
</links>
</response>
Retrieve the globalSessions
KPI metadata.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes?type=globalSessions"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<httpMethod>GET</httpMethod>
<name>Get global calls per second and concurrent sessions</name>
<kpis>
<containerName>globalSessions</containerName>
<kpi>
<name>sysGlobalCPS</name>
<description>The number of global calls per second. This is an instant value.</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units/>
</kpi>
<kpi>
<name>sysGlobalConSessions</name>
<description>The total instant number of Global Concurrent Sessions at the moment.</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units/>
</kpi>
</kpis>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpis?type=globalSessions</link>
</links>
</response>
The sessCapacityUtil KPI
To retrieve the sessCapacityUtil
KPI data:
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpis?type=sessCapacityUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<sessCapacityUtil>
<percentCap>0</percentCap>
</sessCapacityUtil>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sessCapacityUtil</link>
</links>
</response>
To retrieve the sessCapacityUtil
KPI metadata:
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes?type=sessCapacityUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<httpMethod>GET</httpMethod>
<name>Get Session Capacity Utilization</name>
<kpis>
<containerName>sessCapacityUtil</containerName>
<kpi>
<name>percentCap</name>
<description>The percentage of session capacity utilization</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units>percent</units>
</kpi>
</kpis>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpis?type=sessCapacityUtil</link>
</links>
</response>
The sipRegistrations KPI
Retrieve the sipRegistrations
KPI data.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpis?type=sipRegistrations"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<sysSipStatsActiveLocalContacts>
<sipReg>0</sipReg>
</sysSipStatsActiveLocalContacts>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sipRegistrations</link>
</links>
</response>
Retrieve the sipRegistrations
KPI metadata.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes?type=sipRegistrations"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<httpMethod>GET</httpMethod>
<name>Get the number of active registered local contacts in the SBC</name>
<kpis>
<containerName>sysSipStatsActiveLocalContacts</containerName>
<kpi>
<name>sipReg</name>
<description>Number of currently cached registered contacts in the SBC</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units/>
</kpi>
</kpis>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpis?type=sipRegistrations</link>
</links>
</response>
The sysCPUUtil KPI
Retrieve the sysCPUUtil
KPI data.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpis?type=sysCPUUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<sysCPUUtilPercent>
<percentUsed>0</percentUsed>
</sysCPUUtilPercent>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sysCPUUtil</link>
</links>
</response>
Retrieve the sysCPUUtil
KPI metadata.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes?type=sysCPUUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<httpMethod>GET</httpMethod>
<name>Get Total CPU Utilization</name>
<kpis>
<containerName>sysCPUUtilPercent</containerName>
<kpi>
<name>percentUsed</name>
<description>The percentage of total CPU utilization measured in 1 second</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units>percent</units>
</kpi>
</kpis>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpis?type=sysCPUUtil</link>
</links>
</response>
The sysMemoryUtil KPI
Retrieve the sysMemoryUtil
KPI data.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpis?type=sysMemoryUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<sysMemoryUtil>
<percentUsed>17</percentUsed>
</sysMemoryUtil>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpiTypes?type=sysMemoryUtil</link>
</links>
</response>
Retrieve the sysMemoryUtil
KPI metadata.
curl -X GET \
--header "Accept: application/xml" \
--header "Authorization: Bearer $TOKEN" \
"https://${SBCIP}/rest/v1.1/statistics/kpiTypes?type=sysMemoryUtil"
An example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
<data>
<httpMethod>GET</httpMethod>
<name>Get System Memory Utilization</name>
<kpis>
<containerName>sysMemoryUtil</containerName>
<kpi>
<name>percentUsed</name>
<description>The percentage of memory utilization</description>
<dataType>integer</dataType>
<metricType>gauge</metricType>
<units>percent</units>
</kpi>
</kpis>
</data>
<messages/>
<links>
<link>https://10.0.0.2/rest/v1.1/statistics/kpis?type=sysMemoryUtil</link>
</links>
</response>