upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/grafana
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 18:43:49 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2025-12-04 18:43:49 +0000
commitdd403b17e7c74db9443d0891a9de1f0f0f9f89eb (patch)
tree177dd9f664dde3565492c1d11016dabfeda28bbc /docs/grafana
parent950c2e4e68448d2abcad90a31bfffaca6d7bc47e (diff)
feat(sync): Phase 6 - observability and production readiness
- Add SyncMetrics with full Prometheus integration - Track sync gaps via catchup events - Update Grafana dashboard with sync panels - Document all sync configuration options - Update design doc with implementation notes
Diffstat (limited to 'docs/grafana')
-rw-r--r--docs/grafana/ngit-grasp-dashboard.json334
1 files changed, 334 insertions, 0 deletions
diff --git a/docs/grafana/ngit-grasp-dashboard.json b/docs/grafana/ngit-grasp-dashboard.json
index bd1b6fe..3b9b216 100644
--- a/docs/grafana/ngit-grasp-dashboard.json
+++ b/docs/grafana/ngit-grasp-dashboard.json
@@ -641,6 +641,340 @@
641 ], 641 ],
642 "title": "Events Stored vs Rejected (5m)", 642 "title": "Events Stored vs Rejected (5m)",
643 "type": "timeseries" 643 "type": "timeseries"
644 },
645 {
646 "collapsed": false,
647 "gridPos": { "h": 1, "w": 24, "x": 0, "y": 48 },
648 "id": 40,
649 "title": "Proactive Sync",
650 "type": "row"
651 },
652 {
653 "datasource": { "type": "prometheus", "uid": "${datasource}" },
654 "fieldConfig": {
655 "defaults": {
656 "color": { "mode": "palette-classic" },
657 "custom": {
658 "axisCenteredZero": false,
659 "axisColorMode": "text",
660 "axisLabel": "",
661 "axisPlacement": "auto",
662 "barAlignment": 0,
663 "drawStyle": "line",
664 "fillOpacity": 10,
665 "gradientMode": "none",
666 "hideFrom": { "legend": false, "tooltip": false, "viz": false },
667 "lineInterpolation": "linear",
668 "lineWidth": 1,
669 "pointSize": 5,
670 "scaleDistribution": { "type": "linear" },
671 "showPoints": "never",
672 "spanNulls": false,
673 "stacking": { "group": "A", "mode": "none" },
674 "thresholdsStyle": { "mode": "off" }
675 },
676 "mappings": [],
677 "thresholds": { "mode": "absolute", "steps": [] },
678 "unit": "short"
679 }
680 },
681 "gridPos": { "h": 8, "w": 12, "x": 0, "y": 49 },
682 "id": 41,
683 "options": {
684 "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
685 "tooltip": { "mode": "multi", "sort": "none" }
686 },
687 "targets": [
688 {
689 "expr": "ngit_sync_relays_connected_total",
690 "legendFormat": "Connected",
691 "refId": "A"
692 },
693 {
694 "expr": "ngit_sync_relays_tracked_total",
695 "legendFormat": "Tracked",
696 "refId": "B"
697 },
698 {
699 "expr": "ngit_sync_relays_dead_total",
700 "legendFormat": "Dead",
701 "refId": "C"
702 }
703 ],
704 "title": "Sync Relays Over Time",
705 "type": "timeseries"
706 },
707 {
708 "datasource": { "type": "prometheus", "uid": "${datasource}" },
709 "fieldConfig": {
710 "defaults": {
711 "color": { "mode": "palette-classic" },
712 "custom": { "hideFrom": { "legend": false, "tooltip": false, "viz": false } },
713 "mappings": [],
714 "unit": "short"
715 },
716 "overrides": [
717 {
718 "matcher": { "id": "byName", "options": "healthy" },
719 "properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
720 },
721 {
722 "matcher": { "id": "byName", "options": "degraded" },
723 "properties": [{ "id": "color", "value": { "fixedColor": "yellow", "mode": "fixed" } }]
724 },
725 {
726 "matcher": { "id": "byName", "options": "dead" },
727 "properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
728 }
729 ]
730 },
731 "gridPos": { "h": 8, "w": 6, "x": 12, "y": 49 },
732 "id": 42,
733 "options": {
734 "legend": { "displayMode": "list", "placement": "right", "showLegend": true },
735 "pieType": "pie",
736 "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
737 "tooltip": { "mode": "single", "sort": "none" }
738 },
739 "targets": [
740 {
741 "expr": "count(ngit_sync_relay_status == 1)",
742 "legendFormat": "healthy",
743 "refId": "A"
744 },
745 {
746 "expr": "count(ngit_sync_relay_status == 2)",
747 "legendFormat": "degraded",
748 "refId": "B"
749 },
750 {
751 "expr": "count(ngit_sync_relay_status == 3)",
752 "legendFormat": "dead",
753 "refId": "C"
754 }
755 ],
756 "title": "Relay Health Distribution",
757 "type": "piechart"
758 },
759 {
760 "datasource": { "type": "prometheus", "uid": "${datasource}" },
761 "fieldConfig": {
762 "defaults": {
763 "color": { "mode": "thresholds" },
764 "mappings": [],
765 "thresholds": {
766 "mode": "absolute",
767 "steps": [
768 { "color": "green", "value": null },
769 { "color": "yellow", "value": 1 },
770 { "color": "red", "value": 5 }
771 ]
772 },
773 "unit": "short"
774 }
775 },
776 "gridPos": { "h": 4, "w": 3, "x": 18, "y": 49 },
777 "id": 43,
778 "options": {
779 "colorMode": "value",
780 "graphMode": "none",
781 "justifyMode": "auto",
782 "orientation": "auto",
783 "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
784 "textMode": "auto"
785 },
786 "targets": [
787 {
788 "expr": "ngit_sync_relays_dead_total",
789 "legendFormat": "Dead",
790 "refId": "A"
791 }
792 ],
793 "title": "Dead Relays",
794 "type": "stat"
795 },
796 {
797 "datasource": { "type": "prometheus", "uid": "${datasource}" },
798 "fieldConfig": {
799 "defaults": {
800 "color": { "mode": "thresholds" },
801 "mappings": [],
802 "thresholds": {
803 "mode": "absolute",
804 "steps": [{ "color": "blue", "value": null }]
805 },
806 "unit": "short"
807 }
808 },
809 "gridPos": { "h": 4, "w": 3, "x": 21, "y": 49 },
810 "id": 44,
811 "options": {
812 "colorMode": "value",
813 "graphMode": "none",
814 "justifyMode": "auto",
815 "orientation": "auto",
816 "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
817 "textMode": "auto"
818 },
819 "targets": [
820 {
821 "expr": "ngit_sync_relays_connected_total",
822 "legendFormat": "Connected",
823 "refId": "A"
824 }
825 ],
826 "title": "Connected Relays",
827 "type": "stat"
828 },
829 {
830 "datasource": { "type": "prometheus", "uid": "${datasource}" },
831 "fieldConfig": {
832 "defaults": {
833 "color": { "mode": "palette-classic" },
834 "custom": {
835 "axisCenteredZero": false,
836 "axisColorMode": "text",
837 "axisLabel": "",
838 "axisPlacement": "auto",
839 "barAlignment": 0,
840 "drawStyle": "bars",
841 "fillOpacity": 50,
842 "gradientMode": "none",
843 "hideFrom": { "legend": false, "tooltip": false, "viz": false },
844 "lineInterpolation": "linear",
845 "lineWidth": 1,
846 "pointSize": 5,
847 "scaleDistribution": { "type": "linear" },
848 "showPoints": "never",
849 "spanNulls": false,
850 "stacking": { "group": "A", "mode": "normal" },
851 "thresholdsStyle": { "mode": "off" }
852 },
853 "mappings": [],
854 "thresholds": { "mode": "absolute", "steps": [] },
855 "unit": "short"
856 },
857 "overrides": [
858 {
859 "matcher": { "id": "byName", "options": "success" },
860 "properties": [{ "id": "color", "value": { "fixedColor": "green", "mode": "fixed" } }]
861 },
862 {
863 "matcher": { "id": "byName", "options": "failure" },
864 "properties": [{ "id": "color", "value": { "fixedColor": "red", "mode": "fixed" } }]
865 }
866 ]
867 },
868 "gridPos": { "h": 4, "w": 6, "x": 18, "y": 53 },
869 "id": 45,
870 "options": {
871 "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true },
872 "tooltip": { "mode": "multi", "sort": "none" }
873 },
874 "targets": [
875 {
876 "expr": "increase(ngit_sync_connection_attempts_total{result=\"success\"}[5m])",
877 "legendFormat": "success",
878 "refId": "A"
879 },
880 {
881 "expr": "increase(ngit_sync_connection_attempts_total{result=\"failure\"}[5m])",
882 "legendFormat": "failure",
883 "refId": "B"
884 }
885 ],
886 "title": "Connection Attempts (5m)",
887 "type": "timeseries"
888 },
889 {
890 "datasource": { "type": "prometheus", "uid": "${datasource}" },
891 "fieldConfig": {
892 "defaults": {
893 "color": { "mode": "palette-classic" },
894 "custom": {
895 "axisCenteredZero": false,
896 "axisColorMode": "text",
897 "axisLabel": "",
898 "axisPlacement": "auto",
899 "barAlignment": 0,
900 "drawStyle": "line",
901 "fillOpacity": 10,
902 "gradientMode": "none",
903 "hideFrom": { "legend": false, "tooltip": false, "viz": false },
904 "lineInterpolation": "linear",
905 "lineWidth": 1,
906 "pointSize": 5,
907 "scaleDistribution": { "type": "linear" },
908 "showPoints": "never",
909 "spanNulls": false,
910 "stacking": { "group": "A", "mode": "none" },
911 "thresholdsStyle": { "mode": "off" }
912 },
913 "mappings": [],
914 "thresholds": { "mode": "absolute", "steps": [] },
915 "unit": "short"
916 }
917 },
918 "gridPos": { "h": 8, "w": 12, "x": 0, "y": 57 },
919 "id": 46,
920 "options": {
921 "legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
922 "tooltip": { "mode": "multi", "sort": "none" }
923 },
924 "targets": [
925 {
926 "expr": "rate(ngit_sync_events_total[5m])",
927 "legendFormat": "{{source}}",
928 "refId": "A"
929 }
930 ],
931 "title": "Synced Events by Source (5m)",
932 "type": "timeseries"
933 },
934 {
935 "datasource": { "type": "prometheus", "uid": "${datasource}" },
936 "fieldConfig": {
937 "defaults": {
938 "color": { "mode": "palette-classic" },
939 "custom": {
940 "axisCenteredZero": false,
941 "axisColorMode": "text",
942 "axisLabel": "",
943 "axisPlacement": "auto",
944 "barAlignment": 0,
945 "drawStyle": "bars",
946 "fillOpacity": 50,
947 "gradientMode": "none",
948 "hideFrom": { "legend": false, "tooltip": false, "viz": false },
949 "lineInterpolation": "linear",
950 "lineWidth": 1,
951 "pointSize": 5,
952 "scaleDistribution": { "type": "linear" },
953 "showPoints": "never",
954 "spanNulls": false,
955 "stacking": { "group": "A", "mode": "normal" },
956 "thresholdsStyle": { "mode": "off" }
957 },
958 "mappings": [],
959 "thresholds": { "mode": "absolute", "steps": [] },
960 "unit": "short"
961 }
962 },
963 "gridPos": { "h": 8, "w": 12, "x": 12, "y": 57 },
964 "id": 47,
965 "options": {
966 "legend": { "calcs": ["sum"], "displayMode": "table", "placement": "right", "showLegend": true },
967 "tooltip": { "mode": "multi", "sort": "none" }
968 },
969 "targets": [
970 {
971 "expr": "increase(ngit_sync_gap_events_total[1h])",
972 "legendFormat": "{{relay}}",
973 "refId": "A"
974 }
975 ],
976 "title": "Gap Events Filled by Relay (1h)",
977 "type": "timeseries"
644 } 978 }
645 ], 979 ],
646 "refresh": "30s", 980 "refresh": "30s",