@cryptotaxi247 / netdata-1 / commits / 2ea16ed62

Add keys to integrations schema, categories, icon path, plus some fixes (#15365)

Co-authored-by: ilyam8 <ilya@netdata.cloud>

Fotis Voutsas committed Jul 12, 2023 at 14:13 UTC 2ea16ed6247bbfcb16c1c18e350e051ba980f9a0
3 files changed +83 -5
collectors/metadata/schemas/definitions.json
+33
@@ -1,5 +1,38 @@
1 {
2 "definitions": {
3 + "category": {
4 + "type": "object",
5 + "description": "Category and subcategory of the collector/monitored instance.",
6 + "properties": {
7 + "level0": {
8 + "type": "string",
9 + "description": "Category name",
10 + "oneOf": [
11 + {
12 + "enum": [
13 + "data-collection"
14 + ]
15 + }
16 + ]
17 + },
18 + "level1": {
19 + "type": "string",
20 + "description": "Subcategory name",
21 + "oneOf": [
22 + {
23 + "enum": [
24 + "databases",
25 + "web-servers",
26 + "message-brokers",
27 + "hardware-and-sensors",
28 + "operating-systems",
29 + "containers-and-vms"
30 + ]
31 + }
32 + ]
33 + }
34 + }
35 + },
36 "alerts": {
37 "type": "array",
38 "description": "The list of configured alerts shipped with Netdata for this collector.",
collectors/metadata/schemas/single-module.json
+39 -3
@@ -11,13 +11,45 @@
11 "type": "string",
12 "description": "Module name (e.g. apache, /proc/stat, httpcheck). It usually has the same name as the module configuration file (external plugin) or the section name in netdata.conf (internal plugin)."
13 },
14 + "categories": {
15 + "type": "array",
16 + "description": "An array defining the categories the integration falls into.",
17 + "items": {
18 + "$ref": "./definitions.json#/definitions/category"
19 + }
20 + },
21 + "icon_path": {
22 + "type": "string",
23 + "description": "path to the integration's icon"
24 + },
25 "monitored_instance": {
26 "$ref": "#/$defs/_monitored_instance"
27 },
28 "alternative_monitored_instances": {
29 "type": "array",
30 "items": {
20 - "$ref": "#/$defs/_monitored_instance"
31 + "type": "object",
32 + "properties": {
33 + "monitored_instance": {
34 + "$ref": "#/$defs/_monitored_instance"
35 + },
36 + "categories": {
37 + "type": "array",
38 + "description": "An array defining the categories the integration falls into.",
39 + "items": {
40 + "$ref": "./definitions.json#/definitions/category"
41 + }
42 + },
43 + "icon_path": {
44 + "type": "string",
45 + "description": "path to the integration's icon"
46 + }
47 + },
48 + "required": [
49 + "monitored_instance",
50 + "icon_path",
51 + "categories"
52 + ]
53 }
54 },
55 "keywords": {
@@ -56,14 +88,16 @@
88 "type": "array",
89 "description": "Only supported OS/platforms. Platforms supported by Netdata will be ignored, only those listed are considered supported.",
90 "items": {
59 - "type": "string"
91 + "type": "string",
92 + "minLength": 2
93 }
94 },
95 "exclude": {
96 "type": "array",
97 "description": "Unsupported OS/platforms. The result set is all platforms supported by Netdata except for those excluded.",
98 "items": {
66 - "type": "string"
99 + "type": "string",
100 + "minLength": 2
101 }
102 }
103 },
@@ -408,6 +442,8 @@
442 "required": [
443 "plugin_name",
444 "module_name",
445 + "categories",
446 + "icon_path",
447 "monitored_instance",
448 "alternative_monitored_instances",
449 "keywords",
collectors/metadata/single-module-template.yaml
+11 -2
@@ -4,10 +4,19 @@ monitored_instance:
4 name: ""
5 link: ""
6 alternative_monitored_instances:
7 - - name: ""
8 - link: ""
7 + - monitored_instance:
8 + name: ""
9 + link: ""
10 + categories:
11 + - level0: data-collection
12 + level1: containers-and-vms
13 + icon_path: ""
14 keywords:
15 - ""
16 +categories:
17 + - level0: data-collection
18 + level1: databases
19 +icon_path: ""
20 overview:
21 data_collection:
22 metrics_description: ""