| 1 | { |
| 2 | "jsonSchema": { |
| 3 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 4 | "title": "Nagios collector configuration.", |
| 5 | "type": "object", |
| 6 | "properties": { |
| 7 | "update_every": { |
| 8 | "title": "Update every", |
| 9 | "description": "Data collection interval, measured in seconds. This is the effective execution resolution for checks and retries.", |
| 10 | "type": "integer", |
| 11 | "minimum": 1, |
| 12 | "default": 10 |
| 13 | }, |
| 14 | "autodetection_retry": { |
| 15 | "title": "Detection retry", |
| 16 | "description": "How often Netdata retries failed automatic detection jobs, in seconds. Set to 0 to disable retries.", |
| 17 | "type": "integer", |
| 18 | "minimum": 0, |
| 19 | "default": 0 |
| 20 | }, |
| 21 | "check_name": { |
| 22 | "title": "Check name", |
| 23 | "description": "Name that identifies this check type for chart grouping and metric naming. Charts appear under `Perfdata/<check_name>` in the dashboard. If omitted, derived from the `plugin` basename.", |
| 24 | "type": "string" |
| 25 | }, |
| 26 | "plugin": { |
| 27 | "title": "Plugin path", |
| 28 | "description": "Absolute path to the Nagios-compatible check command. On Linux/macOS, must be root-owned and not writable by group or others. The command should return exit code 0, 1, 2, or 3 and may print performance data after `|`.", |
| 29 | "type": "string" |
| 30 | }, |
| 31 | "args": { |
| 32 | "title": "Arguments", |
| 33 | "description": "Arguments passed to the check command after macro expansion.", |
| 34 | "type": [ |
| 35 | "array", |
| 36 | "null" |
| 37 | ], |
| 38 | "items": { |
| 39 | "title": "Argument", |
| 40 | "type": "string" |
| 41 | } |
| 42 | }, |
| 43 | "arg_values": { |
| 44 | "title": "Argument macros", |
| 45 | "description": "Values exposed as `NAGIOS_ARG1` .. `NAGIOS_ARG32` for macro substitution and environment export.", |
| 46 | "type": [ |
| 47 | "array", |
| 48 | "null" |
| 49 | ], |
| 50 | "items": { |
| 51 | "title": "Argument macro value", |
| 52 | "type": "string" |
| 53 | }, |
| 54 | "maxItems": 32 |
| 55 | }, |
| 56 | "environment": { |
| 57 | "title": "Environment", |
| 58 | "description": "Extra environment variables added on top of the collector's limited execution baseline. The check does not inherit the full Netdata process environment.", |
| 59 | "type": "object", |
| 60 | "additionalProperties": { |
| 61 | "type": "string" |
| 62 | } |
| 63 | }, |
| 64 | "timeout": { |
| 65 | "title": "Timeout", |
| 66 | "description": "Maximum time allowed for one check execution, in seconds. If the check exceeds this limit, the job state becomes `timeout`.", |
| 67 | "type": "number", |
| 68 | "minimum": 1, |
| 69 | "default": 5 |
| 70 | }, |
| 71 | "check_interval": { |
| 72 | "title": "Check interval", |
| 73 | "description": "Requested interval between regular checks, in seconds.", |
| 74 | "type": "number", |
| 75 | "minimum": 1, |
| 76 | "default": 300 |
| 77 | }, |
| 78 | "retry_interval": { |
| 79 | "title": "Retry interval", |
| 80 | "description": "Requested interval between retry attempts while the check is in a soft non-OK state, in seconds.", |
| 81 | "type": "number", |
| 82 | "minimum": 1, |
| 83 | "default": 60 |
| 84 | }, |
| 85 | "max_check_attempts": { |
| 86 | "title": "Max check attempts", |
| 87 | "description": "Maximum number of attempts before a non-OK result is treated as a hard state.", |
| 88 | "type": "integer", |
| 89 | "minimum": 1, |
| 90 | "default": 3 |
| 91 | }, |
| 92 | "check_period": { |
| 93 | "title": "Check period", |
| 94 | "description": "Named time period that controls when checks are allowed to run. Use `24x7` for always-on execution. Outside the allowed period, the check does not execute and the public job state becomes `paused`.", |
| 95 | "type": "string", |
| 96 | "default": "24x7" |
| 97 | }, |
| 98 | "time_periods": { |
| 99 | "title": "Time periods", |
| 100 | "description": "Custom named schedules local to this job. `check_period` can reference any name defined here.", |
| 101 | "type": [ |
| 102 | "array", |
| 103 | "null" |
| 104 | ], |
| 105 | "items": { |
| 106 | "title": "Time period", |
| 107 | "type": "object", |
| 108 | "properties": { |
| 109 | "name": { |
| 110 | "title": "Name", |
| 111 | "description": "Unique time period name referenced from `check_period`.", |
| 112 | "type": "string" |
| 113 | }, |
| 114 | "alias": { |
| 115 | "title": "Alias", |
| 116 | "description": "Human-readable label for this time period.", |
| 117 | "type": "string" |
| 118 | }, |
| 119 | "exclude": { |
| 120 | "title": "Exclude", |
| 121 | "description": "Names of other periods to subtract from this one.", |
| 122 | "type": [ |
| 123 | "array", |
| 124 | "null" |
| 125 | ], |
| 126 | "items": { |
| 127 | "title": "Excluded period", |
| 128 | "type": "string" |
| 129 | } |
| 130 | }, |
| 131 | "rules": { |
| 132 | "title": "Rules", |
| 133 | "description": "Allow rules for this time period.", |
| 134 | "type": "array", |
| 135 | "items": { |
| 136 | "title": "Rule", |
| 137 | "type": "object", |
| 138 | "properties": { |
| 139 | "type": { |
| 140 | "title": "Type", |
| 141 | "description": "Rule type.", |
| 142 | "type": "string", |
| 143 | "enum": [ |
| 144 | "weekly", |
| 145 | "nth_weekday", |
| 146 | "date" |
| 147 | ], |
| 148 | "default": "weekly" |
| 149 | }, |
| 150 | "days": { |
| 151 | "title": "Days", |
| 152 | "description": "Weekdays used by `weekly` rules. If omitted, all days are allowed.", |
| 153 | "type": [ |
| 154 | "array", |
| 155 | "null" |
| 156 | ], |
| 157 | "items": { |
| 158 | "type": "string", |
| 159 | "enum": [ |
| 160 | "sunday", |
| 161 | "monday", |
| 162 | "tuesday", |
| 163 | "wednesday", |
| 164 | "thursday", |
| 165 | "friday", |
| 166 | "saturday" |
| 167 | ] |
| 168 | } |
| 169 | }, |
| 170 | "ranges": { |
| 171 | "title": "Ranges", |
| 172 | "description": "Allowed time ranges in `HH:MM-HH:MM` format.", |
| 173 | "type": "array", |
| 174 | "items": { |
| 175 | "title": "Time range", |
| 176 | "type": "string" |
| 177 | }, |
| 178 | "minItems": 1 |
| 179 | }, |
| 180 | "weekday": { |
| 181 | "title": "Weekday", |
| 182 | "description": "Weekday used by `nth_weekday` rules.", |
| 183 | "type": "string", |
| 184 | "enum": [ |
| 185 | "sunday", |
| 186 | "monday", |
| 187 | "tuesday", |
| 188 | "wednesday", |
| 189 | "thursday", |
| 190 | "friday", |
| 191 | "saturday" |
| 192 | ] |
| 193 | }, |
| 194 | "nth": { |
| 195 | "title": "Nth occurrence", |
| 196 | "description": "Month occurrence used by `nth_weekday` rules.", |
| 197 | "type": "integer", |
| 198 | "minimum": 1, |
| 199 | "maximum": 5 |
| 200 | }, |
| 201 | "dates": { |
| 202 | "title": "Dates", |
| 203 | "description": "Explicit dates used by `date` rules, in `YYYY-MM-DD` format.", |
| 204 | "type": [ |
| 205 | "array", |
| 206 | "null" |
| 207 | ], |
| 208 | "items": { |
| 209 | "title": "Date", |
| 210 | "type": "string" |
| 211 | } |
| 212 | } |
| 213 | }, |
| 214 | "required": [ |
| 215 | "ranges" |
| 216 | ] |
| 217 | }, |
| 218 | "minItems": 1 |
| 219 | } |
| 220 | }, |
| 221 | "required": [ |
| 222 | "name", |
| 223 | "rules" |
| 224 | ] |
| 225 | } |
| 226 | }, |
| 227 | "working_directory": { |
| 228 | "title": "Working directory", |
| 229 | "description": "Optional working directory used when running the check command.", |
| 230 | "type": "string" |
| 231 | }, |
| 232 | "custom_vars": { |
| 233 | "title": "Custom variables", |
| 234 | "description": "Custom service variables exported as `NAGIOS__SERVICE*` environment variables.", |
| 235 | "type": "object", |
| 236 | "additionalProperties": { |
| 237 | "type": "string" |
| 238 | } |
| 239 | }, |
| 240 | "notes": { |
| 241 | "title": "Notes", |
| 242 | "description": "Optional free-form notes for this job.", |
| 243 | "type": "string" |
| 244 | }, |
| 245 | "vnode": { |
| 246 | "title": "Vnode", |
| 247 | "description": "Associates this data collection job with a [Virtual Node](https://learn.netdata.cloud/docs/netdata-agent/configuration/organize-systems-metrics-and-alerts#virtual-nodes).", |
| 248 | "type": "string" |
| 249 | } |
| 250 | }, |
| 251 | "required": [ |
| 252 | "plugin" |
| 253 | ] |
| 254 | }, |
| 255 | "uiSchema": { |
| 256 | "uiOptions": { |
| 257 | "fullPage": true |
| 258 | }, |
| 259 | "check_name": { |
| 260 | "ui:placeholder": "check_ping", |
| 261 | "ui:help": "**Controls chart grouping and metric naming for performance data.**\n\nCharts appear under `Synthetic > Nagios > Perfdata > <check_name>` in the dashboard.\n\nIf omitted, Netdata derives it from the `plugin` basename (e.g. `/usr/lib/nagios/plugins/check_ping` → `check_ping`, `C:\\Netdata\\checks\\check_service.ps1` → `check_service`).\n\n### When to set it\n\n- When multiple jobs run the same plugin (e.g. `check_nrpe`) against different remote checks — set `check_name` to distinguish them (`check_disk`, `check_load`, etc.)\n\n### Example metric names\n\nWith `check_name: check_memory` and a script that outputs `caches=2380912KB`:\n\n- `nagios.perfdata.check_memory.job.execution_state`\n- `nagios.perfdata.check_memory.bytes_caches`\n- `nagios.perfdata.check_memory.bytes_caches_threshold_state`" |
| 262 | }, |
| 263 | "plugin": { |
| 264 | "ui:placeholder": "/usr/lib/nagios/plugins/check_ping", |
| 265 | "ui:help": "**Absolute path to the check command.**\n\n### Linux / macOS\n\nThe executable must meet these security requirements:\n- Owned by **root**\n- Not writable by group or others\n- All ancestor directories owned by root and not group/other-writable\n- Must be a regular, executable file\n- Symlinks are resolved before validation\n\nExample:\n```\n/usr/lib/nagios/plugins/check_ping\n```\n\n### Windows\n\nPoint `plugin` directly to a `.ps1`, `.bat`, or `.cmd` script. Netdata automatically invokes `.ps1` scripts through `powershell.exe` and `.bat`/`.cmd` scripts through `cmd.exe`.\n\nExample:\n```\nC:\\Netdata\\checks\\check_service.ps1\n```\nPath validation is not enforced on Windows — ensure scripts are stored in directories with appropriate ACLs.\n\n### Output format\n\nThe command should return exit code `0` (OK), `1` (WARNING), `2` (CRITICAL), or `3` (UNKNOWN) and may print performance data after `|`:\n```\nSTATUS TEXT | label=value;warn;crit;min;max\n```" |
| 266 | }, |
| 267 | "args": { |
| 268 | "ui:listFlavour": "list", |
| 269 | "ui:help": "**Arguments passed to the check command after macro expansion.**\n\nYou can use Nagios-style macros like `$ARG1$`, `$HOSTADDRESS$`, `$_SERVICEDBHOST$` — they are expanded before execution.\n\nOn Windows, when `plugin` points to a `.ps1`/`.bat`/`.cmd` script, these arguments are appended after the script path." |
| 270 | }, |
| 271 | "arg_values": { |
| 272 | "ui:listFlavour": "list", |
| 273 | "ui:help": "These values are exported as `NAGIOS_ARG1` .. `NAGIOS_ARG32`." |
| 274 | }, |
| 275 | "timeout": { |
| 276 | "ui:help": "Accepts decimals for precise control (for example 1.5 for 1.5 seconds). String durations are also accepted in raw config files." |
| 277 | }, |
| 278 | "check_interval": { |
| 279 | "ui:help": "Requested regular check interval. Actual execution cannot be faster than `update_every`." |
| 280 | }, |
| 281 | "retry_interval": { |
| 282 | "ui:help": "Requested retry interval after non-OK results. Actual execution cannot be faster than `update_every`." |
| 283 | }, |
| 284 | "check_period": { |
| 285 | "ui:placeholder": "24x7" |
| 286 | }, |
| 287 | "time_periods": { |
| 288 | "ui:listFlavour": "list" |
| 289 | }, |
| 290 | "environment": { |
| 291 | "ui:help": "**Extra environment variables for the check process.**\n\nChecks run with a limited baseline environment (only `PATH`, `HOME`, `USER`, `TZ`, `TMPDIR`, `SHELL`, `LC_ALL` on Linux/macOS). If your script depends on additional variables, set them here.\n\n### Example\n```yaml\nenvironment:\n ORACLE_HOME: /opt/oracle/product/19c\n LD_LIBRARY_PATH: /opt/oracle/product/19c/lib\n```" |
| 292 | }, |
| 293 | "custom_vars": { |
| 294 | "ui:help": "**Custom service variables exposed as Nagios-style macros.**\n\nEach entry is available as:\n- Environment variable: `NAGIOS__SERVICE<UPPERCASE_KEY>`\n- Macro in `args`: `$_SERVICE<KEY>$`\n\n### Example\n```yaml\ncustom_vars:\n DBHOST: db.example.com\n DBNAME: production\n```\nUse in args: `[\"-H\", \"$_SERVICEDBHOST$\", \"-d\", \"$_SERVICEDBNAME$\"]`" |
| 295 | }, |
| 296 | "vnode": { |
| 297 | "ui:placeholder": "To use this option, first create a Virtual Node and then reference its name here." |
| 298 | }, |
| 299 | "ui:flavour": "tabs", |
| 300 | "ui:options": { |
| 301 | "tabs": [ |
| 302 | { |
| 303 | "title": "Base", |
| 304 | "fields": [ |
| 305 | "update_every", |
| 306 | "plugin", |
| 307 | "check_name", |
| 308 | "args", |
| 309 | "arg_values", |
| 310 | "timeout", |
| 311 | "vnode", |
| 312 | "autodetection_retry" |
| 313 | ] |
| 314 | }, |
| 315 | { |
| 316 | "title": "Scheduling", |
| 317 | "fields": [ |
| 318 | "check_interval", |
| 319 | "retry_interval", |
| 320 | "max_check_attempts", |
| 321 | "check_period", |
| 322 | "time_periods" |
| 323 | ] |
| 324 | }, |
| 325 | { |
| 326 | "title": "Runtime", |
| 327 | "fields": [ |
| 328 | "working_directory", |
| 329 | "environment", |
| 330 | "custom_vars", |
| 331 | "notes" |
| 332 | ] |
| 333 | } |
| 334 | ] |
| 335 | } |
| 336 | } |
| 337 | } |