Skip to content

Commit c24e9a3

Browse files
author
David Linko
committed
added inifinity-datasource plugin and example panels
1 parent d968c1a commit c24e9a3

File tree

4 files changed

+246
-0
lines changed

4 files changed

+246
-0
lines changed

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ services:
229229
GF_DATABASE_PASSWORD: ${DB_PASSWORD}
230230
GF_DATABASE_SSL_MODE: disable
231231
GF_DATABASE_PATH: "" # Explicitly disable internal sqlite for clarity
232+
GF_PLUGINS_PREINSTALL: "yesoreyeram-infinity-datasource"
233+
GODEBUG: x509negativeserial=1 #fix for tls: failed to parse certificate from server: x509: negative serial number
232234

233235
grafana-image-renderer:
234236
hostname: grafana-image-renderer

grafana/provisioning/dashboards/anms-monitor.json

Lines changed: 227 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
"name": "PostgreSQL",
1414
"version": "1.0.0"
1515
},
16+
{
17+
"type": "datasource",
18+
"id": "Infinity",
19+
"name": "Infinity",
20+
"version": "1.0.0"
21+
},
1622
{
1723
"type": "panel",
1824
"id": "table",
@@ -597,7 +603,228 @@
597603
],
598604
"title": "ARIs",
599605
"type": "table"
606+
},
607+
{
608+
"id": 73,
609+
"type": "table",
610+
"title": "Hello_rpt_agent_1",
611+
"gridPos": {
612+
"x": 0,
613+
"y": 16,
614+
"h": 8,
615+
"w": 12
616+
},
617+
"fieldConfig": {
618+
"defaults": {
619+
"custom": {
620+
"align": "auto",
621+
"footer": {
622+
"reducers": []
623+
},
624+
"cellOptions": {
625+
"type": "auto"
626+
},
627+
"inspect": false,
628+
"hideFrom": {
629+
"viz": false
630+
}
631+
},
632+
"mappings": [],
633+
"thresholds": {
634+
"mode": "absolute",
635+
"steps": [
636+
{
637+
"color": "green",
638+
"value": null
639+
},
640+
{
641+
"color": "red",
642+
"value": 80
643+
}
644+
]
645+
},
646+
"color": {
647+
"mode": "thresholds"
648+
}
649+
},
650+
"overrides": []
651+
},
652+
"pluginVersion": "12.3.0",
653+
"targets": [
654+
{
655+
"columns": [],
656+
"datasource": {
657+
"type": "yesoreyeram-infinity-datasource",
658+
"uid": "PA0935669E4DE7FB6"
659+
},
660+
"filters": [],
661+
"format": "table",
662+
"global_query_id": "",
663+
"parser": "backend",
664+
"refId": "A",
665+
"root_selector": "",
666+
"source": "url",
667+
"type": "uql",
668+
"uql": " parse-json\n | scope \"ari://ietf/dtnma-agent/CONST/hello\"\n | extend \"hello\"=array_to_map(\"ari://ietf/dtnma-agent/CONST/hello\",'sw_vendor','sw_version', 'capabilities')\n | extend \"time\"=todatetime(\"time\")\n | project \"time\", \"sw_vendor\"=\"hello.sw_vendor\", \"sw_version\"=\"hello.sw_version\", \"capabilities\"=\"hello.capabilities\"\n | order by \"time\" desc\n",
669+
"url": "http://anms-core:5555/report/entries/table/1/b%27%5Cxf6%27",
670+
"url_options": {
671+
"data": "",
672+
"headers": [],
673+
"method": "GET",
674+
"params": [
675+
{
676+
"key": "agent_id",
677+
"value": "1"
678+
},
679+
{
680+
"key": "nonce_cbor",
681+
"value": "b%27%5Cxf6%27"
682+
}
683+
]
684+
}
685+
}
686+
],
687+
"datasource": {
688+
"type": "yesoreyeram-infinity-datasource",
689+
"uid": "PA0935669E4DE7FB6"
690+
},
691+
"options": {
692+
"showHeader": true,
693+
"cellHeight": "sm",
694+
"sortBy": []
695+
}
696+
},
697+
{
698+
"id": 74,
699+
"type": "timeseries",
700+
"title": "ari://ietf/dtnma-agent/CTRL/inspect(//ietf/dtnma-agent/EDD/num-msg-rx)",
701+
"gridPos": {
702+
"x": 0,
703+
"y": 8,
704+
"h": 8,
705+
"w": 12
706+
},
707+
"fieldConfig": {
708+
"defaults": {
709+
"custom": {
710+
"drawStyle": "line",
711+
"lineInterpolation": "smooth",
712+
"barAlignment": 0,
713+
"barWidthFactor": 0.6,
714+
"lineWidth": 1,
715+
"fillOpacity": 0,
716+
"gradientMode": "none",
717+
"spanNulls": false,
718+
"insertNulls": false,
719+
"showPoints": "auto",
720+
"showValues": false,
721+
"pointSize": 5,
722+
"stacking": {
723+
"mode": "none",
724+
"group": "A"
725+
},
726+
"axisPlacement": "auto",
727+
"axisLabel": "",
728+
"axisColorMode": "text",
729+
"axisBorderShow": false,
730+
"scaleDistribution": {
731+
"type": "linear"
732+
},
733+
"axisCenteredZero": false,
734+
"hideFrom": {
735+
"tooltip": false,
736+
"viz": false,
737+
"legend": false
738+
},
739+
"thresholdsStyle": {
740+
"mode": "off"
741+
}
742+
},
743+
"color": {
744+
"mode": "palette-classic"
745+
},
746+
"mappings": [],
747+
"thresholds": {
748+
"mode": "absolute",
749+
"steps": [
750+
{
751+
"color": "green",
752+
"value": null
753+
},
754+
{
755+
"color": "red",
756+
"value": 80
757+
}
758+
]
759+
}
760+
},
761+
"overrides": []
762+
},
763+
"pluginVersion": "12.3.0",
764+
"targets": [
765+
{
766+
"columns": [],
767+
"datasource": {
768+
"type": "yesoreyeram-infinity-datasource",
769+
"uid": "PA0935669E4DE7FB6"
770+
},
771+
"filters": [],
772+
"format": "table",
773+
"global_query_id": "",
774+
"parser": "backend",
775+
"refId": "A",
776+
"root_selector": "",
777+
"source": "url",
778+
"type": "uql",
779+
"uql": "parse-json\n | scope \"b'\\\\x18{'\"\n | extend \"num_msg_rx\"=\"ari://ietf/dtnma-agent/CTRL/inspect(//ietf/dtnma-agent/EDD/num-msg-rx).0\"\n | extend \"num_msg_rx\"=split(\"num_msg_rx\",'/')\n | extend \"num_msg_rx\"=\"num_msg_rx.2\"\n | extend \"ipn_3_6\"=tonumber(\"num_msg_rx\")\n | extend \"time\"=todatetime(\"time\")\n | project \"time\", \"ipn_3_6\"\n ",
780+
"url": "1/b%27%5Cx18%7B%27",
781+
"url_options": {
782+
"data": "",
783+
"method": "GET"
784+
}
785+
},
786+
{
787+
"columns": [],
788+
"datasource": {
789+
"type": "yesoreyeram-infinity-datasource",
790+
"uid": "PA0935669E4DE7FB6"
791+
},
792+
"filters": [],
793+
"format": "table",
794+
"global_query_id": "",
795+
"hide": false,
796+
"parser": "backend",
797+
"refId": "B",
798+
"root_selector": "",
799+
"source": "url",
800+
"type": "uql",
801+
"uql": "parse-json\n | scope \"b'\\\\x18{'\"\n | extend \"num_msg_rx\"=\"ari://ietf/dtnma-agent/CTRL/inspect(//ietf/dtnma-agent/EDD/num-msg-rx).0\"\n | extend \"num_msg_rx\"=split(\"num_msg_rx\",'/')\n | extend \"num_msg_rx\"=\"num_msg_rx.2\"\n | extend \"ipn_2_6\"=tonumber(\"num_msg_rx\")\n | extend \"time\"=todatetime(\"time\")\n | project \"time\", \"ipn_2_6\"\n ",
802+
"url": "2/b%27%5Cx18%7B%27",
803+
"url_options": {
804+
"data": "",
805+
"method": "GET"
806+
}
807+
}
808+
],
809+
"datasource": {
810+
"type": "yesoreyeram-infinity-datasource",
811+
"uid": "PA0935669E4DE7FB6"
812+
},
813+
"options": {
814+
"tooltip": {
815+
"mode": "single",
816+
"sort": "none",
817+
"hideZeros": false
818+
},
819+
"legend": {
820+
"showLegend": true,
821+
"displayMode": "table",
822+
"placement": "right",
823+
"calcs": []
600824
}
825+
}
826+
}
827+
601828
],
602829
"refresh": false,
603830
"schemaVersion": 37,

grafana/provisioning/dashboards/dashboards.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ providers:
1111
# The path option specifies the directory where your JSON files are located
1212
# In this case, it can be the current directory ('.')
1313
path: /etc/grafana/provisioning/dashboards
14+
15+
16+

grafana/provisioning/datasources/datasource.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,17 @@ datasources:
3939
version: 1
4040
editable: true
4141
isDefault: true
42+
43+
- name: report_entries_table_endpoint
44+
type: yesoreyeram-infinity-datasource
45+
typeName: Infinity
46+
access: proxy
47+
url: http://anms-core:5555/report/entries/table/
48+
user:
49+
database:
50+
basicAuth: false
51+
isDefault: false
52+
jsonData:
53+
global_queries: []
54+
pdcInjected: false
55+

0 commit comments

Comments
 (0)