Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing graphs to order by time instead of value #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dashboards/obmp/Base-1001/Looking Glass - Global.json
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
"hide": false,
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n floor(extract(epoch from max(p.timestamp))) as time,\n CASE WHEN v.peer_hash_id is null THEN 'Not in Peers RIB' ELSE 'In Peer RIB' END as metric,\n 1 as value\nFROM bgp_peers p\n left join (select peer_hash_id,isipv4\n from v_ip_routes \n where prefix >>= '[[prefix]]' \n and iswithdrawn = false group by peer_hash_id,isipv4) v \n on (p.hash_id = v.peer_hash_id)\nWHERE p.isipv4 = CASE WHEN family('[[prefix]]') = 4 THEN true ELSE false END\n AND p.state = 'up'\nGROUP BY p.hash_id,v.peer_hash_id,p.isipv4\n\n",
"rawSql": "SELECT\n floor(extract(epoch from max(p.timestamp))) as time,\n CASE WHEN v.peer_hash_id is null THEN 'Not in Peers RIB' ELSE 'In Peer RIB' END as metric,\n 1 as value\nFROM bgp_peers p\n left join (select peer_hash_id,isipv4\n from v_ip_routes \n where prefix >>= '[[prefix]]' \n and iswithdrawn = false group by peer_hash_id,isipv4) v \n on (p.hash_id = v.peer_hash_id)\nWHERE p.isipv4 = CASE WHEN family('[[prefix]]') = 4 THEN true ELSE false END\n AND p.state = 'up'\nGROUP BY p.hash_id,v.peer_hash_id,p.isipv4\norder by time\n\n",
"refId": "A",
"select": [
[
Expand Down Expand Up @@ -658,4 +658,4 @@
"title": "Looking Glass - Global",
"uid": "lookingglass-global",
"version": 7
}
}
6 changes: 3 additions & 3 deletions dashboards/obmp/Tops-1003/Top by Prefixes.json
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@
"alias": "",
"format": "time_series",
"hide": false,
"rawSql": "SELECT\n max(interval_time) as time,\n sum(updates) as value,\n prefix as metric\n FROM stats_chg_byprefix l\n WHERE $__timeFilter(interval_time)\n AND peer_hash_id in (SELECT peer_hash_id from v_peers where routername in ($router_name))\n GROUP BY prefix\n order by value desc\nLIMIT 20",
"rawSql": "SELECT\n max(interval_time) as time,\n sum(updates) as value,\n prefix as metric\n FROM stats_chg_byprefix l\n WHERE $__timeFilter(interval_time)\n AND peer_hash_id in (SELECT peer_hash_id from v_peers where routername in ($router_name))\n GROUP BY prefix\n order by time desc\nLIMIT 20",
"refId": "A"
}
],
Expand Down Expand Up @@ -691,7 +691,7 @@
"alias": "",
"format": "time_series",
"hide": false,
"rawSql": "SELECT\n max(interval_time) as time,\n sum(withdraws) as value,\n prefix as metric\n FROM stats_chg_byprefix\n WHERE $__timeFilter(interval_time)\n AND peer_hash_id in (SELECT peer_hash_id from v_peers where routername in ($router_name))\n GROUP BY prefix\n order by value desc\nLIMIT 20;\n",
"rawSql": "SELECT\n max(interval_time) as time,\n sum(withdraws) as value,\n prefix as metric\n FROM stats_chg_byprefix\n WHERE $__timeFilter(interval_time)\n AND peer_hash_id in (SELECT peer_hash_id from v_peers where routername in ($router_name))\n GROUP BY prefix\n order by time desc\nLIMIT 20;\n",
"refId": "A"
}
],
Expand Down Expand Up @@ -808,4 +808,4 @@
"title": "Top by Prefixes",
"uid": "topprefixes",
"version": 3
}
}