Change Summary:
Updated review for adding logic to get the monitoring data for hits and connections
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+35) |
Review Request #633 — Created Jan. 28, 2025 and submitted
| Information | |
|---|---|
| apoorva.sn | |
| AMP | |
| amp_3_7 | |
| AA-2572 | |
| Reviewers | |
| pmurugaiyan, prajesh, shuinvy | |
Problem
API to get LLB values for listing page:
Link Name, Gateway IP, Status, Bandwidth Threshold, Bandwidth Usage, Bandwidth In, Bandwidth Out, Connections, HitsAPI to get LLB values for Dashboard page:
hits, connectionsSolution
Have introduced a new logic to get the LLB Stats and the monitoring data values from Influx DB
Tested with the Postman using following URL:
1. Listing Page
https://192.168.85.47:8888/llb/stats{"action":"get_llb_stats"}
{
"results": [
{
"statement_id": 0,
"series": [
{
"name": "llbStats",
"tags": {
"agent_host": "192.168.85.101"
},
"columns": [
"time",
"linkName",
"linkGateway",
"linkStatus",
"linkThresh",
"linkUsage",
"linkBandwidIn",
"linkBandwidOut",
"linkConn",
"linkHits"
],
"values": [
[
1738049430000,
"VLAN-162",
"192.168.162.1",
"Up",
"10485760kbps",
0,
"0bps",
"0bps",
0,
1482
],
[
1738049430000,
"VLAN-85",
"192.168.85.1",
"Up",
"10485760kbps",
0,
"0bps",
"0bps",
1,
1483
]
]
}
]
}
]
}
- Monitoring Page
https://192.168.85.47:8888/llb/monitoring_data{
"results": [
{
"statement_id": 0,
"series": [
{
"name": "llbStats",
"columns": [
"time",
"top",
"linkName",
"agent_host"
],
"values": [
[
1738147200812,
0,
"VLAN-162",
"192.168.85.101"
],
[
1738147200812,
0,
"VLAN-85",
"192.168.85.101"
]
]
}
]
},
{
"statement_id": 1,
"series": [
{
"name": "llbStats",
"columns": [
"time",
"top",
"linkName",
"agent_host"
],
"values": [
[
1738147210000,
4,
"VLAN-85",
"192.168.85.101"
],
[
1738147210000,
1,
"VLAN-162",
"192.168.85.101"
]
]
}
]
}
]
}
| Description | From | Last Updated |
|---|---|---|
|
can we introduce a repo layer to interact with db. Extending current design makes the code a lot harder to … |
|
|
|
can be llb/stats |
|
|
|
300 seconds sounds too much. 15 seconds should be ideal keeping user experience in mind. You dont want to frustrate … |
|
|
|
what is the idea here? We pass the SQL query in the POST method and then we get the DB … |
|
|
|
Should we combine these two into one API call. Any reason to keep them separate? |
|
|
|
do we need POST here? Is there away to change it to GET. |
|
|
|
Same here.. as per handler it is doing a GET action. |
|
Updated review for adding logic to get the monitoring data for hits and connections
Description: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 2 (+35) |
| branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/services/composer_query_service.py (Diff revision 3) |
|---|
can we introduce a repo layer to interact with db. Extending current design makes the code a lot harder to refactor at a later point in time.
Description: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Diff: |
Revision 5 (+157) |
| branches/amp_3_7/src/webui/webui/htdocs/new/src/djproject/urls.py (Diff revision 5) |
|---|
can be llb/stats
300 seconds sounds too much. 15 seconds should be ideal keeping user experience in mind. You dont want to frustrate the use working on the UI :)
what is the idea here? We pass the SQL query in the POST method and then we get the DB response in the POST call?
| branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/llb_stats.py (Diff revision 5) |
|---|
Should we combine these two into one API call. Any reason to keep them separate?
Testing Done: |
|
|---|
| branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/llb_stats.py (Diff revision 6) |
|---|
do we need POST here? Is there away to change it to GET.
| branches/amp_3_7/src/webui/webui/htdocs/new/src/hive/llb_stats.py (Diff revision 6) |
|---|
Same here.. as per handler it is doing a GET action.