| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | ## Service units |
| 4 | template: systemd_service_unit_failed_state |
| 5 | on: systemd.service_unit_state |
| 6 | class: Errors |
| 7 | type: Linux |
| 8 | component: Systemd units |
| 9 | chart labels: unit_name=!* |
| 10 | calc: $failed |
| 11 | units: state |
| 12 | every: 10s |
| 13 | warn: $this != nan AND $this == 1 |
| 14 | delay: down 5m multiplier 1.5 max 1h |
| 15 | summary: systemd unit ${label:unit_name} state |
| 16 | info: systemd service unit in the failed state |
| 17 | to: sysadmin |
| 18 | |
| 19 | ## Socket units |
| 20 | template: systemd_socket_unit_failed_state |
| 21 | on: systemd.socket_unit_state |
| 22 | class: Errors |
| 23 | type: Linux |
| 24 | component: Systemd units |
| 25 | chart labels: unit_name=!* |
| 26 | calc: $failed |
| 27 | units: state |
| 28 | every: 10s |
| 29 | warn: $this != nan AND $this == 1 |
| 30 | delay: down 5m multiplier 1.5 max 1h |
| 31 | summary: systemd unit ${label:unit_name} state |
| 32 | info: systemd socket unit in the failed state |
| 33 | to: sysadmin |
| 34 | |
| 35 | ## Target units |
| 36 | template: systemd_target_unit_failed_state |
| 37 | on: systemd.target_unit_state |
| 38 | class: Errors |
| 39 | type: Linux |
| 40 | component: Systemd units |
| 41 | chart labels: unit_name=!* |
| 42 | calc: $failed |
| 43 | units: state |
| 44 | every: 10s |
| 45 | warn: $this != nan AND $this == 1 |
| 46 | delay: down 5m multiplier 1.5 max 1h |
| 47 | summary: systemd unit ${label:unit_name} state |
| 48 | info: systemd target unit in the failed state |
| 49 | to: sysadmin |
| 50 | |
| 51 | ## Path units |
| 52 | template: systemd_path_unit_failed_state |
| 53 | on: systemd.path_unit_state |
| 54 | class: Errors |
| 55 | type: Linux |
| 56 | component: Systemd units |
| 57 | chart labels: unit_name=!* |
| 58 | calc: $failed |
| 59 | units: state |
| 60 | every: 10s |
| 61 | warn: $this != nan AND $this == 1 |
| 62 | delay: down 5m multiplier 1.5 max 1h |
| 63 | summary: systemd unit ${label:unit_name} state |
| 64 | info: systemd path unit in the failed state |
| 65 | to: sysadmin |
| 66 | |
| 67 | ## Device units |
| 68 | template: systemd_device_unit_failed_state |
| 69 | on: systemd.device_unit_state |
| 70 | class: Errors |
| 71 | type: Linux |
| 72 | component: Systemd units |
| 73 | chart labels: unit_name=!* |
| 74 | calc: $failed |
| 75 | units: state |
| 76 | every: 10s |
| 77 | warn: $this != nan AND $this == 1 |
| 78 | delay: down 5m multiplier 1.5 max 1h |
| 79 | summary: systemd unit ${label:unit_name} state |
| 80 | info: systemd device unit in the failed state |
| 81 | to: sysadmin |
| 82 | |
| 83 | ## Mount units |
| 84 | template: systemd_mount_unit_failed_state |
| 85 | on: systemd.mount_unit_state |
| 86 | class: Errors |
| 87 | type: Linux |
| 88 | component: Systemd units |
| 89 | chart labels: unit_name=!* |
| 90 | calc: $failed |
| 91 | units: state |
| 92 | every: 10s |
| 93 | warn: $this != nan AND $this == 1 |
| 94 | delay: down 5m multiplier 1.5 max 1h |
| 95 | summary: systemd unit ${label:unit_name} state |
| 96 | info: systemd mount units in the failed state |
| 97 | to: sysadmin |
| 98 | |
| 99 | ## Automount units |
| 100 | template: systemd_automount_unit_failed_state |
| 101 | on: systemd.automount_unit_state |
| 102 | class: Errors |
| 103 | type: Linux |
| 104 | component: Systemd units |
| 105 | chart labels: unit_name=!* |
| 106 | calc: $failed |
| 107 | units: state |
| 108 | every: 10s |
| 109 | warn: $this != nan AND $this == 1 |
| 110 | delay: down 5m multiplier 1.5 max 1h |
| 111 | summary: systemd unit ${label:unit_name} state |
| 112 | info: systemd automount unit in the failed state |
| 113 | to: sysadmin |
| 114 | |
| 115 | ## Swap units |
| 116 | template: systemd_swap_unit_failed_state |
| 117 | on: systemd.swap_unit_state |
| 118 | class: Errors |
| 119 | type: Linux |
| 120 | component: Systemd units |
| 121 | chart labels: unit_name=!* |
| 122 | calc: $failed |
| 123 | units: state |
| 124 | every: 10s |
| 125 | warn: $this != nan AND $this == 1 |
| 126 | delay: down 5m multiplier 1.5 max 1h |
| 127 | summary: systemd unit ${label:unit_name} state |
| 128 | info: systemd swap units in the failed state |
| 129 | to: sysadmin |
| 130 | |
| 131 | ## Scope units |
| 132 | template: systemd_scope_unit_failed_state |
| 133 | on: systemd.scope_unit_state |
| 134 | class: Errors |
| 135 | type: Linux |
| 136 | component: Systemd units |
| 137 | chart labels: unit_name=!* |
| 138 | calc: $failed |
| 139 | units: state |
| 140 | every: 10s |
| 141 | warn: $this != nan AND $this == 1 |
| 142 | delay: down 5m multiplier 1.5 max 1h |
| 143 | summary: systemd unit ${label:unit_name} state |
| 144 | info: systemd scope units in the failed state |
| 145 | to: sysadmin |
| 146 | |
| 147 | ## Slice units |
| 148 | template: systemd_slice_unit_failed_state |
| 149 | on: systemd.slice_unit_state |
| 150 | class: Errors |
| 151 | type: Linux |
| 152 | component: Systemd units |
| 153 | chart labels: unit_name=!* |
| 154 | calc: $failed |
| 155 | units: state |
| 156 | every: 10s |
| 157 | warn: $this != nan AND $this == 1 |
| 158 | delay: down 5m multiplier 1.5 max 1h |
| 159 | summary: systemd unit ${label:unit_name} state |
| 160 | info: systemd slice units in the failed state |
| 161 | to: sysadmin |
| 162 | |
| 163 | ## Timer units |
| 164 | template: systemd_timer_unit_failed_state |
| 165 | on: systemd.timer_unit_state |
| 166 | class: Errors |
| 167 | type: Linux |
| 168 | component: Systemd units |
| 169 | chart labels: unit_name=!* |
| 170 | calc: $failed |
| 171 | units: state |
| 172 | every: 10s |
| 173 | warn: $this != nan AND $this == 1 |
| 174 | delay: down 5m multiplier 1.5 max 1h |
| 175 | summary: systemd unit ${label:unit_name} state |
| 176 | info: systemd timer unit in the failed state |
| 177 | to: sysadmin |