Last active 1 week ago

guest revised this gist 3 weeks ago. Go to revision

1 file changed, 111 insertions, 5 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 25,
6 + "generation": 29,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -638,7 +638,7 @@
638 638 "spec": {
639 639 "id": 12,
640 640 "title": "vfs_fsync ops",
641 - "description": "",
641 + "description": "Метрика за каждую секунду: Каждый блок или строчка — это отчет за 1 секунду времени (так как в скрипте задан интервал interval:s:1).Имя функции (vfs_fsync_range): Ядро Linux обрабатывает запросы к файлу .ldb именно через системный вызов vfs_fsync_range. Это означает, что приложение не просто сохраняет весь файл целиком, а пытается очень часто и точечно сбрасывать из оперативной памяти на диск конкретные измененные участки (диапазоны байт).",
642 642 "links": [],
643 643 "data": {
644 644 "kind": "QueryGroup",
@@ -788,7 +788,7 @@
788 788 "spec": {
789 789 "id": 13,
790 790 "title": "ldb ops",
791 - "description": "",
791 + "description": "* Режим чистого чтения [ R ]: Метрика ldb_search_events растет (пользователи входят \n в сеть), а syscall_fsync_events держится около нуля. База в RAM работает идеально.\n* Режим записи [ W ] / [ CW ]: Метрика syscall_fsync_events начинает расти синхронно \n с действиями пользователей. Это означает, что изменения фиксируются на диск. \n Если график упирается в производительность ваших дисков, время ответа Samba \n будет увеличиваться (растут задержки аутентификации).\n\nO=Open (Открытие файла для записи/изменения)\nRO=Read Only (Открытие файла строго для чтения)\nR=Read (Чтение данных из файла)\nW=Write (Запись измененных данных в кэш памяти)\nCW=Commit/Close Write (Фиксация транзакции и принудительный сброс на диск)",
792 792 "links": [],
793 793 "data": {
794 794 "kind": "QueryGroup",
@@ -949,7 +949,7 @@
949 949 "spec": {
950 950 "id": 14,
951 951 "title": "vmstat",
952 - "description": "",
952 + "description": "si=Swap In, Объем данных в КБ/сек, считываемый из свопа обратно в ОЗУ. Высокое значение = жесткие тормоза.\nso=Swap Out, Объем данных в КБ/сек, сбрасываемый из ОЗУ в своп на диск из-за нехватки памяти.\n\nbi=Blocks In, Количество блоков, считанных с диска в КБ/сек. Показывает активность чтения.\nbo=Blocks Out, Количество блоков, записанных на диск в КБ/сек. Связано с операциями W, CW и fsync.\n\nin=Interrupts, Количество аппаратных прерываний в секунду, включая системные часы.\n\nid=Idle Time, Процент времени, когда CPU ничем не занят. Если около 0 — процессор загружен полностью.",
953 953 "links": [],
954 954 "data": {
955 955 "kind": "QueryGroup",
@@ -1008,6 +1008,59 @@
1008 1008 "hidden": false
1009 1009 }
1010 1010 },
1011 + {
1012 + "kind": "PanelQuery",
1013 + "spec": {
1014 + "query": {
1015 + "kind": "DataQuery",
1016 + "group": "influxdb",
1017 + "version": "v0",
1018 + "spec": {
1019 + "alias": "so",
1020 + "groupBy": [
1021 + {
1022 + "params": [
1023 + "$interval"
1024 + ],
1025 + "type": "time"
1026 + },
1027 + {
1028 + "params": [
1029 + "null"
1030 + ],
1031 + "type": "fill"
1032 + }
1033 + ],
1034 + "measurement": "host_vmstat",
1035 + "orderByTime": "ASC",
1036 + "policy": "default",
1037 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1038 + "rawQuery": false,
1039 + "resultFormat": "time_series",
1040 + "select": [
1041 + [
1042 + {
1043 + "params": [
1044 + "so"
1045 + ],
1046 + "type": "field"
1047 + },
1048 + {
1049 + "params": [],
1050 + "type": "sum"
1051 + }
1052 + ]
1053 + ],
1054 + "tags": []
1055 + },
1056 + "labels": {
1057 + "grafana.app/export-label": "influxdb-1"
1058 + }
1059 + },
1060 + "refId": "E",
1061 + "hidden": false
1062 + }
1063 + },
1011 1064 {
1012 1065 "kind": "PanelQuery",
1013 1066 "spec": {
@@ -1061,6 +1114,59 @@
1061 1114 "hidden": false
1062 1115 }
1063 1116 },
1117 + {
1118 + "kind": "PanelQuery",
1119 + "spec": {
1120 + "query": {
1121 + "kind": "DataQuery",
1122 + "group": "influxdb",
1123 + "version": "v0",
1124 + "spec": {
1125 + "alias": "bo",
1126 + "groupBy": [
1127 + {
1128 + "params": [
1129 + "$interval"
1130 + ],
1131 + "type": "time"
1132 + },
1133 + {
1134 + "params": [
1135 + "null"
1136 + ],
1137 + "type": "fill"
1138 + }
1139 + ],
1140 + "measurement": "host_vmstat",
1141 + "orderByTime": "ASC",
1142 + "policy": "default",
1143 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1144 + "rawQuery": false,
1145 + "resultFormat": "time_series",
1146 + "select": [
1147 + [
1148 + {
1149 + "params": [
1150 + "bo"
1151 + ],
1152 + "type": "field"
1153 + },
1154 + {
1155 + "params": [],
1156 + "type": "sum"
1157 + }
1158 + ]
1159 + ],
1160 + "tags": []
1161 + },
1162 + "labels": {
1163 + "grafana.app/export-label": "influxdb-1"
1164 + }
1165 + },
1166 + "refId": "F",
1167 + "hidden": false
1168 + }
1169 + },
1064 1170 {
1065 1171 "kind": "PanelQuery",
1066 1172 "spec": {
@@ -1258,7 +1364,7 @@
1258 1364 "spec": {
1259 1365 "id": 15,
1260 1366 "title": "pidstat",
1261 - "description": "",
1367 + "description": "minflt/s = Скорость работы с ОЗУ. Сколько раз в секунду процесс запрашивал данные, \n которые ядро Linux успешно выдало из оперативной памяти (из кэша).\n Высокое значение — это норма при активных вычислениях или LDAP-запросах.\n\nmajflt/s = Скорость просадки на диск. Сколько раз в секунду процесс лез за данными \n на физический диск (или в SWAP), потому что их не оказалость в ОЗУ.\n В идеале должно быть равно 0. Если число растет — сервер сильно тормозит.\n\n%MEM = Процент ОЗУ. Доля оперативной памяти сервера, которую съел этот PID.",
1262 1368 "links": [],
1263 1369 "data": {
1264 1370 "kind": "QueryGroup",

guest revised this gist 3 weeks ago. Go to revision

No changes

guest revised this gist 3 weeks ago. Go to revision

1 file changed, 19 insertions, 19 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 22,
6 + "generation": 25,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -27,7 +27,7 @@
27 27 }
28 28 }
29 29 ],
30 - "cursorSync": "Off",
30 + "cursorSync": "Crosshair",
31 31 "editable": true,
32 32 "elements": {
33 33 "panel-1": {
@@ -2779,8 +2779,8 @@
2779 2779 "spec": {
2780 2780 "x": 0,
2781 2781 "y": 10,
2782 - "width": 24,
2783 - "height": 10,
2782 + "width": 12,
2783 + "height": 11,
2784 2784 "element": {
2785 2785 "kind": "ElementReference",
2786 2786 "name": "panel-12"
@@ -2790,10 +2790,10 @@
2790 2790 {
2791 2791 "kind": "GridLayoutItem",
2792 2792 "spec": {
2793 - "x": 0,
2794 - "y": 20,
2795 - "width": 24,
2796 - "height": 10,
2793 + "x": 12,
2794 + "y": 10,
2795 + "width": 12,
2796 + "height": 11,
2797 2797 "element": {
2798 2798 "kind": "ElementReference",
2799 2799 "name": "panel-13"
@@ -2804,7 +2804,7 @@
2804 2804 "kind": "GridLayoutItem",
2805 2805 "spec": {
2806 2806 "x": 0,
2807 - "y": 30,
2807 + "y": 21,
2808 2808 "width": 24,
2809 2809 "height": 10,
2810 2810 "element": {
@@ -2817,7 +2817,7 @@
2817 2817 "kind": "GridLayoutItem",
2818 2818 "spec": {
2819 2819 "x": 0,
2820 - "y": 40,
2820 + "y": 31,
2821 2821 "width": 24,
2822 2822 "height": 10,
2823 2823 "element": {
@@ -2830,7 +2830,7 @@
2830 2830 "kind": "GridLayoutItem",
2831 2831 "spec": {
2832 2832 "x": 0,
2833 - "y": 50,
2833 + "y": 41,
2834 2834 "width": 12,
2835 2835 "height": 7,
2836 2836 "element": {
@@ -2843,7 +2843,7 @@
2843 2843 "kind": "GridLayoutItem",
2844 2844 "spec": {
2845 2845 "x": 12,
2846 - "y": 50,
2846 + "y": 41,
2847 2847 "width": 12,
2848 2848 "height": 7,
2849 2849 "element": {
@@ -2856,7 +2856,7 @@
2856 2856 "kind": "GridLayoutItem",
2857 2857 "spec": {
2858 2858 "x": 0,
2859 - "y": 57,
2859 + "y": 48,
2860 2860 "width": 12,
2861 2861 "height": 8,
2862 2862 "element": {
@@ -2869,7 +2869,7 @@
2869 2869 "kind": "GridLayoutItem",
2870 2870 "spec": {
2871 2871 "x": 12,
2872 - "y": 57,
2872 + "y": 48,
2873 2873 "width": 12,
2874 2874 "height": 8,
2875 2875 "element": {
@@ -2882,7 +2882,7 @@
2882 2882 "kind": "GridLayoutItem",
2883 2883 "spec": {
2884 2884 "x": 0,
2885 - "y": 65,
2885 + "y": 56,
2886 2886 "width": 12,
2887 2887 "height": 8,
2888 2888 "element": {
@@ -2895,7 +2895,7 @@
2895 2895 "kind": "GridLayoutItem",
2896 2896 "spec": {
2897 2897 "x": 12,
2898 - "y": 65,
2898 + "y": 56,
2899 2899 "width": 12,
2900 2900 "height": 8,
2901 2901 "element": {
@@ -2908,7 +2908,7 @@
2908 2908 "kind": "GridLayoutItem",
2909 2909 "spec": {
2910 2910 "x": 0,
2911 - "y": 73,
2911 + "y": 64,
2912 2912 "width": 12,
2913 2913 "height": 8,
2914 2914 "element": {
@@ -2921,7 +2921,7 @@
2921 2921 "kind": "GridLayoutItem",
2922 2922 "spec": {
2923 2923 "x": 0,
2924 - "y": 81,
2924 + "y": 72,
2925 2925 "width": 6,
2926 2926 "height": 8,
2927 2927 "element": {
@@ -2934,7 +2934,7 @@
2934 2934 "kind": "GridLayoutItem",
2935 2935 "spec": {
2936 2936 "x": 6,
2937 - "y": 81,
2937 + "y": 72,
2938 2938 "width": 18,
2939 2939 "height": 8,
2940 2940 "element": {

guest revised this gist 3 weeks ago. Go to revision

1 file changed, 955 insertions, 9 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 17,
6 + "generation": 22,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -633,6 +633,900 @@
633 633 }
634 634 }
635 635 },
636 + "panel-12": {
637 + "kind": "Panel",
638 + "spec": {
639 + "id": 12,
640 + "title": "vfs_fsync ops",
641 + "description": "",
642 + "links": [],
643 + "data": {
644 + "kind": "QueryGroup",
645 + "spec": {
646 + "queries": [
647 + {
648 + "kind": "PanelQuery",
649 + "spec": {
650 + "query": {
651 + "kind": "DataQuery",
652 + "group": "influxdb",
653 + "version": "v0",
654 + "spec": {
655 + "alias": "machine_login",
656 + "groupBy": [
657 + {
658 + "params": [
659 + "$interval"
660 + ],
661 + "type": "time"
662 + },
663 + {
664 + "params": [
665 + "null"
666 + ],
667 + "type": "fill"
668 + }
669 + ],
670 + "measurement": "samba_sync_ops",
671 + "orderByTime": "ASC",
672 + "policy": "default",
673 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
674 + "rawQuery": false,
675 + "resultFormat": "time_series",
676 + "select": [
677 + [
678 + {
679 + "params": [
680 + "count"
681 + ],
682 + "type": "field"
683 + },
684 + {
685 + "params": [],
686 + "type": "sum"
687 + }
688 + ]
689 + ],
690 + "tags": []
691 + },
692 + "labels": {
693 + "grafana.app/export-label": "influxdb-1"
694 + }
695 + },
696 + "refId": "A",
697 + "hidden": false
698 + }
699 + }
700 + ],
701 + "transformations": [],
702 + "queryOptions": {}
703 + }
704 + },
705 + "vizConfig": {
706 + "kind": "VizConfig",
707 + "group": "timeseries",
708 + "version": "13.0.1+security-01",
709 + "spec": {
710 + "options": {
711 + "annotations": {
712 + "clustering": -1,
713 + "multiLane": false
714 + },
715 + "legend": {
716 + "calcs": [],
717 + "displayMode": "list",
718 + "placement": "bottom",
719 + "showLegend": true
720 + },
721 + "tooltip": {
722 + "hideZeros": false,
723 + "mode": "single",
724 + "sort": "none"
725 + }
726 + },
727 + "fieldConfig": {
728 + "defaults": {
729 + "thresholds": {
730 + "mode": "absolute",
731 + "steps": [
732 + {
733 + "value": 0,
734 + "color": "green"
735 + },
736 + {
737 + "value": 80,
738 + "color": "red"
739 + }
740 + ]
741 + },
742 + "color": {
743 + "mode": "palette-classic"
744 + },
745 + "custom": {
746 + "axisBorderShow": false,
747 + "axisCenteredZero": false,
748 + "axisColorMode": "text",
749 + "axisLabel": "",
750 + "axisPlacement": "auto",
751 + "barAlignment": 0,
752 + "barWidthFactor": 0.6,
753 + "drawStyle": "line",
754 + "fillOpacity": 10,
755 + "gradientMode": "none",
756 + "hideFrom": {
757 + "legend": false,
758 + "tooltip": false,
759 + "viz": false
760 + },
761 + "insertNulls": false,
762 + "lineInterpolation": "smooth",
763 + "lineWidth": 1,
764 + "pointSize": 5,
765 + "scaleDistribution": {
766 + "type": "linear"
767 + },
768 + "showPoints": "auto",
769 + "showValues": false,
770 + "spanNulls": false,
771 + "stacking": {
772 + "group": "A",
773 + "mode": "none"
774 + },
775 + "thresholdsStyle": {
776 + "mode": "off"
777 + }
778 + }
779 + },
780 + "overrides": []
781 + }
782 + }
783 + }
784 + }
785 + },
786 + "panel-13": {
787 + "kind": "Panel",
788 + "spec": {
789 + "id": 13,
790 + "title": "ldb ops",
791 + "description": "",
792 + "links": [],
793 + "data": {
794 + "kind": "QueryGroup",
795 + "spec": {
796 + "queries": [
797 + {
798 + "kind": "PanelQuery",
799 + "spec": {
800 + "query": {
801 + "kind": "DataQuery",
802 + "group": "influxdb",
803 + "version": "v0",
804 + "spec": {
805 + "groupBy": [
806 + {
807 + "params": [
808 + "$interval"
809 + ],
810 + "type": "time"
811 + },
812 + {
813 + "params": [
814 + "prog::tag"
815 + ],
816 + "type": "tag"
817 + },
818 + {
819 + "params": [
820 + "action::tag"
821 + ],
822 + "type": "tag"
823 + },
824 + {
825 + "params": [
826 + "null"
827 + ],
828 + "type": "fill"
829 + }
830 + ],
831 + "measurement": "samba_file_access",
832 + "orderByTime": "ASC",
833 + "policy": "default",
834 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
835 + "rawQuery": false,
836 + "resultFormat": "time_series",
837 + "select": [
838 + [
839 + {
840 + "params": [
841 + "pid"
842 + ],
843 + "type": "field"
844 + },
845 + {
846 + "params": [],
847 + "type": "sum"
848 + }
849 + ]
850 + ],
851 + "tags": []
852 + },
853 + "labels": {
854 + "grafana.app/export-label": "influxdb-1"
855 + }
856 + },
857 + "refId": "A",
858 + "hidden": false
859 + }
860 + }
861 + ],
862 + "transformations": [],
863 + "queryOptions": {}
864 + }
865 + },
866 + "vizConfig": {
867 + "kind": "VizConfig",
868 + "group": "timeseries",
869 + "version": "13.0.1+security-01",
870 + "spec": {
871 + "options": {
872 + "annotations": {
873 + "clustering": -1,
874 + "multiLane": false
875 + },
876 + "legend": {
877 + "calcs": [],
878 + "displayMode": "list",
879 + "placement": "bottom",
880 + "showLegend": true
881 + },
882 + "tooltip": {
883 + "hideZeros": false,
884 + "mode": "single",
885 + "sort": "none"
886 + }
887 + },
888 + "fieldConfig": {
889 + "defaults": {
890 + "thresholds": {
891 + "mode": "absolute",
892 + "steps": [
893 + {
894 + "value": 0,
895 + "color": "green"
896 + },
897 + {
898 + "value": 80,
899 + "color": "red"
900 + }
901 + ]
902 + },
903 + "color": {
904 + "mode": "palette-classic"
905 + },
906 + "custom": {
907 + "axisBorderShow": false,
908 + "axisCenteredZero": false,
909 + "axisColorMode": "text",
910 + "axisLabel": "",
911 + "axisPlacement": "auto",
912 + "barAlignment": 0,
913 + "barWidthFactor": 0.6,
914 + "drawStyle": "line",
915 + "fillOpacity": 10,
916 + "gradientMode": "none",
917 + "hideFrom": {
918 + "legend": false,
919 + "tooltip": false,
920 + "viz": false
921 + },
922 + "insertNulls": false,
923 + "lineInterpolation": "smooth",
924 + "lineWidth": 1,
925 + "pointSize": 5,
926 + "scaleDistribution": {
927 + "type": "linear"
928 + },
929 + "showPoints": "auto",
930 + "showValues": false,
931 + "spanNulls": false,
932 + "stacking": {
933 + "group": "A",
934 + "mode": "none"
935 + },
936 + "thresholdsStyle": {
937 + "mode": "off"
938 + }
939 + }
940 + },
941 + "overrides": []
942 + }
943 + }
944 + }
945 + }
946 + },
947 + "panel-14": {
948 + "kind": "Panel",
949 + "spec": {
950 + "id": 14,
951 + "title": "vmstat",
952 + "description": "",
953 + "links": [],
954 + "data": {
955 + "kind": "QueryGroup",
956 + "spec": {
957 + "queries": [
958 + {
959 + "kind": "PanelQuery",
960 + "spec": {
961 + "query": {
962 + "kind": "DataQuery",
963 + "group": "influxdb",
964 + "version": "v0",
965 + "spec": {
966 + "alias": "si",
967 + "groupBy": [
968 + {
969 + "params": [
970 + "$interval"
971 + ],
972 + "type": "time"
973 + },
974 + {
975 + "params": [
976 + "null"
977 + ],
978 + "type": "fill"
979 + }
980 + ],
981 + "measurement": "host_vmstat",
982 + "orderByTime": "ASC",
983 + "policy": "default",
984 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
985 + "rawQuery": false,
986 + "resultFormat": "time_series",
987 + "select": [
988 + [
989 + {
990 + "params": [
991 + "si"
992 + ],
993 + "type": "field"
994 + },
995 + {
996 + "params": [],
997 + "type": "sum"
998 + }
999 + ]
1000 + ],
1001 + "tags": []
1002 + },
1003 + "labels": {
1004 + "grafana.app/export-label": "influxdb-1"
1005 + }
1006 + },
1007 + "refId": "A",
1008 + "hidden": false
1009 + }
1010 + },
1011 + {
1012 + "kind": "PanelQuery",
1013 + "spec": {
1014 + "query": {
1015 + "kind": "DataQuery",
1016 + "group": "influxdb",
1017 + "version": "v0",
1018 + "spec": {
1019 + "alias": "bi",
1020 + "groupBy": [
1021 + {
1022 + "params": [
1023 + "$interval"
1024 + ],
1025 + "type": "time"
1026 + },
1027 + {
1028 + "params": [
1029 + "null"
1030 + ],
1031 + "type": "fill"
1032 + }
1033 + ],
1034 + "measurement": "host_vmstat",
1035 + "orderByTime": "ASC",
1036 + "policy": "default",
1037 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1038 + "rawQuery": false,
1039 + "resultFormat": "time_series",
1040 + "select": [
1041 + [
1042 + {
1043 + "params": [
1044 + "bi"
1045 + ],
1046 + "type": "field"
1047 + },
1048 + {
1049 + "params": [],
1050 + "type": "sum"
1051 + }
1052 + ]
1053 + ],
1054 + "tags": []
1055 + },
1056 + "labels": {
1057 + "grafana.app/export-label": "influxdb-1"
1058 + }
1059 + },
1060 + "refId": "B",
1061 + "hidden": false
1062 + }
1063 + },
1064 + {
1065 + "kind": "PanelQuery",
1066 + "spec": {
1067 + "query": {
1068 + "kind": "DataQuery",
1069 + "group": "influxdb",
1070 + "version": "v0",
1071 + "spec": {
1072 + "alias": "in",
1073 + "groupBy": [
1074 + {
1075 + "params": [
1076 + "$interval"
1077 + ],
1078 + "type": "time"
1079 + },
1080 + {
1081 + "params": [
1082 + "null"
1083 + ],
1084 + "type": "fill"
1085 + }
1086 + ],
1087 + "measurement": "host_vmstat",
1088 + "orderByTime": "ASC",
1089 + "policy": "default",
1090 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1091 + "rawQuery": false,
1092 + "resultFormat": "time_series",
1093 + "select": [
1094 + [
1095 + {
1096 + "params": [
1097 + "intr"
1098 + ],
1099 + "type": "field"
1100 + },
1101 + {
1102 + "params": [],
1103 + "type": "sum"
1104 + }
1105 + ]
1106 + ],
1107 + "tags": []
1108 + },
1109 + "labels": {
1110 + "grafana.app/export-label": "influxdb-1"
1111 + }
1112 + },
1113 + "refId": "C",
1114 + "hidden": false
1115 + }
1116 + },
1117 + {
1118 + "kind": "PanelQuery",
1119 + "spec": {
1120 + "query": {
1121 + "kind": "DataQuery",
1122 + "group": "influxdb",
1123 + "version": "v0",
1124 + "spec": {
1125 + "alias": "id",
1126 + "groupBy": [
1127 + {
1128 + "params": [
1129 + "$interval"
1130 + ],
1131 + "type": "time"
1132 + },
1133 + {
1134 + "params": [
1135 + "null"
1136 + ],
1137 + "type": "fill"
1138 + }
1139 + ],
1140 + "measurement": "host_vmstat",
1141 + "orderByTime": "ASC",
1142 + "policy": "default",
1143 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1144 + "rawQuery": false,
1145 + "resultFormat": "time_series",
1146 + "select": [
1147 + [
1148 + {
1149 + "params": [
1150 + "idle"
1151 + ],
1152 + "type": "field"
1153 + },
1154 + {
1155 + "params": [],
1156 + "type": "sum"
1157 + }
1158 + ]
1159 + ],
1160 + "tags": []
1161 + },
1162 + "labels": {
1163 + "grafana.app/export-label": "influxdb-1"
1164 + }
1165 + },
1166 + "refId": "D",
1167 + "hidden": false
1168 + }
1169 + }
1170 + ],
1171 + "transformations": [],
1172 + "queryOptions": {}
1173 + }
1174 + },
1175 + "vizConfig": {
1176 + "kind": "VizConfig",
1177 + "group": "timeseries",
1178 + "version": "13.0.1+security-01",
1179 + "spec": {
1180 + "options": {
1181 + "annotations": {
1182 + "clustering": -1,
1183 + "multiLane": false
1184 + },
1185 + "legend": {
1186 + "calcs": [],
1187 + "displayMode": "list",
1188 + "placement": "bottom",
1189 + "showLegend": true
1190 + },
1191 + "tooltip": {
1192 + "hideZeros": false,
1193 + "mode": "single",
1194 + "sort": "none"
1195 + }
1196 + },
1197 + "fieldConfig": {
1198 + "defaults": {
1199 + "thresholds": {
1200 + "mode": "absolute",
1201 + "steps": [
1202 + {
1203 + "value": 0,
1204 + "color": "green"
1205 + },
1206 + {
1207 + "value": 80,
1208 + "color": "red"
1209 + }
1210 + ]
1211 + },
1212 + "color": {
1213 + "mode": "palette-classic"
1214 + },
1215 + "custom": {
1216 + "axisBorderShow": false,
1217 + "axisCenteredZero": false,
1218 + "axisColorMode": "text",
1219 + "axisLabel": "",
1220 + "axisPlacement": "auto",
1221 + "barAlignment": 0,
1222 + "barWidthFactor": 0.6,
1223 + "drawStyle": "line",
1224 + "fillOpacity": 10,
1225 + "gradientMode": "none",
1226 + "hideFrom": {
1227 + "legend": false,
1228 + "tooltip": false,
1229 + "viz": false
1230 + },
1231 + "insertNulls": false,
1232 + "lineInterpolation": "smooth",
1233 + "lineWidth": 1,
1234 + "pointSize": 5,
1235 + "scaleDistribution": {
1236 + "type": "linear"
1237 + },
1238 + "showPoints": "auto",
1239 + "showValues": false,
1240 + "spanNulls": false,
1241 + "stacking": {
1242 + "group": "A",
1243 + "mode": "none"
1244 + },
1245 + "thresholdsStyle": {
1246 + "mode": "off"
1247 + }
1248 + }
1249 + },
1250 + "overrides": []
1251 + }
1252 + }
1253 + }
1254 + }
1255 + },
1256 + "panel-15": {
1257 + "kind": "Panel",
1258 + "spec": {
1259 + "id": 15,
1260 + "title": "pidstat",
1261 + "description": "",
1262 + "links": [],
1263 + "data": {
1264 + "kind": "QueryGroup",
1265 + "spec": {
1266 + "queries": [
1267 + {
1268 + "kind": "PanelQuery",
1269 + "spec": {
1270 + "query": {
1271 + "kind": "DataQuery",
1272 + "group": "influxdb",
1273 + "version": "v0",
1274 + "spec": {
1275 + "alias": "minfit",
1276 + "groupBy": [
1277 + {
1278 + "params": [
1279 + "$interval"
1280 + ],
1281 + "type": "time"
1282 + },
1283 + {
1284 + "params": [
1285 + "comm::tag"
1286 + ],
1287 + "type": "tag"
1288 + },
1289 + {
1290 + "params": [
1291 + "null"
1292 + ],
1293 + "type": "fill"
1294 + }
1295 + ],
1296 + "measurement": "samba_pidstat",
1297 + "orderByTime": "ASC",
1298 + "policy": "default",
1299 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1300 + "rawQuery": false,
1301 + "resultFormat": "time_series",
1302 + "select": [
1303 + [
1304 + {
1305 + "params": [
1306 + "minflt"
1307 + ],
1308 + "type": "field"
1309 + },
1310 + {
1311 + "params": [],
1312 + "type": "mean"
1313 + }
1314 + ]
1315 + ],
1316 + "tags": []
1317 + },
1318 + "labels": {
1319 + "grafana.app/export-label": "influxdb-1"
1320 + }
1321 + },
1322 + "refId": "A",
1323 + "hidden": false
1324 + }
1325 + },
1326 + {
1327 + "kind": "PanelQuery",
1328 + "spec": {
1329 + "query": {
1330 + "kind": "DataQuery",
1331 + "group": "influxdb",
1332 + "version": "v0",
1333 + "spec": {
1334 + "alias": "majfit",
1335 + "groupBy": [
1336 + {
1337 + "params": [
1338 + "$interval"
1339 + ],
1340 + "type": "time"
1341 + },
1342 + {
1343 + "params": [
1344 + "comm::tag"
1345 + ],
1346 + "type": "tag"
1347 + },
1348 + {
1349 + "params": [
1350 + "null"
1351 + ],
1352 + "type": "fill"
1353 + }
1354 + ],
1355 + "measurement": "samba_pidstat",
1356 + "orderByTime": "ASC",
1357 + "policy": "default",
1358 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1359 + "rawQuery": false,
1360 + "resultFormat": "time_series",
1361 + "select": [
1362 + [
1363 + {
1364 + "params": [
1365 + "majflt"
1366 + ],
1367 + "type": "field"
1368 + },
1369 + {
1370 + "params": [],
1371 + "type": "median"
1372 + }
1373 + ]
1374 + ],
1375 + "tags": []
1376 + },
1377 + "labels": {
1378 + "grafana.app/export-label": "influxdb-1"
1379 + }
1380 + },
1381 + "refId": "B",
1382 + "hidden": false
1383 + }
1384 + },
1385 + {
1386 + "kind": "PanelQuery",
1387 + "spec": {
1388 + "query": {
1389 + "kind": "DataQuery",
1390 + "group": "influxdb",
1391 + "version": "v0",
1392 + "spec": {
1393 + "alias": "MEM",
1394 + "groupBy": [
1395 + {
1396 + "params": [
1397 + "$interval"
1398 + ],
1399 + "type": "time"
1400 + },
1401 + {
1402 + "params": [
1403 + "comm::tag"
1404 + ],
1405 + "type": "tag"
1406 + },
1407 + {
1408 + "params": [
1409 + "null"
1410 + ],
1411 + "type": "fill"
1412 + }
1413 + ],
1414 + "measurement": "samba_pidstat",
1415 + "orderByTime": "ASC",
1416 + "policy": "default",
1417 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
1418 + "rawQuery": false,
1419 + "resultFormat": "time_series",
1420 + "select": [
1421 + [
1422 + {
1423 + "params": [
1424 + "mem"
1425 + ],
1426 + "type": "field"
1427 + },
1428 + {
1429 + "params": [],
1430 + "type": "median"
1431 + }
1432 + ]
1433 + ],
1434 + "tags": []
1435 + },
1436 + "labels": {
1437 + "grafana.app/export-label": "influxdb-1"
1438 + }
1439 + },
1440 + "refId": "C",
1441 + "hidden": false
1442 + }
1443 + }
1444 + ],
1445 + "transformations": [],
1446 + "queryOptions": {}
1447 + }
1448 + },
1449 + "vizConfig": {
1450 + "kind": "VizConfig",
1451 + "group": "timeseries",
1452 + "version": "13.0.1+security-01",
1453 + "spec": {
1454 + "options": {
1455 + "annotations": {
1456 + "clustering": -1,
1457 + "multiLane": false
1458 + },
1459 + "legend": {
1460 + "calcs": [],
1461 + "displayMode": "list",
1462 + "placement": "bottom",
1463 + "showLegend": true
1464 + },
1465 + "tooltip": {
1466 + "hideZeros": false,
1467 + "mode": "single",
1468 + "sort": "none"
1469 + }
1470 + },
1471 + "fieldConfig": {
1472 + "defaults": {
1473 + "thresholds": {
1474 + "mode": "absolute",
1475 + "steps": [
1476 + {
1477 + "value": 0,
1478 + "color": "green"
1479 + },
1480 + {
1481 + "value": 80,
1482 + "color": "red"
1483 + }
1484 + ]
1485 + },
1486 + "color": {
1487 + "mode": "palette-classic"
1488 + },
1489 + "custom": {
1490 + "axisBorderShow": false,
1491 + "axisCenteredZero": false,
1492 + "axisColorMode": "text",
1493 + "axisLabel": "",
1494 + "axisPlacement": "auto",
1495 + "barAlignment": 0,
1496 + "barWidthFactor": 0.6,
1497 + "drawStyle": "line",
1498 + "fillOpacity": 10,
1499 + "gradientMode": "none",
1500 + "hideFrom": {
1501 + "legend": false,
1502 + "tooltip": false,
1503 + "viz": false
1504 + },
1505 + "insertNulls": false,
1506 + "lineInterpolation": "smooth",
1507 + "lineWidth": 1,
1508 + "pointSize": 5,
1509 + "scaleDistribution": {
1510 + "type": "linear"
1511 + },
1512 + "showPoints": "auto",
1513 + "showValues": false,
1514 + "spanNulls": false,
1515 + "stacking": {
1516 + "group": "A",
1517 + "mode": "none"
1518 + },
1519 + "thresholdsStyle": {
1520 + "mode": "off"
1521 + }
1522 + }
1523 + },
1524 + "overrides": []
1525 + }
1526 + }
1527 + }
1528 + }
1529 + },
636 1530 "panel-2": {
637 1531 "kind": "Panel",
638 1532 "spec": {
@@ -1885,6 +2779,58 @@
1885 2779 "spec": {
1886 2780 "x": 0,
1887 2781 "y": 10,
2782 + "width": 24,
2783 + "height": 10,
2784 + "element": {
2785 + "kind": "ElementReference",
2786 + "name": "panel-12"
2787 + }
2788 + }
2789 + },
2790 + {
2791 + "kind": "GridLayoutItem",
2792 + "spec": {
2793 + "x": 0,
2794 + "y": 20,
2795 + "width": 24,
2796 + "height": 10,
2797 + "element": {
2798 + "kind": "ElementReference",
2799 + "name": "panel-13"
2800 + }
2801 + }
2802 + },
2803 + {
2804 + "kind": "GridLayoutItem",
2805 + "spec": {
2806 + "x": 0,
2807 + "y": 30,
2808 + "width": 24,
2809 + "height": 10,
2810 + "element": {
2811 + "kind": "ElementReference",
2812 + "name": "panel-14"
2813 + }
2814 + }
2815 + },
2816 + {
2817 + "kind": "GridLayoutItem",
2818 + "spec": {
2819 + "x": 0,
2820 + "y": 40,
2821 + "width": 24,
2822 + "height": 10,
2823 + "element": {
2824 + "kind": "ElementReference",
2825 + "name": "panel-15"
2826 + }
2827 + }
2828 + },
2829 + {
2830 + "kind": "GridLayoutItem",
2831 + "spec": {
2832 + "x": 0,
2833 + "y": 50,
1888 2834 "width": 12,
1889 2835 "height": 7,
1890 2836 "element": {
@@ -1897,7 +2843,7 @@
1897 2843 "kind": "GridLayoutItem",
1898 2844 "spec": {
1899 2845 "x": 12,
1900 - "y": 10,
2846 + "y": 50,
1901 2847 "width": 12,
1902 2848 "height": 7,
1903 2849 "element": {
@@ -1910,7 +2856,7 @@
1910 2856 "kind": "GridLayoutItem",
1911 2857 "spec": {
1912 2858 "x": 0,
1913 - "y": 17,
2859 + "y": 57,
1914 2860 "width": 12,
1915 2861 "height": 8,
1916 2862 "element": {
@@ -1923,7 +2869,7 @@
1923 2869 "kind": "GridLayoutItem",
1924 2870 "spec": {
1925 2871 "x": 12,
1926 - "y": 17,
2872 + "y": 57,
1927 2873 "width": 12,
1928 2874 "height": 8,
1929 2875 "element": {
@@ -1936,7 +2882,7 @@
1936 2882 "kind": "GridLayoutItem",
1937 2883 "spec": {
1938 2884 "x": 0,
1939 - "y": 25,
2885 + "y": 65,
1940 2886 "width": 12,
1941 2887 "height": 8,
1942 2888 "element": {
@@ -1949,7 +2895,7 @@
1949 2895 "kind": "GridLayoutItem",
1950 2896 "spec": {
1951 2897 "x": 12,
1952 - "y": 25,
2898 + "y": 65,
1953 2899 "width": 12,
1954 2900 "height": 8,
1955 2901 "element": {
@@ -1962,7 +2908,7 @@
1962 2908 "kind": "GridLayoutItem",
1963 2909 "spec": {
1964 2910 "x": 0,
1965 - "y": 33,
2911 + "y": 73,
1966 2912 "width": 12,
1967 2913 "height": 8,
1968 2914 "element": {
@@ -1975,7 +2921,7 @@
1975 2921 "kind": "GridLayoutItem",
1976 2922 "spec": {
1977 2923 "x": 0,
1978 - "y": 41,
2924 + "y": 81,
1979 2925 "width": 6,
1980 2926 "height": 8,
1981 2927 "element": {
@@ -1988,7 +2934,7 @@
1988 2934 "kind": "GridLayoutItem",
1989 2935 "spec": {
1990 2936 "x": 6,
1991 - "y": 41,
2937 + "y": 81,
1992 2938 "width": 18,
1993 2939 "height": 8,
1994 2940 "element": {

guest revised this gist 4 weeks ago. Go to revision

No changes

guest revised this gist 1 month ago. Go to revision

1 file changed, 4 insertions, 4 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 15,
6 + "generation": 17,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -279,7 +279,7 @@
279 279 "kind": "Panel",
280 280 "spec": {
281 281 "id": 10,
282 - "title": "SMB: подключённых клиентов",
282 + "title": "Samba: подключённых клиентов",
283 283 "description": "История числа подключённых SMB-клиентов (samba_clients.count).",
284 284 "links": [],
285 285 "data": {
@@ -599,7 +599,7 @@
599 599 "percentChangeColorMode": "standard",
600 600 "reduceOptions": {
601 601 "calcs": [
602 - "lastNotNull"
602 + "sum"
603 603 ],
604 604 "fields": "",
605 605 "values": false
@@ -1736,7 +1736,7 @@
1736 1736 "kind": "Panel",
1737 1737 "spec": {
1738 1738 "id": 9,
1739 - "title": "SMB: клиентов сейчас",
1739 + "title": "Samba: клиентов сейчас",
1740 1740 "description": "Текущее число подключённых SMB-клиентов (последний опрос smbstatus -v, первый блок).",
1741 1741 "links": [],
1742 1742 "data": {

guest revised this gist 1 month ago. Go to revision

1 file changed, 4 insertions, 152 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 14,
6 + "generation": 15,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -433,154 +433,6 @@
433 433 "kind": "QueryGroup",
434 434 "spec": {
435 435 "queries": [
436 - {
437 - "kind": "PanelQuery",
438 - "spec": {
439 - "query": {
440 - "kind": "DataQuery",
441 - "group": "influxdb",
442 - "version": "v0",
443 - "spec": {
444 - "alias": "machine_login_1s",
445 - "groupBy": [
446 - {
447 - "params": [
448 - "1s"
449 - ],
450 - "type": "time"
451 - },
452 - {
453 - "params": [
454 - "domain::tag"
455 - ],
456 - "type": "tag"
457 - },
458 - {
459 - "params": [
460 - "null"
461 - ],
462 - "type": "fill"
463 - }
464 - ],
465 - "measurement": "samba_auth",
466 - "orderByTime": "ASC",
467 - "policy": "default",
468 - "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
469 - "rawQuery": false,
470 - "resultFormat": "time_series",
471 - "select": [
472 - [
473 - {
474 - "params": [
475 - "client_account"
476 - ],
477 - "type": "field"
478 - },
479 - {
480 - "params": [],
481 - "type": "count"
482 - }
483 - ]
484 - ],
485 - "tags": [
486 - {
487 - "key": "status::tag",
488 - "operator": "=",
489 - "value": "NT_STATUS_OK"
490 - },
491 - {
492 - "condition": "AND",
493 - "key": "account::tag",
494 - "operator": "=~",
495 - "value": "/^MACHINE/"
496 - }
497 - ]
498 - },
499 - "labels": {
500 - "grafana.app/export-label": "influxdb-1"
501 - }
502 - },
503 - "refId": "A",
504 - "hidden": false
505 - }
506 - },
507 - {
508 - "kind": "PanelQuery",
509 - "spec": {
510 - "query": {
511 - "kind": "DataQuery",
512 - "group": "influxdb",
513 - "version": "v0",
514 - "spec": {
515 - "alias": "user_login_1s",
516 - "groupBy": [
517 - {
518 - "params": [
519 - "1s"
520 - ],
521 - "type": "time"
522 - },
523 - {
524 - "params": [
525 - "domain::tag"
526 - ],
527 - "type": "tag"
528 - },
529 - {
530 - "params": [
531 - "null"
532 - ],
533 - "type": "fill"
534 - }
535 - ],
536 - "measurement": "samba_auth",
537 - "orderByTime": "ASC",
538 - "policy": "default",
539 - "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^user/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
540 - "rawQuery": false,
541 - "resultFormat": "time_series",
542 - "select": [
543 - [
544 - {
545 - "params": [
546 - "client_account"
547 - ],
548 - "type": "field"
549 - },
550 - {
551 - "params": [],
552 - "type": "count"
553 - }
554 - ]
555 - ],
556 - "tags": [
557 - {
558 - "key": "status::tag",
559 - "operator": "=",
560 - "value": "NT_STATUS_OK"
561 - },
562 - {
563 - "condition": "AND",
564 - "key": "account::tag",
565 - "operator": "=~",
566 - "value": "/^user/"
567 - },
568 - {
569 - "condition": "OR",
570 - "key": "account::tag",
571 - "operator": "=~",
572 - "value": "/^loadtest/"
573 - }
574 - ]
575 - },
576 - "labels": {
577 - "grafana.app/export-label": "influxdb-1"
578 - }
579 - },
580 - "refId": "B",
581 - "hidden": false
582 - }
583 - },
584 436 {
585 437 "kind": "PanelQuery",
586 438 "spec": {
@@ -648,7 +500,7 @@
648 500 "grafana.app/export-label": "influxdb-1"
649 501 }
650 502 },
651 - "refId": "C",
503 + "refId": "A",
652 504 "hidden": false
653 505 }
654 506 },
@@ -725,7 +577,7 @@
725 577 "grafana.app/export-label": "influxdb-1"
726 578 }
727 579 },
728 - "refId": "D",
580 + "refId": "B",
729 581 "hidden": false
730 582 }
731 583 }
@@ -743,7 +595,7 @@
743 595 "colorMode": "value",
744 596 "graphMode": "area",
745 597 "justifyMode": "auto",
746 - "orientation": "vertical",
598 + "orientation": "auto",
747 599 "percentChangeColorMode": "standard",
748 600 "reduceOptions": {
749 601 "calcs": [

guest revised this gist 1 month ago. Go to revision

1 file changed, 14 insertions, 14 deletions

grafana.json

@@ -3,7 +3,7 @@
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 5 "name": "ad-samba-audit2",
6 - "generation": 12,
6 + "generation": 14,
7 7 "creationTimestamp": "2026-07-03T12:41:09Z",
8 8 "labels": {},
9 9 "annotations": {}
@@ -740,8 +740,8 @@
740 740 "version": "13.0.1+security-01",
741 741 "spec": {
742 742 "options": {
743 - "colorMode": "background",
744 - "graphMode": "none",
743 + "colorMode": "value",
744 + "graphMode": "area",
745 745 "justifyMode": "auto",
746 746 "orientation": "vertical",
747 747 "percentChangeColorMode": "standard",
@@ -2008,7 +2008,7 @@
2008 2008 "x": 0,
2009 2009 "y": 0,
2010 2010 "width": 11,
2011 - "height": 9,
2011 + "height": 10,
2012 2012 "element": {
2013 2013 "kind": "ElementReference",
2014 2014 "name": "panel-11"
@@ -2021,7 +2021,7 @@
2021 2021 "x": 11,
2022 2022 "y": 0,
2023 2023 "width": 13,
2024 - "height": 9,
2024 + "height": 10,
2025 2025 "element": {
2026 2026 "kind": "ElementReference",
2027 2027 "name": "panel-1"
@@ -2032,7 +2032,7 @@
2032 2032 "kind": "GridLayoutItem",
2033 2033 "spec": {
2034 2034 "x": 0,
2035 - "y": 9,
2035 + "y": 10,
2036 2036 "width": 12,
2037 2037 "height": 7,
2038 2038 "element": {
@@ -2045,7 +2045,7 @@
2045 2045 "kind": "GridLayoutItem",
2046 2046 "spec": {
2047 2047 "x": 12,
2048 - "y": 9,
2048 + "y": 10,
2049 2049 "width": 12,
2050 2050 "height": 7,
2051 2051 "element": {
@@ -2058,7 +2058,7 @@
2058 2058 "kind": "GridLayoutItem",
2059 2059 "spec": {
2060 2060 "x": 0,
2061 - "y": 16,
2061 + "y": 17,
2062 2062 "width": 12,
2063 2063 "height": 8,
2064 2064 "element": {
@@ -2071,7 +2071,7 @@
2071 2071 "kind": "GridLayoutItem",
2072 2072 "spec": {
2073 2073 "x": 12,
2074 - "y": 16,
2074 + "y": 17,
2075 2075 "width": 12,
2076 2076 "height": 8,
2077 2077 "element": {
@@ -2084,7 +2084,7 @@
2084 2084 "kind": "GridLayoutItem",
2085 2085 "spec": {
2086 2086 "x": 0,
2087 - "y": 24,
2087 + "y": 25,
2088 2088 "width": 12,
2089 2089 "height": 8,
2090 2090 "element": {
@@ -2097,7 +2097,7 @@
2097 2097 "kind": "GridLayoutItem",
2098 2098 "spec": {
2099 2099 "x": 12,
2100 - "y": 24,
2100 + "y": 25,
2101 2101 "width": 12,
2102 2102 "height": 8,
2103 2103 "element": {
@@ -2110,7 +2110,7 @@
2110 2110 "kind": "GridLayoutItem",
2111 2111 "spec": {
2112 2112 "x": 0,
2113 - "y": 32,
2113 + "y": 33,
2114 2114 "width": 12,
2115 2115 "height": 8,
2116 2116 "element": {
@@ -2123,7 +2123,7 @@
2123 2123 "kind": "GridLayoutItem",
2124 2124 "spec": {
2125 2125 "x": 0,
2126 - "y": 40,
2126 + "y": 41,
2127 2127 "width": 6,
2128 2128 "height": 8,
2129 2129 "element": {
@@ -2136,7 +2136,7 @@
2136 2136 "kind": "GridLayoutItem",
2137 2137 "spec": {
2138 2138 "x": 6,
2139 - "y": 40,
2139 + "y": 41,
2140 2140 "width": 18,
2141 2141 "height": 8,
2142 2142 "element": {

guest revised this gist 1 month ago. Go to revision

1 file changed, 633 insertions, 272 deletions

grafana.json

@@ -2,22 +2,11 @@
2 2 "apiVersion": "dashboard.grafana.app/v2",
3 3 "kind": "Dashboard",
4 4 "metadata": {
5 - "name": "ad-samba-audit",
6 - "namespace": "default",
7 - "uid": "092a783d-214c-46fa-b429-7cb5b93a3f65",
8 - "resourceVersion": "1782469594734004",
5 + "name": "ad-samba-audit2",
9 6 "generation": 12,
10 - "creationTimestamp": "2026-06-09T12:20:41Z",
11 - "labels": {
12 - "grafana.app/deprecatedInternalID": "1673156113694720"
13 - },
14 - "annotations": {
15 - "grafana.app/createdBy": "user:efm4lmr01b20wa",
16 - "grafana.app/folder": "",
17 - "grafana.app/saved-from-ui": "Grafana v13.0.1+security-01 (9bbe672d)",
18 - "grafana.app/updatedBy": "user:efm4lmr01b20wa",
19 - "grafana.app/updatedTimestamp": "2026-06-26T10:26:34Z"
20 - }
7 + "creationTimestamp": "2026-07-03T12:41:09Z",
8 + "labels": {},
9 + "annotations": {}
21 10 },
22 11 "spec": {
23 12 "annotations": [
@@ -59,9 +48,6 @@
59 48 "kind": "DataQuery",
60 49 "group": "influxdb",
61 50 "version": "v0",
62 - "datasource": {
63 - "name": "afoiuzkkxju2of"
64 - },
65 51 "spec": {
66 52 "alias": "machine_login",
67 53 "groupBy": [
@@ -117,6 +103,9 @@
117 103 "value": "/^MACHINE/"
118 104 }
119 105 ]
106 + },
107 + "labels": {
108 + "grafana.app/export-label": "influxdb-1"
120 109 }
121 110 },
122 111 "refId": "A",
@@ -130,9 +119,6 @@
130 119 "kind": "DataQuery",
131 120 "group": "influxdb",
132 121 "version": "v0",
133 - "datasource": {
134 - "name": "afoiuzkkxju2of"
135 - },
136 122 "spec": {
137 123 "alias": "user_login",
138 124 "groupBy": [
@@ -194,6 +180,9 @@
194 180 "value": "/^loadtest/"
195 181 }
196 182 ]
183 + },
184 + "labels": {
185 + "grafana.app/export-label": "influxdb-1"
197 186 }
198 187 },
199 188 "refId": "B",
@@ -221,11 +210,551 @@
221 210 "placement": "bottom",
222 211 "showLegend": true
223 212 },
224 - "tooltip": {
225 - "hideZeros": false,
226 - "mode": "single",
227 - "sort": "none"
228 - }
213 + "tooltip": {
214 + "hideZeros": false,
215 + "mode": "single",
216 + "sort": "none"
217 + }
218 + },
219 + "fieldConfig": {
220 + "defaults": {
221 + "thresholds": {
222 + "mode": "absolute",
223 + "steps": [
224 + {
225 + "value": 0,
226 + "color": "green"
227 + },
228 + {
229 + "value": 80,
230 + "color": "red"
231 + }
232 + ]
233 + },
234 + "color": {
235 + "mode": "palette-classic"
236 + },
237 + "custom": {
238 + "axisBorderShow": false,
239 + "axisCenteredZero": false,
240 + "axisColorMode": "text",
241 + "axisLabel": "",
242 + "axisPlacement": "auto",
243 + "barAlignment": 0,
244 + "barWidthFactor": 0.6,
245 + "drawStyle": "line",
246 + "fillOpacity": 10,
247 + "gradientMode": "none",
248 + "hideFrom": {
249 + "legend": false,
250 + "tooltip": false,
251 + "viz": false
252 + },
253 + "insertNulls": false,
254 + "lineInterpolation": "smooth",
255 + "lineWidth": 1,
256 + "pointSize": 5,
257 + "scaleDistribution": {
258 + "type": "linear"
259 + },
260 + "showPoints": "auto",
261 + "showValues": false,
262 + "spanNulls": false,
263 + "stacking": {
264 + "group": "A",
265 + "mode": "none"
266 + },
267 + "thresholdsStyle": {
268 + "mode": "off"
269 + }
270 + }
271 + },
272 + "overrides": []
273 + }
274 + }
275 + }
276 + }
277 + },
278 + "panel-10": {
279 + "kind": "Panel",
280 + "spec": {
281 + "id": 10,
282 + "title": "SMB: подключённых клиентов",
283 + "description": "История числа подключённых SMB-клиентов (samba_clients.count).",
284 + "links": [],
285 + "data": {
286 + "kind": "QueryGroup",
287 + "spec": {
288 + "queries": [
289 + {
290 + "kind": "PanelQuery",
291 + "spec": {
292 + "query": {
293 + "kind": "DataQuery",
294 + "group": "influxdb",
295 + "version": "v0",
296 + "spec": {
297 + "alias": "clients",
298 + "groupBy": [
299 + {
300 + "params": [
301 + "$__interval"
302 + ],
303 + "type": "time"
304 + },
305 + {
306 + "params": [
307 + "null"
308 + ],
309 + "type": "fill"
310 + }
311 + ],
312 + "measurement": "samba_clients",
313 + "orderByTime": "ASC",
314 + "policy": "default",
315 + "query": "SELECT last(\"count\") FROM \"samba_clients\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
316 + "rawQuery": false,
317 + "resultFormat": "time_series",
318 + "select": [
319 + [
320 + {
321 + "params": [
322 + "count"
323 + ],
324 + "type": "field"
325 + },
326 + {
327 + "params": [],
328 + "type": "last"
329 + }
330 + ]
331 + ],
332 + "tags": []
333 + },
334 + "labels": {
335 + "grafana.app/export-label": "influxdb-1"
336 + }
337 + },
338 + "refId": "A",
339 + "hidden": false
340 + }
341 + }
342 + ],
343 + "transformations": [],
344 + "queryOptions": {}
345 + }
346 + },
347 + "vizConfig": {
348 + "kind": "VizConfig",
349 + "group": "timeseries",
350 + "version": "13.0.1+security-01",
351 + "spec": {
352 + "options": {
353 + "annotations": {
354 + "clustering": -1,
355 + "multiLane": false
356 + },
357 + "legend": {
358 + "calcs": [],
359 + "displayMode": "list",
360 + "placement": "bottom",
361 + "showLegend": true
362 + },
363 + "tooltip": {
364 + "hideZeros": false,
365 + "mode": "single",
366 + "sort": "none"
367 + }
368 + },
369 + "fieldConfig": {
370 + "defaults": {
371 + "unit": "none",
372 + "thresholds": {
373 + "mode": "absolute",
374 + "steps": [
375 + {
376 + "value": 0,
377 + "color": "green"
378 + }
379 + ]
380 + },
381 + "color": {
382 + "mode": "palette-classic"
383 + },
384 + "custom": {
385 + "axisBorderShow": false,
386 + "axisCenteredZero": false,
387 + "axisColorMode": "text",
388 + "axisLabel": "",
389 + "axisPlacement": "auto",
390 + "barAlignment": 0,
391 + "barWidthFactor": 0.6,
392 + "drawStyle": "line",
393 + "fillOpacity": 15,
394 + "gradientMode": "none",
395 + "hideFrom": {
396 + "legend": false,
397 + "tooltip": false,
398 + "viz": false
399 + },
400 + "insertNulls": false,
401 + "lineInterpolation": "stepAfter",
402 + "lineWidth": 2,
403 + "pointSize": 5,
404 + "scaleDistribution": {
405 + "type": "linear"
406 + },
407 + "showPoints": "auto",
408 + "showValues": false,
409 + "spanNulls": false,
410 + "stacking": {
411 + "group": "A",
412 + "mode": "none"
413 + },
414 + "thresholdsStyle": {
415 + "mode": "off"
416 + }
417 + }
418 + },
419 + "overrides": []
420 + }
421 + }
422 + }
423 + }
424 + },
425 + "panel-11": {
426 + "kind": "Panel",
427 + "spec": {
428 + "id": 11,
429 + "title": "Authentifications",
430 + "description": "Успешные входы в домен (samba_auth): машинные и пользовательские, разбивка по домену.",
431 + "links": [],
432 + "data": {
433 + "kind": "QueryGroup",
434 + "spec": {
435 + "queries": [
436 + {
437 + "kind": "PanelQuery",
438 + "spec": {
439 + "query": {
440 + "kind": "DataQuery",
441 + "group": "influxdb",
442 + "version": "v0",
443 + "spec": {
444 + "alias": "machine_login_1s",
445 + "groupBy": [
446 + {
447 + "params": [
448 + "1s"
449 + ],
450 + "type": "time"
451 + },
452 + {
453 + "params": [
454 + "domain::tag"
455 + ],
456 + "type": "tag"
457 + },
458 + {
459 + "params": [
460 + "null"
461 + ],
462 + "type": "fill"
463 + }
464 + ],
465 + "measurement": "samba_auth",
466 + "orderByTime": "ASC",
467 + "policy": "default",
468 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
469 + "rawQuery": false,
470 + "resultFormat": "time_series",
471 + "select": [
472 + [
473 + {
474 + "params": [
475 + "client_account"
476 + ],
477 + "type": "field"
478 + },
479 + {
480 + "params": [],
481 + "type": "count"
482 + }
483 + ]
484 + ],
485 + "tags": [
486 + {
487 + "key": "status::tag",
488 + "operator": "=",
489 + "value": "NT_STATUS_OK"
490 + },
491 + {
492 + "condition": "AND",
493 + "key": "account::tag",
494 + "operator": "=~",
495 + "value": "/^MACHINE/"
496 + }
497 + ]
498 + },
499 + "labels": {
500 + "grafana.app/export-label": "influxdb-1"
501 + }
502 + },
503 + "refId": "A",
504 + "hidden": false
505 + }
506 + },
507 + {
508 + "kind": "PanelQuery",
509 + "spec": {
510 + "query": {
511 + "kind": "DataQuery",
512 + "group": "influxdb",
513 + "version": "v0",
514 + "spec": {
515 + "alias": "user_login_1s",
516 + "groupBy": [
517 + {
518 + "params": [
519 + "1s"
520 + ],
521 + "type": "time"
522 + },
523 + {
524 + "params": [
525 + "domain::tag"
526 + ],
527 + "type": "tag"
528 + },
529 + {
530 + "params": [
531 + "null"
532 + ],
533 + "type": "fill"
534 + }
535 + ],
536 + "measurement": "samba_auth",
537 + "orderByTime": "ASC",
538 + "policy": "default",
539 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^user/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
540 + "rawQuery": false,
541 + "resultFormat": "time_series",
542 + "select": [
543 + [
544 + {
545 + "params": [
546 + "client_account"
547 + ],
548 + "type": "field"
549 + },
550 + {
551 + "params": [],
552 + "type": "count"
553 + }
554 + ]
555 + ],
556 + "tags": [
557 + {
558 + "key": "status::tag",
559 + "operator": "=",
560 + "value": "NT_STATUS_OK"
561 + },
562 + {
563 + "condition": "AND",
564 + "key": "account::tag",
565 + "operator": "=~",
566 + "value": "/^user/"
567 + },
568 + {
569 + "condition": "OR",
570 + "key": "account::tag",
571 + "operator": "=~",
572 + "value": "/^loadtest/"
573 + }
574 + ]
575 + },
576 + "labels": {
577 + "grafana.app/export-label": "influxdb-1"
578 + }
579 + },
580 + "refId": "B",
581 + "hidden": false
582 + }
583 + },
584 + {
585 + "kind": "PanelQuery",
586 + "spec": {
587 + "query": {
588 + "kind": "DataQuery",
589 + "group": "influxdb",
590 + "version": "v0",
591 + "spec": {
592 + "alias": "machine_login_5m",
593 + "groupBy": [
594 + {
595 + "params": [
596 + "5m"
597 + ],
598 + "type": "time"
599 + },
600 + {
601 + "params": [
602 + "domain::tag"
603 + ],
604 + "type": "tag"
605 + },
606 + {
607 + "params": [
608 + "null"
609 + ],
610 + "type": "fill"
611 + }
612 + ],
613 + "measurement": "samba_auth",
614 + "orderByTime": "ASC",
615 + "policy": "default",
616 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^MACHINE/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
617 + "rawQuery": false,
618 + "resultFormat": "time_series",
619 + "select": [
620 + [
621 + {
622 + "params": [
623 + "client_account"
624 + ],
625 + "type": "field"
626 + },
627 + {
628 + "params": [],
629 + "type": "count"
630 + }
631 + ]
632 + ],
633 + "tags": [
634 + {
635 + "key": "status::tag",
636 + "operator": "=",
637 + "value": "NT_STATUS_OK"
638 + },
639 + {
640 + "condition": "AND",
641 + "key": "account::tag",
642 + "operator": "=~",
643 + "value": "/^MACHINE/"
644 + }
645 + ]
646 + },
647 + "labels": {
648 + "grafana.app/export-label": "influxdb-1"
649 + }
650 + },
651 + "refId": "C",
652 + "hidden": false
653 + }
654 + },
655 + {
656 + "kind": "PanelQuery",
657 + "spec": {
658 + "query": {
659 + "kind": "DataQuery",
660 + "group": "influxdb",
661 + "version": "v0",
662 + "spec": {
663 + "alias": "user_login_5m",
664 + "groupBy": [
665 + {
666 + "params": [
667 + "5m"
668 + ],
669 + "type": "time"
670 + },
671 + {
672 + "params": [
673 + "domain::tag"
674 + ],
675 + "type": "tag"
676 + },
677 + {
678 + "params": [
679 + "null"
680 + ],
681 + "type": "fill"
682 + }
683 + ],
684 + "measurement": "samba_auth",
685 + "orderByTime": "ASC",
686 + "policy": "default",
687 + "query": "SELECT count(\"client_account\") FROM \"samba_auth\" WHERE (\"status\"::tag = 'NT_STATUS_OK' AND \"account\"::tag =~ /^user/) AND $timeFilter GROUP BY time($interval), \"domain\"::tag fill(null)",
688 + "rawQuery": false,
689 + "resultFormat": "time_series",
690 + "select": [
691 + [
692 + {
693 + "params": [
694 + "client_account"
695 + ],
696 + "type": "field"
697 + },
698 + {
699 + "params": [],
700 + "type": "count"
701 + }
702 + ]
703 + ],
704 + "tags": [
705 + {
706 + "key": "status::tag",
707 + "operator": "=",
708 + "value": "NT_STATUS_OK"
709 + },
710 + {
711 + "condition": "AND",
712 + "key": "account::tag",
713 + "operator": "=~",
714 + "value": "/^user/"
715 + },
716 + {
717 + "condition": "OR",
718 + "key": "account::tag",
719 + "operator": "=~",
720 + "value": "/^loadtest/"
721 + }
722 + ]
723 + },
724 + "labels": {
725 + "grafana.app/export-label": "influxdb-1"
726 + }
727 + },
728 + "refId": "D",
729 + "hidden": false
730 + }
731 + }
732 + ],
733 + "transformations": [],
734 + "queryOptions": {}
735 + }
736 + },
737 + "vizConfig": {
738 + "kind": "VizConfig",
739 + "group": "stat",
740 + "version": "13.0.1+security-01",
741 + "spec": {
742 + "options": {
743 + "colorMode": "background",
744 + "graphMode": "none",
745 + "justifyMode": "auto",
746 + "orientation": "vertical",
747 + "percentChangeColorMode": "standard",
748 + "reduceOptions": {
749 + "calcs": [
750 + "lastNotNull"
751 + ],
752 + "fields": "",
753 + "values": false
754 + },
755 + "showPercentChange": false,
756 + "textMode": "auto",
757 + "wideLayout": true
229 758 },
230 759 "fieldConfig": {
231 760 "defaults": {
@@ -244,40 +773,6 @@
244 773 },
245 774 "color": {
246 775 "mode": "palette-classic"
247 - },
248 - "custom": {
249 - "axisBorderShow": false,
250 - "axisCenteredZero": false,
251 - "axisColorMode": "text",
252 - "axisLabel": "",
253 - "axisPlacement": "auto",
254 - "barAlignment": 0,
255 - "barWidthFactor": 0.6,
256 - "drawStyle": "line",
257 - "fillOpacity": 10,
258 - "gradientMode": "none",
259 - "hideFrom": {
260 - "legend": false,
261 - "tooltip": false,
262 - "viz": false
263 - },
264 - "insertNulls": false,
265 - "lineInterpolation": "smooth",
266 - "lineWidth": 1,
267 - "pointSize": 5,
268 - "scaleDistribution": {
269 - "type": "linear"
270 - },
271 - "showPoints": "auto",
272 - "showValues": false,
273 - "spanNulls": false,
274 - "stacking": {
275 - "group": "A",
276 - "mode": "none"
277 - },
278 - "thresholdsStyle": {
279 - "mode": "off"
280 - }
281 776 }
282 777 },
283 778 "overrides": []
@@ -304,9 +799,6 @@
304 799 "kind": "DataQuery",
305 800 "group": "influxdb",
306 801 "version": "v0",
307 - "datasource": {
308 - "name": "afoiuzkkxju2of"
309 - },
310 802 "spec": {
311 803 "groupBy": [],
312 804 "measurement": "samba_dsdb",
@@ -317,6 +809,9 @@
317 809 "resultFormat": "time_series",
318 810 "select": [],
319 811 "tags": []
812 + },
813 + "labels": {
814 + "grafana.app/export-label": "influxdb-1"
320 815 }
321 816 },
322 817 "refId": "A",
@@ -427,9 +922,6 @@
427 922 "kind": "DataQuery",
428 923 "group": "influxdb",
429 924 "version": "v0",
430 - "datasource": {
431 - "name": "afoiuzkkxju2of"
432 - },
433 925 "spec": {
434 926 "groupBy": [],
435 927 "measurement": "samba_dsdb",
@@ -440,6 +932,9 @@
440 932 "resultFormat": "time_series",
441 933 "select": [],
442 934 "tags": []
935 + },
936 + "labels": {
937 + "grafana.app/export-label": "influxdb-1"
443 938 }
444 939 },
445 940 "refId": "A",
@@ -550,9 +1045,6 @@
550 1045 "kind": "DataQuery",
551 1046 "group": "influxdb",
552 1047 "version": "v0",
553 - "datasource": {
554 - "name": "afoiuzkkxju2of"
555 - },
556 1048 "spec": {
557 1049 "groupBy": [],
558 1050 "measurement": "samba_dsdb",
@@ -563,6 +1055,9 @@
563 1055 "resultFormat": "time_series",
564 1056 "select": [],
565 1057 "tags": []
1058 + },
1059 + "labels": {
1060 + "grafana.app/export-label": "influxdb-1"
566 1061 }
567 1062 },
568 1063 "refId": "A",
@@ -675,9 +1170,6 @@
675 1170 "kind": "DataQuery",
676 1171 "group": "influxdb",
677 1172 "version": "v0",
678 - "datasource": {
679 - "name": "afoiuzkkxju2of"
680 - },
681 1173 "spec": {
682 1174 "groupBy": [],
683 1175 "measurement": "samba_dsdb_tx",
@@ -688,6 +1180,9 @@
688 1180 "resultFormat": "time_series",
689 1181 "select": [],
690 1182 "tags": []
1183 + },
1184 + "labels": {
1185 + "grafana.app/export-label": "influxdb-1"
691 1186 }
692 1187 },
693 1188 "refId": "A",
@@ -802,9 +1297,6 @@
802 1297 "kind": "DataQuery",
803 1298 "group": "influxdb",
804 1299 "version": "v0",
805 - "datasource": {
806 - "name": "afoiuzkkxju2of"
807 - },
808 1300 "spec": {
809 1301 "groupBy": [],
810 1302 "measurement": "samba_dsdb_tx",
@@ -815,6 +1307,9 @@
815 1307 "resultFormat": "time_series",
816 1308 "select": [],
817 1309 "tags": []
1310 + },
1311 + "labels": {
1312 + "grafana.app/export-label": "influxdb-1"
818 1313 }
819 1314 },
820 1315 "refId": "A",
@@ -925,9 +1420,6 @@
925 1420 "kind": "DataQuery",
926 1421 "group": "influxdb",
927 1422 "version": "v0",
928 - "datasource": {
929 - "name": "afoiuzkkxju2of"
930 - },
931 1423 "spec": {
932 1424 "alias": "user_smb",
933 1425 "groupBy": [
@@ -989,6 +1481,9 @@
989 1481 "value": "/^user-/"
990 1482 }
991 1483 ]
1484 + },
1485 + "labels": {
1486 + "grafana.app/export-label": "influxdb-1"
992 1487 }
993 1488 },
994 1489 "refId": "A",
@@ -1002,9 +1497,6 @@
1002 1497 "kind": "DataQuery",
1003 1498 "group": "influxdb",
1004 1499 "version": "v0",
1005 - "datasource": {
1006 - "name": "afoiuzkkxju2of"
1007 - },
1008 1500 "spec": {
1009 1501 "alias": "machine_smb",
1010 1502 "groupBy": [
@@ -1066,6 +1558,9 @@
1066 1558 "value": "/^MACHINE/"
1067 1559 }
1068 1560 ]
1561 + },
1562 + "labels": {
1563 + "grafana.app/export-label": "influxdb-1"
1069 1564 }
1070 1565 },
1071 1566 "refId": "B",
@@ -1176,9 +1671,6 @@
1176 1671 "kind": "DataQuery",
1177 1672 "group": "influxdb",
1178 1673 "version": "v0",
1179 - "datasource": {
1180 - "name": "afoiuzkkxju2of"
1181 - },
1182 1674 "spec": {
1183 1675 "alias": "rcode=0",
1184 1676 "groupBy": [
@@ -1228,6 +1720,9 @@
1228 1720 "value": "out_packet"
1229 1721 }
1230 1722 ]
1723 + },
1724 + "labels": {
1725 + "grafana.app/export-label": "influxdb-1"
1231 1726 }
1232 1727 },
1233 1728 "refId": "A",
@@ -1241,9 +1736,6 @@
1241 1736 "kind": "DataQuery",
1242 1737 "group": "influxdb",
1243 1738 "version": "v0",
1244 - "datasource": {
1245 - "name": "afoiuzkkxju2of"
1246 - },
1247 1739 "spec": {
1248 1740 "alias": "rcode=3",
1249 1741 "groupBy": [
@@ -1293,6 +1785,9 @@
1293 1785 "value": "out_packet"
1294 1786 }
1295 1787 ]
1788 + },
1789 + "labels": {
1790 + "grafana.app/export-label": "influxdb-1"
1296 1791 }
1297 1792 },
1298 1793 "refId": "B",
@@ -1403,17 +1898,28 @@
1403 1898 "kind": "DataQuery",
1404 1899 "group": "influxdb",
1405 1900 "version": "v0",
1406 - "datasource": {
1407 - "name": "afoiuzkkxju2of"
1408 - },
1409 1901 "spec": {
1410 1902 "alias": "clients",
1903 + "groupBy": [
1904 + {
1905 + "params": [
1906 + "$interval"
1907 + ],
1908 + "type": "time"
1909 + },
1910 + {
1911 + "params": [
1912 + "null"
1913 + ],
1914 + "type": "fill"
1915 + }
1916 + ],
1411 1917 "measurement": "samba_clients",
1412 - "policy": "default",
1413 1918 "orderByTime": "ASC",
1414 - "resultFormat": "time_series",
1919 + "policy": "default",
1415 1920 "query": "SELECT last(\"count\") FROM \"samba_clients\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
1416 - "rawQuery": true,
1921 + "rawQuery": false,
1922 + "resultFormat": "time_series",
1417 1923 "select": [
1418 1924 [
1419 1925 {
@@ -1428,21 +1934,10 @@
1428 1934 }
1429 1935 ]
1430 1936 ],
1431 - "groupBy": [
1432 - {
1433 - "params": [
1434 - "$interval"
1435 - ],
1436 - "type": "time"
1437 - },
1438 - {
1439 - "params": [
1440 - "null"
1441 - ],
1442 - "type": "fill"
1443 - }
1444 - ],
1445 1937 "tags": []
1938 + },
1939 + "labels": {
1940 + "grafana.app/export-label": "influxdb-1"
1446 1941 }
1447 1942 },
1448 1943 "refId": "A",
@@ -1464,6 +1959,7 @@
1464 1959 "graphMode": "area",
1465 1960 "justifyMode": "auto",
1466 1961 "orientation": "auto",
1962 + "percentChangeColorMode": "standard",
1467 1963 "reduceOptions": {
1468 1964 "calcs": [
1469 1965 "lastNotNull"
@@ -1473,15 +1969,11 @@
1473 1969 },
1474 1970 "showPercentChange": false,
1475 1971 "textMode": "auto",
1476 - "wideLayout": true,
1477 - "percentChangeColorMode": "standard"
1972 + "wideLayout": true
1478 1973 },
1479 1974 "fieldConfig": {
1480 1975 "defaults": {
1481 1976 "unit": "none",
1482 - "color": {
1483 - "mode": "thresholds"
1484 - },
1485 1977 "thresholds": {
1486 1978 "mode": "absolute",
1487 1979 "steps": [
@@ -1494,153 +1986,9 @@
1494 1986 "color": "red"
1495 1987 }
1496 1988 ]
1497 - }
1498 - },
1499 - "overrides": []
1500 - }
1501 - }
1502 - }
1503 - }
1504 - },
1505 - "panel-10": {
1506 - "kind": "Panel",
1507 - "spec": {
1508 - "id": 10,
1509 - "title": "SMB: подключённых клиентов",
1510 - "description": "История числа подключённых SMB-клиентов (samba_clients.count).",
1511 - "links": [],
1512 - "data": {
1513 - "kind": "QueryGroup",
1514 - "spec": {
1515 - "queries": [
1516 - {
1517 - "kind": "PanelQuery",
1518 - "spec": {
1519 - "query": {
1520 - "kind": "DataQuery",
1521 - "group": "influxdb",
1522 - "version": "v0",
1523 - "datasource": {
1524 - "name": "afoiuzkkxju2of"
1525 - },
1526 - "spec": {
1527 - "alias": "clients",
1528 - "measurement": "samba_clients",
1529 - "policy": "default",
1530 - "orderByTime": "ASC",
1531 - "resultFormat": "time_series",
1532 - "query": "SELECT last(\"count\") FROM \"samba_clients\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
1533 - "rawQuery": true,
1534 - "select": [
1535 - [
1536 - {
1537 - "params": [
1538 - "count"
1539 - ],
1540 - "type": "field"
1541 - },
1542 - {
1543 - "params": [],
1544 - "type": "last"
1545 - }
1546 - ]
1547 - ],
1548 - "groupBy": [
1549 - {
1550 - "params": [
1551 - "$interval"
1552 - ],
1553 - "type": "time"
1554 - },
1555 - {
1556 - "params": [
1557 - "null"
1558 - ],
1559 - "type": "fill"
1560 - }
1561 - ],
1562 - "tags": []
1563 - }
1564 - },
1565 - "refId": "A",
1566 - "hidden": false
1567 - }
1568 - }
1569 - ],
1570 - "transformations": [],
1571 - "queryOptions": {}
1572 - }
1573 - },
1574 - "vizConfig": {
1575 - "kind": "VizConfig",
1576 - "group": "timeseries",
1577 - "version": "13.0.1+security-01",
1578 - "spec": {
1579 - "options": {
1580 - "legend": {
1581 - "calcs": [],
1582 - "displayMode": "list",
1583 - "placement": "bottom",
1584 - "showLegend": true
1585 - },
1586 - "tooltip": {
1587 - "hideZeros": false,
1588 - "mode": "single",
1589 - "sort": "none"
1590 - }
1591 - },
1592 - "fieldConfig": {
1593 - "defaults": {
1594 - "unit": "none",
1989 + },
1595 1990 "color": {
1596 1991 "mode": "palette-classic"
1597 - },
1598 - "thresholds": {
1599 - "mode": "absolute",
1600 - "steps": [
1601 - {
1602 - "value": 0,
1603 - "color": "green"
1604 - },
1605 - {
1606 - "value": 80,
1607 - "color": "red"
1608 - }
1609 - ]
1610 - },
1611 - "custom": {
1612 - "axisBorderShow": false,
1613 - "axisCenteredZero": false,
1614 - "axisColorMode": "text",
1615 - "axisLabel": "",
1616 - "axisPlacement": "auto",
1617 - "barAlignment": 0,
1618 - "barWidthFactor": 0.6,
1619 - "drawStyle": "line",
1620 - "fillOpacity": 15,
1621 - "gradientMode": "none",
1622 - "hideFrom": {
1623 - "legend": false,
1624 - "tooltip": false,
1625 - "viz": false
1626 - },
1627 - "insertNulls": false,
1628 - "lineInterpolation": "stepAfter",
1629 - "lineWidth": 2,
1630 - "pointSize": 5,
1631 - "scaleDistribution": {
1632 - "type": "linear"
1633 - },
1634 - "showPoints": "auto",
1635 - "showValues": false,
1636 - "spanNulls": false,
1637 - "stacking": {
1638 - "group": "A",
1639 - "mode": "none"
1640 - },
1641 - "thresholdsStyle": {
1642 - "mode": "off"
1643 - }
1644 1992 }
1645 1993 },
1646 1994 "overrides": []
@@ -1659,8 +2007,21 @@
1659 2007 "spec": {
1660 2008 "x": 0,
1661 2009 "y": 0,
1662 - "width": 24,
1663 - "height": 8,
2010 + "width": 11,
2011 + "height": 9,
2012 + "element": {
2013 + "kind": "ElementReference",
2014 + "name": "panel-11"
2015 + }
2016 + }
2017 + },
2018 + {
2019 + "kind": "GridLayoutItem",
2020 + "spec": {
2021 + "x": 11,
2022 + "y": 0,
2023 + "width": 13,
2024 + "height": 9,
1664 2025 "element": {
1665 2026 "kind": "ElementReference",
1666 2027 "name": "panel-1"
@@ -1671,8 +2032,8 @@
1671 2032 "kind": "GridLayoutItem",
1672 2033 "spec": {
1673 2034 "x": 0,
1674 - "y": 8,
1675 - "width": 24,
2035 + "y": 9,
2036 + "width": 12,
1676 2037 "height": 7,
1677 2038 "element": {
1678 2039 "kind": "ElementReference",
@@ -1683,9 +2044,9 @@
1683 2044 {
1684 2045 "kind": "GridLayoutItem",
1685 2046 "spec": {
1686 - "x": 0,
1687 - "y": 15,
1688 - "width": 24,
2047 + "x": 12,
2048 + "y": 9,
2049 + "width": 12,
1689 2050 "height": 7,
1690 2051 "element": {
1691 2052 "kind": "ElementReference",
@@ -1697,7 +2058,7 @@
1697 2058 "kind": "GridLayoutItem",
1698 2059 "spec": {
1699 2060 "x": 0,
1700 - "y": 22,
2061 + "y": 16,
1701 2062 "width": 12,
1702 2063 "height": 8,
1703 2064 "element": {
@@ -1710,7 +2071,7 @@
1710 2071 "kind": "GridLayoutItem",
1711 2072 "spec": {
1712 2073 "x": 12,
1713 - "y": 22,
2074 + "y": 16,
1714 2075 "width": 12,
1715 2076 "height": 8,
1716 2077 "element": {
@@ -1723,7 +2084,7 @@
1723 2084 "kind": "GridLayoutItem",
1724 2085 "spec": {
1725 2086 "x": 0,
1726 - "y": 30,
2087 + "y": 24,
1727 2088 "width": 12,
1728 2089 "height": 8,
1729 2090 "element": {
@@ -1736,7 +2097,7 @@
1736 2097 "kind": "GridLayoutItem",
1737 2098 "spec": {
1738 2099 "x": 12,
1739 - "y": 30,
2100 + "y": 24,
1740 2101 "width": 12,
1741 2102 "height": 8,
1742 2103 "element": {
@@ -1749,7 +2110,7 @@
1749 2110 "kind": "GridLayoutItem",
1750 2111 "spec": {
1751 2112 "x": 0,
1752 - "y": 38,
2113 + "y": 32,
1753 2114 "width": 12,
1754 2115 "height": 8,
1755 2116 "element": {
@@ -1762,7 +2123,7 @@
1762 2123 "kind": "GridLayoutItem",
1763 2124 "spec": {
1764 2125 "x": 0,
1765 - "y": 46,
2126 + "y": 40,
1766 2127 "width": 6,
1767 2128 "height": 8,
1768 2129 "element": {
@@ -1775,7 +2136,7 @@
1775 2136 "kind": "GridLayoutItem",
1776 2137 "spec": {
1777 2138 "x": 6,
1778 - "y": 46,
2139 + "y": 40,
1779 2140 "width": 18,
1780 2141 "height": 8,
1781 2142 "element": {
@@ -1815,7 +2176,7 @@
1815 2176 "hideTimepicker": false,
1816 2177 "fiscalYearStartMonth": 0
1817 2178 },
1818 - "title": "Samba AD audit",
2179 + "title": "Samba AD audit2",
1819 2180 "variables": [
1820 2181 {
1821 2182 "kind": "IntervalVariable",

guest revised this gist 1 month ago. Go to revision

1 file changed, 290 insertions

grafana.json

@@ -1384,6 +1384,270 @@
1384 1384 }
1385 1385 }
1386 1386 }
1387 + },
1388 + "panel-9": {
1389 + "kind": "Panel",
1390 + "spec": {
1391 + "id": 9,
1392 + "title": "SMB: клиентов сейчас",
1393 + "description": "Текущее число подключённых SMB-клиентов (последний опрос smbstatus -v, первый блок).",
1394 + "links": [],
1395 + "data": {
1396 + "kind": "QueryGroup",
1397 + "spec": {
1398 + "queries": [
1399 + {
1400 + "kind": "PanelQuery",
1401 + "spec": {
1402 + "query": {
1403 + "kind": "DataQuery",
1404 + "group": "influxdb",
1405 + "version": "v0",
1406 + "datasource": {
1407 + "name": "afoiuzkkxju2of"
1408 + },
1409 + "spec": {
1410 + "alias": "clients",
1411 + "measurement": "samba_clients",
1412 + "policy": "default",
1413 + "orderByTime": "ASC",
1414 + "resultFormat": "time_series",
1415 + "query": "SELECT last(\"count\") FROM \"samba_clients\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
1416 + "rawQuery": true,
1417 + "select": [
1418 + [
1419 + {
1420 + "params": [
1421 + "count"
1422 + ],
1423 + "type": "field"
1424 + },
1425 + {
1426 + "params": [],
1427 + "type": "last"
1428 + }
1429 + ]
1430 + ],
1431 + "groupBy": [
1432 + {
1433 + "params": [
1434 + "$interval"
1435 + ],
1436 + "type": "time"
1437 + },
1438 + {
1439 + "params": [
1440 + "null"
1441 + ],
1442 + "type": "fill"
1443 + }
1444 + ],
1445 + "tags": []
1446 + }
1447 + },
1448 + "refId": "A",
1449 + "hidden": false
1450 + }
1451 + }
1452 + ],
1453 + "transformations": [],
1454 + "queryOptions": {}
1455 + }
1456 + },
1457 + "vizConfig": {
1458 + "kind": "VizConfig",
1459 + "group": "stat",
1460 + "version": "13.0.1+security-01",
1461 + "spec": {
1462 + "options": {
1463 + "colorMode": "value",
1464 + "graphMode": "area",
1465 + "justifyMode": "auto",
1466 + "orientation": "auto",
1467 + "reduceOptions": {
1468 + "calcs": [
1469 + "lastNotNull"
1470 + ],
1471 + "fields": "",
1472 + "values": false
1473 + },
1474 + "showPercentChange": false,
1475 + "textMode": "auto",
1476 + "wideLayout": true,
1477 + "percentChangeColorMode": "standard"
1478 + },
1479 + "fieldConfig": {
1480 + "defaults": {
1481 + "unit": "none",
1482 + "color": {
1483 + "mode": "thresholds"
1484 + },
1485 + "thresholds": {
1486 + "mode": "absolute",
1487 + "steps": [
1488 + {
1489 + "value": 0,
1490 + "color": "green"
1491 + },
1492 + {
1493 + "value": null,
1494 + "color": "red"
1495 + }
1496 + ]
1497 + }
1498 + },
1499 + "overrides": []
1500 + }
1501 + }
1502 + }
1503 + }
1504 + },
1505 + "panel-10": {
1506 + "kind": "Panel",
1507 + "spec": {
1508 + "id": 10,
1509 + "title": "SMB: подключённых клиентов",
1510 + "description": "История числа подключённых SMB-клиентов (samba_clients.count).",
1511 + "links": [],
1512 + "data": {
1513 + "kind": "QueryGroup",
1514 + "spec": {
1515 + "queries": [
1516 + {
1517 + "kind": "PanelQuery",
1518 + "spec": {
1519 + "query": {
1520 + "kind": "DataQuery",
1521 + "group": "influxdb",
1522 + "version": "v0",
1523 + "datasource": {
1524 + "name": "afoiuzkkxju2of"
1525 + },
1526 + "spec": {
1527 + "alias": "clients",
1528 + "measurement": "samba_clients",
1529 + "policy": "default",
1530 + "orderByTime": "ASC",
1531 + "resultFormat": "time_series",
1532 + "query": "SELECT last(\"count\") FROM \"samba_clients\" WHERE $timeFilter GROUP BY time($interval) fill(null)",
1533 + "rawQuery": true,
1534 + "select": [
1535 + [
1536 + {
1537 + "params": [
1538 + "count"
1539 + ],
1540 + "type": "field"
1541 + },
1542 + {
1543 + "params": [],
1544 + "type": "last"
1545 + }
1546 + ]
1547 + ],
1548 + "groupBy": [
1549 + {
1550 + "params": [
1551 + "$interval"
1552 + ],
1553 + "type": "time"
1554 + },
1555 + {
1556 + "params": [
1557 + "null"
1558 + ],
1559 + "type": "fill"
1560 + }
1561 + ],
1562 + "tags": []
1563 + }
1564 + },
1565 + "refId": "A",
1566 + "hidden": false
1567 + }
1568 + }
1569 + ],
1570 + "transformations": [],
1571 + "queryOptions": {}
1572 + }
1573 + },
1574 + "vizConfig": {
1575 + "kind": "VizConfig",
1576 + "group": "timeseries",
1577 + "version": "13.0.1+security-01",
1578 + "spec": {
1579 + "options": {
1580 + "legend": {
1581 + "calcs": [],
1582 + "displayMode": "list",
1583 + "placement": "bottom",
1584 + "showLegend": true
1585 + },
1586 + "tooltip": {
1587 + "hideZeros": false,
1588 + "mode": "single",
1589 + "sort": "none"
1590 + }
1591 + },
1592 + "fieldConfig": {
1593 + "defaults": {
1594 + "unit": "none",
1595 + "color": {
1596 + "mode": "palette-classic"
1597 + },
1598 + "thresholds": {
1599 + "mode": "absolute",
1600 + "steps": [
1601 + {
1602 + "value": 0,
1603 + "color": "green"
1604 + },
1605 + {
1606 + "value": 80,
1607 + "color": "red"
1608 + }
1609 + ]
1610 + },
1611 + "custom": {
1612 + "axisBorderShow": false,
1613 + "axisCenteredZero": false,
1614 + "axisColorMode": "text",
1615 + "axisLabel": "",
1616 + "axisPlacement": "auto",
1617 + "barAlignment": 0,
1618 + "barWidthFactor": 0.6,
1619 + "drawStyle": "line",
1620 + "fillOpacity": 15,
1621 + "gradientMode": "none",
1622 + "hideFrom": {
1623 + "legend": false,
1624 + "tooltip": false,
1625 + "viz": false
1626 + },
1627 + "insertNulls": false,
1628 + "lineInterpolation": "stepAfter",
1629 + "lineWidth": 2,
1630 + "pointSize": 5,
1631 + "scaleDistribution": {
1632 + "type": "linear"
1633 + },
1634 + "showPoints": "auto",
1635 + "showValues": false,
1636 + "spanNulls": false,
1637 + "stacking": {
1638 + "group": "A",
1639 + "mode": "none"
1640 + },
1641 + "thresholdsStyle": {
1642 + "mode": "off"
1643 + }
1644 + }
1645 + },
1646 + "overrides": []
1647 + }
1648 + }
1649 + }
1650 + }
1387 1651 }
1388 1652 },
1389 1653 "layout": {
@@ -1493,6 +1757,32 @@
1493 1757 "name": "panel-6"
1494 1758 }
1495 1759 }
1760 + },
1761 + {
1762 + "kind": "GridLayoutItem",
1763 + "spec": {
1764 + "x": 0,
1765 + "y": 46,
1766 + "width": 6,
1767 + "height": 8,
1768 + "element": {
1769 + "kind": "ElementReference",
1770 + "name": "panel-9"
1771 + }
1772 + }
1773 + },
1774 + {
1775 + "kind": "GridLayoutItem",
1776 + "spec": {
1777 + "x": 6,
1778 + "y": 46,
1779 + "width": 18,
1780 + "height": 8,
1781 + "element": {
1782 + "kind": "ElementReference",
1783 + "name": "panel-10"
1784 + }
1785 + }
1496 1786 }
1497 1787 ]
1498 1788 }