Get monitoring graphs
These methods return the graphs of the Monitoring screen: calls in progress, calls per second, processing time, CPU, disk and network load. getMonitoringGraph returns a PNG image, getMonitoringGraphData the same series as CSV. Both take the same parameters.
The methods support trusted mode with i_customer.
Parameters
Section titled “Parameters”Both methods take these parameters.
| Name | Type | Required | Description |
|---|---|---|---|
type |
string | yes | The graph, from the table below |
start_date |
string | no | Start of the graph in UTC, in the form 09:57:29.000 GMT Wed Nov 18 2009. Default: 12 hours ago |
interval |
int | no | Length of the graph in seconds. Default: 43200 (12 hours) |
width |
int | no | Width of the image in pixels. Default: 330 |
height |
int | no | Height of the image in pixels. Default: 120 |
timezone |
string | no | Time zone for the time axis, for example Europe/London |
i_environment |
int | no | Environment to draw the graph for. Default: the environment you call |
type |
Graph in the panel |
|---|---|
calls_in_progress |
Calls in Progress |
calls_per_second |
Calls Per Second |
call_processing_time |
Call Processing Time |
acd_asr |
ASR / ACD |
dbsize, dbsize_slave |
DB Size, Hot Stand-by DB Size |
bandwidth_in_use_perenv, throughput_perenv |
Bandwidth in Use, Throughput of one environment |
cpu_load |
CPU Load |
disk_load |
Disk Load |
bandwidth_in_use, throughput |
Bandwidth in Use, Throughput of the server |
netmem_alloc, netmem_activity |
Network Buffers Allocation, Network Buffers Activity |
calls_in_progress_total, calls_per_second_total, call_processing_time_total, acd_asr_total, dbsize_total, dbsize_slave_total |
The same graphs for the whole switch (System Total) |
rtp_sessions_total, rtp_health_total, rtp_aduration_total, rtp_throughput_total |
RTP Sessions, RTP Health, Avg RTP Session Duration, RTP Throughput of the whole switch |
The panel shows the _total and netmem_ graphs only in the first environment, and the dbsize_slave graphs only when replication is on.
getMonitoringGraph
Section titled “getMonitoringGraph”Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
graph |
string | The graph as a base64-encoded PNG image |
Example
Section titled “Example”import base64
resp = call("getMonitoringGraph", {"type": "calls_in_progress", "interval": 86400, "width": 800, "height": 300})with open("calls.png", "wb") as f: f.write(base64.b64decode(resp["graph"])){"result": "OK", "graph": "iVBORw0KGgoAAAANSUhEUgAAAyAAAAEs…"}getMonitoringGraphData
Section titled “getMonitoringGraphData”Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
csv_data |
string | The data of the graph as a base64-encoded CSV file |
Example
Section titled “Example”import base64
resp = call("getMonitoringGraphData", {"type": "calls_per_second", "interval": 3600})print(base64.b64decode(resp["csv_data"]).decode()){"result": "OK", "csv_data": "…"}