| 1 | { |
| 2 | "jsonSchema": { |
| 3 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | "title": "Smartctl collector configuration.", |
| 5 | "type": "object", |
| 6 | "properties": { |
| 7 | "update_every": { |
| 8 | "title": "Update every", |
| 9 | "description": "Interval for updating Netdata charts, measured in seconds. Collector might use cached data if less than **Devices poll interval**.", |
| 10 | "type": "integer", |
| 11 | "minimum": 1, |
| 12 | "default": 10 |
| 13 | }, |
| 14 | "timeout": { |
| 15 | "title": "Timeout", |
| 16 | "description": "Timeout for executing the `smartctl` binary, specified in seconds.", |
| 17 | "type": "number", |
| 18 | "minimum": 0.5, |
| 19 | "default": 5 |
| 20 | }, |
| 21 | "scan_every": { |
| 22 | "title": "Scan interval", |
| 23 | "description": "Interval for discovering new devices using `smartctl --scan`, measured in seconds. Set to 0 to scan devices only once on startup.", |
| 24 | "type": "number", |
| 25 | "minimum": 1, |
| 26 | "default": 900 |
| 27 | }, |
| 28 | "poll_devices_every": { |
| 29 | "title": "Devices poll interval", |
| 30 | "description": "Interval for gathering data for every device, measured in seconds. Data is cached for this interval.", |
| 31 | "type": "number", |
| 32 | "minimum": 1, |
| 33 | "default": 300 |
| 34 | }, |
| 35 | "no_check_power_mode": { |
| 36 | "title": "No check power mode", |
| 37 | "description": "ATA only. Skip data collection when the device is in a low-power mode. Prevents unnecessary disk spin-up.", |
| 38 | "type": "string", |
| 39 | "enum": [ |
| 40 | "standby", |
| 41 | "never", |
| 42 | "sleep", |
| 43 | "idle" |
| 44 | ], |
| 45 | "default": "standby" |
| 46 | }, |
| 47 | "device_selector": { |
| 48 | "title": "Device selector", |
| 49 | "description": "Specifies a [pattern](https://github.com/netdata/netdata/tree/master/src/libnetdata/simple_pattern#readme) to match the 'info name' of devices as reported by `smartctl --scan --json`. Only devices whose 'info name' matches this pattern will be collected.", |
| 50 | "type": "string", |
| 51 | "minimum": 1, |
| 52 | "default": "*" |
| 53 | }, |
| 54 | "concurrent_scans": { |
| 55 | "title": "Concurrent scans", |
| 56 | "description": "Number of devices to scan concurrently. Set to 0 for sequential scanning (default), or a positive number for concurrent scanning.", |
| 57 | "type": "integer", |
| 58 | "minimum": 0, |
| 59 | "default": 0 |
| 60 | }, |
| 61 | "extra_devices": { |
| 62 | "title": "Extra devices", |
| 63 | "description": "Allows manual specification of devices not automatically detected by `smartctl --scan`. Each device entry must include both a name and a type.", |
| 64 | "type": [ |
| 65 | "array", |
| 66 | "null" |
| 67 | ], |
| 68 | "uniqueItems": true, |
| 69 | "items": { |
| 70 | "title": "Device", |
| 71 | "type": [ |
| 72 | "object", |
| 73 | "null" |
| 74 | ], |
| 75 | "required": [ |
| 76 | "name", |
| 77 | "type" |
| 78 | ], |
| 79 | "properties": { |
| 80 | "name": { |
| 81 | "title": "Name", |
| 82 | "type": "string" |
| 83 | }, |
| 84 | "type": { |
| 85 | "title": "Type", |
| 86 | "type": "string" |
| 87 | } |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | } |
| 92 | }, |
| 93 | "uiSchema": { |
| 94 | "uiOptions": { |
| 95 | "fullPage": true |
| 96 | }, |
| 97 | "ui:flavour": "tabs", |
| 98 | "ui:options": { |
| 99 | "tabs": [ |
| 100 | { |
| 101 | "title": "Base", |
| 102 | "fields": [ |
| 103 | "update_every", |
| 104 | "timeout", |
| 105 | "scan_every", |
| 106 | "poll_devices_every", |
| 107 | "no_check_power_mode", |
| 108 | "concurrent_scans" |
| 109 | ] |
| 110 | }, |
| 111 | { |
| 112 | "title": "Devices", |
| 113 | "fields": [ |
| 114 | "device_selector", |
| 115 | "extra_devices" |
| 116 | ] |
| 117 | } |
| 118 | ] |
| 119 | }, |
| 120 | "timeout": { |
| 121 | "ui:help": "Accepts decimals for precise control (e.g., type 1.5 for 1.5 seconds)." |
| 122 | }, |
| 123 | "no_check_power_mode": { |
| 124 | "ui:help": "`never` - check the device always; `sleep` - check the device unless it is in SLEEP mode; `standby` - check the device unless it is in SLEEP or STANDBY mode; `idle` - check the device unless it is in SLEEP, STANDBY or IDLE mode.", |
| 125 | "ui:widget": "radio", |
| 126 | "ui:options": { |
| 127 | "inline": true |
| 128 | } |
| 129 | }, |
| 130 | "device_selector": { |
| 131 | "ui:help": "Leave blank or use `*` to collect data for all devices." |
| 132 | }, |
| 133 | "concurrent_scans": { |
| 134 | "ui:help": "Improves performance when monitoring many devices. Set to the number of devices to scan simultaneously, or 0 to disable concurrent scanning." |
| 135 | }, |
| 136 | "extra_devices": { |
| 137 | "items": { |
| 138 | "name": { |
| 139 | "ui:placeholder": "/dev/sda" |
| 140 | }, |
| 141 | "type": { |
| 142 | "ui:placeholder": "jmb39x-q,3" |
| 143 | } |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | } |