| 1 | plugin_name: go.d.plugin |
| 2 | modules: |
| 3 | - meta: |
| 4 | id: collector-go.d.plugin-systemdunits |
| 5 | plugin_name: go.d.plugin |
| 6 | module_name: systemdunits |
| 7 | monitored_instance: |
| 8 | name: Systemd Units |
| 9 | link: https://www.freedesktop.org/wiki/Software/systemd/ |
| 10 | icon_filename: systemd.svg |
| 11 | categories: |
| 12 | - data-collection.operating-systems |
| 13 | keywords: |
| 14 | - systemd |
| 15 | related_resources: |
| 16 | integrations: |
| 17 | list: [] |
| 18 | info_provided_to_referring_integrations: |
| 19 | description: "" |
| 20 | overview: |
| 21 | data_collection: |
| 22 | metrics_description: | |
| 23 | This collector monitors the state of Systemd units and unit files. |
| 24 | method_description: "" |
| 25 | supported_platforms: |
| 26 | include: [] |
| 27 | exclude: [] |
| 28 | multi_instance: true |
| 29 | additional_permissions: |
| 30 | description: "" |
| 31 | default_behavior: |
| 32 | auto_detection: |
| 33 | description: "" |
| 34 | limits: |
| 35 | description: "" |
| 36 | performance_impact: |
| 37 | description: "" |
| 38 | setup: |
| 39 | prerequisites: |
| 40 | list: [] |
| 41 | configuration: |
| 42 | file: |
| 43 | name: go.d/systemdunits.conf |
| 44 | options: |
| 45 | description: | |
| 46 | The following options can be defined globally: update_every, autodetection_retry. |
| 47 | folding: |
| 48 | title: Config options |
| 49 | enabled: true |
| 50 | list: |
| 51 | - name: update_every |
| 52 | description: Data collection frequency. |
| 53 | default_value: 1 |
| 54 | required: false |
| 55 | group: Collection |
| 56 | - name: autodetection_retry |
| 57 | description: Recheck interval in seconds. Zero means no recheck will be scheduled. |
| 58 | default_value: 0 |
| 59 | required: false |
| 60 | group: Collection |
| 61 | - name: timeout |
| 62 | description: System bus requests timeout. |
| 63 | default_value: 1 |
| 64 | required: false |
| 65 | group: Collection |
| 66 | |
| 67 | - name: include |
| 68 | description: Systemd units selector. |
| 69 | default_value: "*.service" |
| 70 | required: false |
| 71 | group: Units |
| 72 | detailed_description: | |
| 73 | Systemd units matching the selector will be monitored. |
| 74 | |
| 75 | - Logic: (pattern1 OR pattern2) |
| 76 | - Pattern syntax: [shell file name pattern](https://golang.org/pkg/path/filepath/#Match) |
| 77 | - Syntax: |
| 78 | |
| 79 | ```yaml |
| 80 | includes: |
| 81 | - pattern1 |
| 82 | - pattern2 |
| 83 | ``` |
| 84 | - name: skip_transient |
| 85 | description: If set, skip data collection for systemd transient units. |
| 86 | default_value: "false" |
| 87 | required: false |
| 88 | group: Units |
| 89 | |
| 90 | - name: collect_unit_files |
| 91 | description: If set to true, collect the state of installed unit files. Enabling this may increase system overhead. |
| 92 | default_value: "false" |
| 93 | required: false |
| 94 | group: Unit Files |
| 95 | - name: collect_unit_files_every |
| 96 | description: Interval for querying systemd about unit files and their enablement state, measured in seconds. Data is cached for this interval to reduce system overhead. |
| 97 | default_value: 300 |
| 98 | required: false |
| 99 | group: Unit Files |
| 100 | - name: include_unit_files |
| 101 | description: Systemd unit files selector. |
| 102 | default_value: "*.service" |
| 103 | required: false |
| 104 | group: Unit Files |
| 105 | detailed_description: | |
| 106 | Systemd unit files matching the selector will be monitored. |
| 107 | |
| 108 | - Logic: (pattern1 OR pattern2) |
| 109 | - Pattern syntax: [shell file name pattern](https://golang.org/pkg/path/filepath/#Match) |
| 110 | - Syntax: |
| 111 | |
| 112 | ```yaml |
| 113 | includes: |
| 114 | - pattern1 |
| 115 | - pattern2 |
| 116 | ``` |
| 117 | examples: |
| 118 | folding: |
| 119 | title: Config |
| 120 | enabled: true |
| 121 | list: |
| 122 | - name: Service units |
| 123 | description: Collect state of all service type units. |
| 124 | config: | |
| 125 | jobs: |
| 126 | - name: service |
| 127 | include: |
| 128 | - '*.service' |
| 129 | - name: One specific unit |
| 130 | description: Collect state of one specific unit. |
| 131 | config: | |
| 132 | jobs: |
| 133 | - name: my-specific-service |
| 134 | include: |
| 135 | - 'my-specific.service' |
| 136 | - name: All unit types |
| 137 | description: Collect state of all units. |
| 138 | config: | |
| 139 | jobs: |
| 140 | - name: my-specific-service-unit |
| 141 | include: |
| 142 | - '*' |
| 143 | - name: Multi-instance |
| 144 | description: | |
| 145 | > **Note**: When you define multiple jobs, their names must be unique. |
| 146 | |
| 147 | Collect state of all service and socket type units. |
| 148 | config: | |
| 149 | jobs: |
| 150 | - name: service |
| 151 | include: |
| 152 | - '*.service' |
| 153 | |
| 154 | - name: socket |
| 155 | include: |
| 156 | - '*.socket' |
| 157 | troubleshooting: |
| 158 | problems: |
| 159 | list: [] |
| 160 | alerts: |
| 161 | - name: systemd_service_unit_failed_state |
| 162 | metric: systemd.service_unit_state |
| 163 | info: systemd service unit in the failed state |
| 164 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 165 | - name: systemd_socket_unit_failed_state |
| 166 | metric: systemd.socket_unit_state |
| 167 | info: systemd socket unit in the failed state |
| 168 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 169 | - name: systemd_target_unit_failed_state |
| 170 | metric: systemd.target_unit_state |
| 171 | info: systemd target unit in the failed state |
| 172 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 173 | - name: systemd_path_unit_failed_state |
| 174 | metric: systemd.path_unit_state |
| 175 | info: systemd path unit in the failed state |
| 176 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 177 | - name: systemd_device_unit_failed_state |
| 178 | metric: systemd.device_unit_state |
| 179 | info: systemd device unit in the failed state |
| 180 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 181 | - name: systemd_mount_unit_failed_state |
| 182 | metric: systemd.mount_unit_state |
| 183 | info: systemd mount unit in the failed state |
| 184 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 185 | - name: systemd_automount_unit_failed_state |
| 186 | metric: systemd.automount_unit_state |
| 187 | info: systemd automount unit in the failed state |
| 188 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 189 | - name: systemd_swap_unit_failed_state |
| 190 | metric: systemd.swap_unit_state |
| 191 | info: systemd swap unit in the failed state |
| 192 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 193 | - name: systemd_scope_unit_failed_state |
| 194 | metric: systemd.scope_unit_state |
| 195 | info: systemd scope unit in the failed state |
| 196 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 197 | - name: systemd_slice_unit_failed_state |
| 198 | metric: systemd.slice_unit_state |
| 199 | info: systemd slice unit in the failed state |
| 200 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 201 | - name: systemd_timer_unit_failed_state |
| 202 | metric: systemd.timer_unit_state |
| 203 | info: systemd timer unit in the failed state |
| 204 | link: https://github.com/netdata/netdata/blob/master/src/health/health.d/systemdunits.conf |
| 205 | metrics: |
| 206 | folding: |
| 207 | title: Metrics |
| 208 | enabled: false |
| 209 | description: "" |
| 210 | availability: [] |
| 211 | scopes: |
| 212 | - name: unit |
| 213 | description: These metrics refer to the systemd unit. |
| 214 | labels: |
| 215 | - name: unit_name |
| 216 | description: systemd unit name |
| 217 | metrics: |
| 218 | - name: systemd.service_unit_state |
| 219 | description: Service Unit State |
| 220 | unit: state |
| 221 | chart_type: line |
| 222 | dimensions: |
| 223 | - name: active |
| 224 | - name: inactive |
| 225 | - name: activating |
| 226 | - name: deactivating |
| 227 | - name: failed |
| 228 | - name: systemd.socket_unit_state |
| 229 | description: Socket Unit State |
| 230 | unit: state |
| 231 | chart_type: line |
| 232 | dimensions: |
| 233 | - name: active |
| 234 | - name: inactive |
| 235 | - name: activating |
| 236 | - name: deactivating |
| 237 | - name: failed |
| 238 | - name: systemd.target_unit_state |
| 239 | description: Target Unit State |
| 240 | unit: state |
| 241 | chart_type: line |
| 242 | dimensions: |
| 243 | - name: active |
| 244 | - name: inactive |
| 245 | - name: activating |
| 246 | - name: deactivating |
| 247 | - name: failed |
| 248 | - name: systemd.path_unit_state |
| 249 | description: Path Unit State |
| 250 | unit: state |
| 251 | chart_type: line |
| 252 | dimensions: |
| 253 | - name: active |
| 254 | - name: inactive |
| 255 | - name: activating |
| 256 | - name: deactivating |
| 257 | - name: failed |
| 258 | - name: systemd.device_unit_state |
| 259 | description: Device Unit State |
| 260 | unit: state |
| 261 | chart_type: line |
| 262 | dimensions: |
| 263 | - name: active |
| 264 | - name: inactive |
| 265 | - name: activating |
| 266 | - name: deactivating |
| 267 | - name: failed |
| 268 | - name: systemd.mount_unit_state |
| 269 | description: Mount Unit State |
| 270 | unit: state |
| 271 | chart_type: line |
| 272 | dimensions: |
| 273 | - name: active |
| 274 | - name: inactive |
| 275 | - name: activating |
| 276 | - name: deactivating |
| 277 | - name: failed |
| 278 | - name: systemd.automount_unit_state |
| 279 | description: Automount Unit State |
| 280 | unit: state |
| 281 | chart_type: line |
| 282 | dimensions: |
| 283 | - name: active |
| 284 | - name: inactive |
| 285 | - name: activating |
| 286 | - name: deactivating |
| 287 | - name: failed |
| 288 | - name: systemd.swap_unit_state |
| 289 | description: Swap Unit State |
| 290 | unit: state |
| 291 | chart_type: line |
| 292 | dimensions: |
| 293 | - name: active |
| 294 | - name: inactive |
| 295 | - name: activating |
| 296 | - name: deactivating |
| 297 | - name: failed |
| 298 | - name: systemd.timer_unit_state |
| 299 | description: Timer Unit State |
| 300 | unit: state |
| 301 | chart_type: line |
| 302 | dimensions: |
| 303 | - name: active |
| 304 | - name: inactive |
| 305 | - name: activating |
| 306 | - name: deactivating |
| 307 | - name: failed |
| 308 | - name: systemd.scope_unit_state |
| 309 | description: Scope Unit State |
| 310 | unit: state |
| 311 | chart_type: line |
| 312 | dimensions: |
| 313 | - name: active |
| 314 | - name: inactive |
| 315 | - name: activating |
| 316 | - name: deactivating |
| 317 | - name: failed |
| 318 | - name: systemd.slice_unit_state |
| 319 | description: Slice Unit State |
| 320 | unit: state |
| 321 | chart_type: line |
| 322 | dimensions: |
| 323 | - name: active |
| 324 | - name: inactive |
| 325 | - name: activating |
| 326 | - name: deactivating |
| 327 | - name: failed |
| 328 | - name: unit file |
| 329 | description: These metrics refer to the systemd unit file. |
| 330 | labels: |
| 331 | - name: unit_file_name |
| 332 | description: systemd unit file name |
| 333 | - name: unit_file_type |
| 334 | description: systemd unit file type |
| 335 | metrics: |
| 336 | - name: systemd.unit_file_state |
| 337 | description: Unit File State |
| 338 | unit: state |
| 339 | chart_type: line |
| 340 | dimensions: |
| 341 | - name: enabled |
| 342 | - name: enabled-runtime |
| 343 | - name: linked |
| 344 | - name: linked-runtime |
| 345 | - name: alias |
| 346 | - name: masked |
| 347 | - name: masked-runtime |
| 348 | - name: static |
| 349 | - name: disabled |
| 350 | - name: indirect |
| 351 | - name: generated |
| 352 | - name: transient |
| 353 | - name: bad |