Updates on JSON schemas (#15382)
Fotis Voutsas committed
Jul 13, 2023 at 20:55 UTC
bf8c38897f7fbd9d6c71188a050b89ee5ef88079
4 files changed
+21
-65
collectors/metadata/schemas/definitions.json
+5
-35
@@ -19,51 +19,21 @@
19
"$ref": "#/definitions/category"
20
}
21
},
22
- "icon_path": {
22
+ "icon_filename": {
23
"type": "string",
24
- "description": "Path to the integration's icon."
24
+ "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img."
25
}
26
},
27
"required": [
28
"name",
29
"link",
30
"categories",
31
- "icon_path"
31
+ "icon_filename"
32
]
33
},
34
"category": {
35
- "type": "object",
36
- "description": "Category and subcategory of the collector/monitored instance.",
37
- "properties": {
38
- "level0": {
39
- "type": "string",
40
- "description": "Category name",
41
- "oneOf": [
42
- {
43
- "enum": [
44
- "data-collection"
45
- ]
46
- }
47
- ]
48
- },
49
- "level1": {
50
- "type": "string",
51
- "description": "Subcategory name",
52
- "oneOf": [
53
- {
54
- "enum": [
55
- "most-popular",
56
- "databases",
57
- "web-servers",
58
- "message-brokers",
59
- "hardware-and-sensors",
60
- "operating-systems",
61
- "containers-and-vms"
62
- ]
63
- }
64
- ]
65
- }
66
- }
35
+ "type": "string",
36
+ "description": "String defining integration category"
37
},
38
"alerts": {
39
"type": "array",
collectors/metadata/schemas/single-module.json
+6
-1
@@ -81,6 +81,10 @@
81
"required": [
82
"description"
83
]
84
+ },
85
+ "most_popular": {
86
+ "type": "boolean",
87
+ "description": "Whether or not the integration is to be flagged as most-popular, meaning it will show up at the top of the menu."
88
}
89
},
90
"required": [
@@ -90,7 +94,8 @@
94
"alternative_monitored_instances",
95
"keywords",
96
"related_resources",
93
- "info_provided_to_referring_integrations"
97
+ "info_provided_to_referring_integrations",
98
+ "most_popular"
99
]
100
},
101
"overview": {
collectors/metadata/single-module-template.yaml
+5
-13
@@ -1,20 +1,12 @@
1
meta:
2
plugin_name: ""
3
module_name: ""
4
+ alternative_monitored_instances: []
5
monitored_instance:
6
name: ""
7
link: ""
7
- icon_path: ""
8
- categories:
9
- - level0: data-collection
10
- level1: databases
11
- alternative_monitored_instances:
12
- - name: ""
13
- link: ""
14
- icon_path: ""
15
- categories:
16
- - level0: data-collection
17
- level1: containers-and-vms
8
+ categories: []
9
+ icon_filename: ""
10
related_resources:
11
integrations:
12
list:
@@ -22,8 +14,8 @@ meta:
14
module_name: ""
15
info_provided_to_referring_integrations:
16
description: ""
25
- keywords:
26
- - ""
17
+ keywords: []
18
+ most_popular: false
19
overview:
20
data_collection:
21
metrics_description: ""
docs/.templates/integration/schema.json
+5
-16
@@ -17,17 +17,6 @@
17
"type": "string",
18
"description": "Name of the category. This is the actual name of the category or subcategory, (e.g. Web Servers, Operating Systems, Databases)."
19
},
20
- "limit_results": {
21
- "type": [
22
- "null",
23
- "integer"
24
- ],
25
- "description": "A value that if set to an integer will limit the amount of subitems that this category will display. Additional subcategories will be hidden behind a `Show more` field."
26
- },
27
- "icon_name": {
28
- "type": "string",
29
- "description": "The name of the icon from the Netdata UI."
30
- },
20
"description": {
21
"type": "string",
22
"description": "Text that will be presented below the category title."
@@ -37,13 +26,13 @@
26
"description": "Priority of the category. A number expressing where the category should be in the menu. The smaller the number the higher the priority, so a category with priority 1 would be above a category with a priority of 50 in terms of menu ordering."
27
},
28
"id": {
40
- "type": "integer",
29
+ "type": "string",
30
"description": "ID of the category that will be used by integrations, this is a unique number for each category that will be used by its children to refer to it as their parent."
31
},
32
"parent_id": {
33
"type": [
34
"null",
46
- "integer"
35
+ "string"
36
],
37
"description": "The category's parent ID. If this category is a subcategory, then it needs to mention its parent, where it belongs to. Make it null if no parent and this is a top level category."
38
}
@@ -59,8 +48,8 @@
48
"type": "object",
49
"properties": {
50
"id": {
62
- "type": "integer",
63
- "description": "A unique numeric identifier for the integration."
51
+ "type": "string",
52
+ "description": "A unique string identifier for the integration."
53
},
54
"name": {
55
"type": "string"
@@ -72,7 +61,7 @@
61
"type": "object",
62
"properties": {
63
"category_id": {
75
- "type": "integer",
64
+ "type": "string",
65
"description": "The category_ID for this integration."
66
},
67
"priority": {