|
| 1 | +rule_files: |
| 2 | + - rules.yaml |
| 3 | + |
| 4 | +evaluation_interval: 15s |
| 5 | + |
| 6 | +tests: |
| 7 | + - name: controller pod moves to another node |
| 8 | + interval: 30s |
| 9 | + input_series: |
| 10 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370", controller_node="node-a"}' |
| 11 | + values: '1x38 0 stale' |
| 12 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", controller_node="node-a", hostname="node-a", module="SATELLITE"}' |
| 13 | + values: '1x38 stale' |
| 14 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", controller_node="node-a", hostname="node-b", module="SATELLITE"}' |
| 15 | + values: '2x38 stale' |
| 16 | + - series: 'up{job="linstor-controller", instance="10.0.0.2:3370", controller_node="node-b"}' |
| 17 | + values: '_x41 1x79' |
| 18 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.2:3370", controller_node="node-b", hostname="node-a", module="SATELLITE"}' |
| 19 | + values: '_x41 1x58 2x20' |
| 20 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.2:3370", controller_node="node-b", hostname="node-b", module="SATELLITE"}' |
| 21 | + values: '_x41 2x79' |
| 22 | + alert_rule_test: |
| 23 | + - eval_time: 21m |
| 24 | + groupname: linstor.rules |
| 25 | + alertname: linstorSatelliteErrorRate |
| 26 | + - eval_time: 28m |
| 27 | + groupname: linstor.rules |
| 28 | + alertname: linstorSatelliteErrorRate |
| 29 | + - eval_time: 35m |
| 30 | + groupname: linstor.rules |
| 31 | + alertname: linstorSatelliteErrorRate |
| 32 | + - eval_time: 45m |
| 33 | + groupname: linstor.rules |
| 34 | + alertname: linstorSatelliteErrorRate |
| 35 | + - eval_time: 51m |
| 36 | + groupname: linstor.rules |
| 37 | + alertname: linstorSatelliteErrorRate |
| 38 | + exp_alerts: |
| 39 | + - exp_labels: |
| 40 | + hostname: node-a |
| 41 | + severity: warning |
| 42 | + exp_annotations: |
| 43 | + description: | |
| 44 | + LINSTOR Satellite "node-a" reports 1 errors in the last 15 minutes. |
| 45 | + Use "linstor error-reports list --nodes node-a" to inspect the reports. |
| 46 | +
|
| 47 | + - name: an external label of the scrape changes |
| 48 | + interval: 30s |
| 49 | + input_series: |
| 50 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370", cluster="cozystack"}' |
| 51 | + values: '1x39 stale' |
| 52 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", cluster="cozystack", hostname="node-a", module="SATELLITE"}' |
| 53 | + values: '1x39 stale' |
| 54 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", cluster="cozystack", hostname="linstor-controller-abc", module="CONTROLLER"}' |
| 55 | + values: '1x39 stale' |
| 56 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370", cluster="cluster-a"}' |
| 57 | + values: '_x41 1x79' |
| 58 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", cluster="cluster-a", hostname="node-a", module="SATELLITE"}' |
| 59 | + values: '_x41 1x79' |
| 60 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", cluster="cluster-a", hostname="linstor-controller-abc", module="CONTROLLER"}' |
| 61 | + values: '_x41 1x79' |
| 62 | + alert_rule_test: |
| 63 | + - eval_time: 21m |
| 64 | + groupname: linstor.rules |
| 65 | + alertname: linstorSatelliteErrorRate |
| 66 | + - eval_time: 30m |
| 67 | + groupname: linstor.rules |
| 68 | + alertname: linstorSatelliteErrorRate |
| 69 | + - eval_time: 21m |
| 70 | + groupname: linstor.rules |
| 71 | + alertname: linstorControllerErrorRate |
| 72 | + - eval_time: 30m |
| 73 | + groupname: linstor.rules |
| 74 | + alertname: linstorControllerErrorRate |
| 75 | + |
| 76 | + - name: a satellite drops out of the metric while it is disconnected |
| 77 | + interval: 30s |
| 78 | + input_series: |
| 79 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370"}' |
| 80 | + values: '1x220' |
| 81 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-a", module="SATELLITE"}' |
| 82 | + values: '1x38 stale _x80 1x100' |
| 83 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-b", module="SATELLITE"}' |
| 84 | + values: '2x220' |
| 85 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-c", module="SATELLITE"}' |
| 86 | + values: '1x38 stale _x80 2x100' |
| 87 | + alert_rule_test: |
| 88 | + - eval_time: 61m |
| 89 | + groupname: linstor.rules |
| 90 | + alertname: linstorSatelliteErrorRate |
| 91 | + exp_alerts: |
| 92 | + - exp_labels: |
| 93 | + hostname: node-c |
| 94 | + severity: warning |
| 95 | + exp_annotations: |
| 96 | + description: | |
| 97 | + LINSTOR Satellite "node-c" reports 1 errors in the last 15 minutes. |
| 98 | + Use "linstor error-reports list --nodes node-c" to inspect the reports. |
| 99 | + - eval_time: 70m |
| 100 | + groupname: linstor.rules |
| 101 | + alertname: linstorSatelliteErrorRate |
| 102 | + exp_alerts: |
| 103 | + - exp_labels: |
| 104 | + hostname: node-c |
| 105 | + severity: warning |
| 106 | + exp_annotations: |
| 107 | + description: | |
| 108 | + LINSTOR Satellite "node-c" reports 1 errors in the last 15 minutes. |
| 109 | + Use "linstor error-reports list --nodes node-c" to inspect the reports. |
| 110 | + - eval_time: 76m |
| 111 | + groupname: linstor.rules |
| 112 | + alertname: linstorSatelliteErrorRate |
| 113 | + |
| 114 | + - name: a new report fires for the 15 minute window |
| 115 | + interval: 30s |
| 116 | + input_series: |
| 117 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370"}' |
| 118 | + values: '1x120' |
| 119 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-a", module="SATELLITE"}' |
| 120 | + values: '1x39 2x80' |
| 121 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-b", module="SATELLITE"}' |
| 122 | + values: '2x120' |
| 123 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-c", module="SATELLITE"}' |
| 124 | + values: '0x39 1x80' |
| 125 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="linstor-controller-abc", module="CONTROLLER"}' |
| 126 | + values: '0x39 1x80' |
| 127 | + alert_rule_test: |
| 128 | + - eval_time: 21m |
| 129 | + groupname: linstor.rules |
| 130 | + alertname: linstorSatelliteErrorRate |
| 131 | + exp_alerts: |
| 132 | + - exp_labels: |
| 133 | + hostname: node-a |
| 134 | + severity: warning |
| 135 | + exp_annotations: |
| 136 | + description: | |
| 137 | + LINSTOR Satellite "node-a" reports 1 errors in the last 15 minutes. |
| 138 | + Use "linstor error-reports list --nodes node-a" to inspect the reports. |
| 139 | + - exp_labels: |
| 140 | + hostname: node-c |
| 141 | + severity: warning |
| 142 | + exp_annotations: |
| 143 | + description: | |
| 144 | + LINSTOR Satellite "node-c" reports 1 errors in the last 15 minutes. |
| 145 | + Use "linstor error-reports list --nodes node-c" to inspect the reports. |
| 146 | + - eval_time: 34m |
| 147 | + groupname: linstor.rules |
| 148 | + alertname: linstorSatelliteErrorRate |
| 149 | + exp_alerts: |
| 150 | + - exp_labels: |
| 151 | + hostname: node-a |
| 152 | + severity: warning |
| 153 | + exp_annotations: |
| 154 | + description: | |
| 155 | + LINSTOR Satellite "node-a" reports 1 errors in the last 15 minutes. |
| 156 | + Use "linstor error-reports list --nodes node-a" to inspect the reports. |
| 157 | + - exp_labels: |
| 158 | + hostname: node-c |
| 159 | + severity: warning |
| 160 | + exp_annotations: |
| 161 | + description: | |
| 162 | + LINSTOR Satellite "node-c" reports 1 errors in the last 15 minutes. |
| 163 | + Use "linstor error-reports list --nodes node-c" to inspect the reports. |
| 164 | + - eval_time: 36m |
| 165 | + groupname: linstor.rules |
| 166 | + alertname: linstorSatelliteErrorRate |
| 167 | + - eval_time: 21m |
| 168 | + groupname: linstor.rules |
| 169 | + alertname: linstorControllerErrorRate |
| 170 | + exp_alerts: |
| 171 | + - exp_labels: |
| 172 | + hostname: linstor-controller-abc |
| 173 | + severity: warning |
| 174 | + exp_annotations: |
| 175 | + description: | |
| 176 | + LINSTOR Controller reports 1 errors in the last 15 minutes. |
| 177 | + Use "linstor error-reports list --since 15minutes" to see them. |
| 178 | + - eval_time: 36m |
| 179 | + groupname: linstor.rules |
| 180 | + alertname: linstorControllerErrorRate |
| 181 | + |
| 182 | + - name: a failed controller scrape still holds the alert back |
| 183 | + interval: 30s |
| 184 | + input_series: |
| 185 | + - series: 'up{job="linstor-controller", instance="10.0.0.1:3370"}' |
| 186 | + values: '1x19 0x140 1x60' |
| 187 | + - series: 'linstor_error_reports_count{job="linstor-controller", instance="10.0.0.1:3370", hostname="node-a", module="SATELLITE"}' |
| 188 | + values: '1x19 stale _x140 1x60' |
| 189 | + alert_rule_test: |
| 190 | + - eval_time: 85m |
| 191 | + groupname: linstor.rules |
| 192 | + alertname: linstorSatelliteErrorRate |
| 193 | + - eval_time: 93m |
| 194 | + groupname: linstor.rules |
| 195 | + alertname: linstorSatelliteErrorRate |
| 196 | + - eval_time: 100m |
| 197 | + groupname: linstor.rules |
| 198 | + alertname: linstorSatelliteErrorRate |
0 commit comments