@cryptotaxi247 / netdata-1 / commits / 004c77597

Pluginsd doc (#13273)

thiagoftsm committed Jun 30, 2022 at 14:44 UTC 004c77597f69f5ffff2f1e0dc35a4ff09d617c98
1 file changed +51 -9
collectors/plugins.d/README.md
+51 -9
@@ -116,15 +116,17 @@ For example, if your plugin wants to monitor `squid`, you can search for it on p
116
117 Any program that can print a few values to its standard output can become a Netdata external plugin.
118
119 -Netdata parses 7 lines starting with:
120 -
121 -- `CHART` - create or update a chart
122 -- `DIMENSION` - add or update a dimension to the chart just created
123 -- `BEGIN` - initialize data collection for a chart
124 -- `SET` - set the value of a dimension for the initialized chart
125 -- `END` - complete data collection for the initialized chart
126 -- `FLUSH` - ignore the last collected values
127 -- `DISABLE` - disable this plugin
119 +Netdata parses 9 lines starting with:
120 +
121 +- `CHART` - create or update a chart
122 +- `DIMENSION` - add or update a dimension to the chart just created
123 +- `BEGIN` - initialize data collection for a chart
124 +- `SET` - set the value of a dimension for the initialized chart
125 +- `END` - complete data collection for the initialized chart
126 +- `FLUSH` - ignore the last collected values
127 +- `DISABLE` - disable this plugin
128 +- `CLABEL` - add a label to a chart
129 +- `CLABEL_COMMIT` - commit added labels to the chart.
130
131 a single program can produce any number of charts with any number of dimensions each.
132
@@ -320,6 +322,46 @@ The `value` is floating point (Netdata used `long double`).
322
323 Variables are transferred to upstream Netdata servers (streaming and database replication).
324
325 +#### CLABEL
326 +
327 +> CLABEL name value source
328 +
329 +`CLABEL` defines a label used to organize and identify a chart.
330 +
331 +Name and value accept characters according to the following table:
332 +
333 +| Character | Symbol | Label Name | Label Value |
334 +|---------------------|:------:|:----------:|:-----------:|
335 +| UTF-8 character | UTF-8 | _ | keep |
336 +| Lower case letter | [a-z] | keep | keep |
337 +| Upper case letter | [A-Z] | keep | [a-z] |
338 +| Digit | [0-9] | keep | keep |
339 +| Underscore | _ | keep | keep |
340 +| Minus | - | keep | keep |
341 +| Plus | + | _ | keep |
342 +| Colon | : | _ | keep |
343 +| Semicolon | ; | _ | : |
344 +| Equal | = | _ | : |
345 +| Period | . | keep | keep |
346 +| Comma | , | . | . |
347 +| Slash | / | keep | keep |
348 +| Backslash | \ | / | / |
349 +| At | @ | _ | keep |
350 +| Space | ' ' | _ | keep |
351 +| Opening parenthesis | ( | _ | keep |
352 +| Closing parenthesis | ) | _ | keep |
353 +| Anything else | | _ | _ |
354 +
355 +The `source` is an integer field that can have the following values:
356 +- `1`: The value was set automatically.
357 +- `2`: The value was set manually.
358 +- `4`: This is a K8 label.
359 +- `8`: This is a label defined using `netdata` agent cloud link.
360 +
361 +#### CLABEL_COMMIT
362 +
363 +`CLABEL_COMMIT` indicates that all labels were defined and the chart can be updated.
364 +
365 ## Data collection
366
367 data collection is defined as a series of `BEGIN` -> `SET` -> `END` lines