Commit 2be8d70
committed
feat(node): zfs monitor and grafana ui
## Installation
Add parameters:
- `zfs_exporter_enabled`: setup zfs_exporter on this node, false by default
- `zfs_exporter_version`: current `3.8.0`
- `zfs_exporter_port`: zfs exporter listen port, 9134 by default
- `zfs_exporter_options`: see "/roles/node_monitor/defaults/main.yml"
## Prometheus
Add [node_exporter] (forked from [pdf-node_exporter]) with more metrics:
- `node:zfs:pool_metrics`
- `node:zfs:dataset_metrics`
Add alert rules:
- `ZPoolDegraded`
- `ZPoolFaulted`
- `ZPoolOffline`
- `ZPoolUnavail`
- `ZPoolRemoved`
- `ZPoolSuspended`
- `ZPoolReadonly`
- `ZPoolSpaceFull`
- `ZDatasetSpaceFull`
Update alert rule:
- `NodeFsSpaceFull` with `fstype!="zfs"`
## Grafana
Add panels:
- [node-zfs.json]
- list ZFS Pools and Datasets
- unhealthy pool list fisrt
- ability search with `Node ID`, `Pool`, `Dataset`
- alert summary about zfs
Update panels:
- [node-overview.json](http://g.pigsty/d/node-overview/node-overview)
- add `ZFS Pools` Row
- unhealthy pool list fisrt
- [node-alert.json](http://g.pigsty/d/node-alert/node-alert)
- show zfs alerts
- cell link to [node-overview.json] page with pool name and/or dataset name filter
[node_exporter]: https://github.com/waitingsong/zfs_exporter
[pdf-node_exporter]: https://github.com/pdf/zfs_exporter
[node-overview.json]: http://g.pigsty/d/node-overview/node-overview1 parent eb6fd0e commit 2be8d70
File tree
7 files changed
+4423
-46
lines changed- files
- grafana/node
- prometheus/rules
- roles/node_monitor
- defaults
- files
- tasks
7 files changed
+4423
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
| 281 | + | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| 423 | + | |
423 | 424 | | |
424 | 425 | | |
425 | 426 | | |
| |||
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
830 | 873 | | |
831 | 874 | | |
832 | 875 | | |
| |||
855 | 898 | | |
856 | 899 | | |
857 | 900 | | |
858 | | - | |
| 901 | + | |
859 | 902 | | |
860 | 903 | | |
861 | 904 | | |
| |||
880 | 923 | | |
881 | 924 | | |
882 | 925 | | |
883 | | - | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
884 | 929 | | |
885 | 930 | | |
886 | 931 | | |
| |||
901 | 946 | | |
902 | 947 | | |
903 | 948 | | |
| 949 | + | |
904 | 950 | | |
905 | 951 | | |
906 | 952 | | |
| |||
911 | 957 | | |
912 | 958 | | |
913 | 959 | | |
914 | | - | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
915 | 965 | | |
916 | 966 | | |
917 | 967 | | |
| |||
2740 | 2790 | | |
2741 | 2791 | | |
2742 | 2792 | | |
2743 | | - | |
| 2793 | + | |
2744 | 2794 | | |
2745 | 2795 | | |
2746 | 2796 | | |
| |||
0 commit comments