People: |
|
|---|
AA-2602:API to get LLB data for displaying the graphs
Review Request #649 — Created Feb. 7, 2025 and submitted
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_3_7 | |
| AA-2602 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
API to get LLB data for displaying the graphs
Solution
Have added new API "https://192.168.85.47:8888/llb/graph_data"
to fetch the values of llb for displaying graphs.
Here have added logic to get data based on from_time, to_time, time_interval and link_name
"https://192.168.85.47:8888/llb/graph_data"
is returning records as per the time interval
Request:
{
"query": {
"from_time": "now-15m",
"to_time": "now",
"link_name": "VLAN-162"
}
}Response:
{
"results": [
{
"statement_id": 0,
"series": [
{
"name": "llbStats",
"columns": [
"time",
"avgLinkThroughput",
"avgLinkUsage",
"avgLinkConn",
"avgLinkHits"
],
"values": [
[
1738916824000,
0,
0,
0,
9256
],
[
1738916861000,
0,
0,
0,
9256
],
[
1738916898000,
0,
0,
0,
9256
],
[
1738916935000,
0,
0,
0,
9256
],
[
1738916972000,
0,
0,
0,
9256
],
[
1738917009000,
0,
0,
0,
9256
],
[
1738917046000,
0,
0,
0,
9256
],
[
1738917083000,
0,
0,
0,
9256
],
[
1738917120000,
0,
0,
0,
9256
],
[
1738917157000,
10,
0,
1,
9257
],
[
1738917194000,
0,
0,
1,
9257
],
[
1738917231000,
0,
0,
1,
9257
],
[
1738917268000,
0,
0,
1,
9257
],
[
1738917305000,
0,
0,
1,
9257
],
[
1738917342000,
0,
0,
1,
9257
],
[
1738917379000,
0,
0,
1,
9257.5
],
[
1738917416000,
0,
0,
1,
9258
],
[
1738917453000,
0,
0,
0,
9258
],
[
1738917490000,
0,
0,
0,
9258
],
[
1738917527000,
0,
0,
0,
9258
],
[
1738917564000,
0,
0,
0,
9258
],
[
1738917601000,
0,
0,
0,
9258
],
[
1738917638000,
0,
0,
0,
9258
],
[
1738917675000,
0,
0,
0,
9258
],
[
1738917712000,
0,
0,
0,
9258
],
[
1738917749000,
0,
0,
0,
9258
]
]
}
]
}
]
}
