remove collector meta definitions (#15403)
Ilya Mashchenko committed
Jul 14, 2023 at 21:03 UTC
8cc100f70fba859a0e60abbb140f40af3088db35
2 files changed
+234
-249
collectors/metadata/schemas/definitions.json
deleted
-241
@@ -1,241 +0,0 @@
1
-{
2
- "definitions": {
3
- "monitored_instance": {
4
- "type": "object",
5
- "description": "Information about the monitored instance (metrics source).",
6
- "properties": {
7
- "name": {
8
- "description": "Metrics source name (e.g. VerneMQ, Network interfaces, Files and directories). Use official spelling for applications.",
9
- "type": "string"
10
- },
11
- "link": {
12
- "description": "Link to the monitored instance official website if any.",
13
- "type": "string"
14
- },
15
- "categories": {
16
- "type": "array",
17
- "description": "Category IDs that this integration falls into. Category IDs can be found at integrations/categories.yaml.",
18
- "items": {
19
- "$ref": "#/definitions/category"
20
- }
21
- },
22
- "icon_filename": {
23
- "type": "string",
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_filename"
32
- ]
33
- },
34
- "category": {
35
- "type": "string",
36
- "description": "String defining integration category"
37
- },
38
- "alerts": {
39
- "type": "array",
40
- "description": "The list of configured alerts shipped with Netdata for this collector.",
41
- "items": {
42
- "type": "object",
43
- "description": "Information about the configured alert.",
44
- "properties": {
45
- "name": {
46
- "type": "string",
47
- "description": "Alert's 'alarm' or 'template' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-alarm-or-template)."
48
- },
49
- "link": {
50
- "type": "string",
51
- "description": "Link to github .conf file that this alert originates from"
52
- },
53
- "metric": {
54
- "type": "string",
55
- "description": "Alert's 'on' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-on)."
56
- },
57
- "info": {
58
- "type": "string",
59
- "description": "Alert's 'info' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-info)."
60
- },
61
- "os": {
62
- "type": "string",
63
- "description": "Alert's 'os' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-os)."
64
- }
65
- },
66
- "required": [
67
- "name",
68
- "link",
69
- "metric",
70
- "info"
71
- ]
72
- }
73
- },
74
- "metrics": {
75
- "type": "object",
76
- "description": "Collected metrics grouped by scope. The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.",
77
- "properties": {
78
- "folding": {
79
- "$ref": "#/definitions/folding"
80
- },
81
- "description": {
82
- "type": "string",
83
- "description": "General description of collected metrics/scopes."
84
- },
85
- "availability": {
86
- "type": "array",
87
- "description": "Metrics collection availability conditions. Some metrics are only available when certain conditions are met. For example, Apache exposes additional metrics when Extended status is configured, Consul exposes different set of metrics depends on its mode. This field should list the available conditions that will later be matched for each of the metrics.",
88
- "items": {
89
- "type": "string",
90
- "description": "Availability condition name."
91
- }
92
- },
93
- "scopes": {
94
- "type": "array",
95
- "description": "List of scopes and their metrics.",
96
- "items": {
97
- "type": "object",
98
- "properties": {
99
- "name": {
100
- "type": "string",
101
- "description": "Scope name."
102
- },
103
- "description": {
104
- "type": "string",
105
- "description": "Scope description."
106
- },
107
- "labels": {
108
- "type": "array",
109
- "description": "Label set of the scope.",
110
- "items": {
111
- "type": "object",
112
- "properties": {
113
- "name": {
114
- "type": "string",
115
- "description": "Label name."
116
- },
117
- "description": {
118
- "type": "string",
119
- "description": "Label description."
120
- }
121
- },
122
- "required": [
123
- "name",
124
- "description"
125
- ]
126
- }
127
- },
128
- "metrics": {
129
- "type": "array",
130
- "description": "List of collected metrics (chart contexts) in the scope.",
131
- "items": {
132
- "type": "object",
133
- "properties": {
134
- "name": {
135
- "type": "string",
136
- "description": "Metric name (chart context)."
137
- },
138
- "availability": {
139
- "type": "array",
140
- "description": "Metric collection availability conditions. An empty list means that it is available for all conditions defined in 'metrics.availability'.",
141
- "items": {
142
- "type": "string",
143
- "description": "Availability condition name."
144
- }
145
- },
146
- "description": {
147
- "type": "string",
148
- "description": "Metric description (chart title)."
149
- },
150
- "unit": {
151
- "type": "string",
152
- "description": "Metric description (chart unit)."
153
- },
154
- "chart_type": {
155
- "type": "string",
156
- "description": "Metric description (chart type)."
157
- },
158
- "dimensions": {
159
- "type": "array",
160
- "description": "",
161
- "items": {
162
- "type": "object",
163
- "properties": {
164
- "name": {
165
- "type": "string",
166
- "description": "Dimension name."
167
- }
168
- },
169
- "required": [
170
- "name"
171
- ]
172
- }
173
- }
174
- },
175
- "required": [
176
- "name",
177
- "description",
178
- "unit",
179
- "chart_type",
180
- "dimensions"
181
- ]
182
- }
183
- }
184
- },
185
- "required": [
186
- "name",
187
- "description",
188
- "labels",
189
- "metrics"
190
- ]
191
- }
192
- }
193
- },
194
- "required": [
195
- "folding",
196
- "description",
197
- "availability",
198
- "scopes"
199
- ]
200
- },
201
- "folding": {
202
- "type": "object",
203
- "description": "Content folding settings.",
204
- "properties": {
205
- "title": {
206
- "description": "Folded content summary title.",
207
- "type": "string"
208
- },
209
- "enabled": {
210
- "description": "Determines if this content should be folded.",
211
- "type": "boolean"
212
- }
213
- },
214
- "required": [
215
- "title",
216
- "enabled"
217
- ]
218
- },
219
- "folding_relaxed": {
220
- "type": "object",
221
- "description": "Content folding settings with optional title.",
222
- "properties": {
223
- "title": {
224
- "description": "Folded content summary title.",
225
- "type": "string"
226
- },
227
- "enabled": {
228
- "description": "Determines if this content should be folded.",
229
- "type": "boolean"
230
- }
231
- },
232
- "required": [
233
- "enabled"
234
- ]
235
- },
236
- "non-empty-string": {
237
- "type": "string",
238
- "minLength": 2
239
- }
240
- }
241
-}
collectors/metadata/schemas/single-module.json
+234
-8
@@ -15,12 +15,12 @@
15
"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)."
16
},
17
"monitored_instance": {
18
- "$ref": "./definitions.json#/definitions/monitored_instance"
18
+ "$ref": "#/$defs/_monitored_instance"
19
},
20
"alternative_monitored_instances": {
21
"type": "array",
22
"items": {
23
- "$ref": "./definitions.json#/definitions/monitored_instance"
23
+ "$ref": "#/$defs/_monitored_instance"
24
}
25
},
26
"keywords": {
@@ -281,7 +281,7 @@
281
"description": "Optional common information about options."
282
},
283
"folding": {
284
- "$ref": "./definitions.json#/definitions/folding"
284
+ "$ref": "#/$defs/_folding"
285
},
286
"list": {
287
"type": "array",
@@ -333,7 +333,7 @@
333
"description": "Configuration examples. The more examples the better!",
334
"properties": {
335
"folding": {
336
- "$ref": "./definitions.json#/definitions/folding"
336
+ "$ref": "#/$defs/_folding"
337
},
338
"list": {
339
"type": "array",
@@ -346,7 +346,7 @@
346
"description": "Example name."
347
},
348
"folding": {
349
- "$ref": "./definitions.json#/definitions/folding_relaxed"
349
+ "$ref": "#/$defs/_folding_relaxed"
350
},
351
"description": {
352
"type": "string",
@@ -423,10 +423,167 @@
423
]
424
},
425
"alerts": {
426
- "$ref": "./definitions.json#/definitions/alerts"
426
+ "type": "array",
427
+ "description": "The list of configured alerts shipped with Netdata for this collector.",
428
+ "items": {
429
+ "type": "object",
430
+ "description": "Information about the configured alert.",
431
+ "properties": {
432
+ "name": {
433
+ "type": "string",
434
+ "description": "Alert's 'alarm' or 'template' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-alarm-or-template)."
435
+ },
436
+ "link": {
437
+ "type": "string",
438
+ "description": "Link to github .conf file that this alert originates from"
439
+ },
440
+ "metric": {
441
+ "type": "string",
442
+ "description": "Alert's 'on' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-on)."
443
+ },
444
+ "info": {
445
+ "type": "string",
446
+ "description": "Alert's 'info' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-info)."
447
+ },
448
+ "os": {
449
+ "type": "string",
450
+ "description": "Alert's 'os' value (https://learn.netdata.cloud/docs/alerting/health-configuration-reference#alarm-line-os)."
451
+ }
452
+ },
453
+ "required": [
454
+ "name",
455
+ "link",
456
+ "metric",
457
+ "info"
458
+ ]
459
+ }
460
},
461
"metrics": {
429
- "$ref": "./definitions.json#/definitions/metrics"
462
+ "type": "object",
463
+ "description": "Collected metrics grouped by scope. The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.",
464
+ "properties": {
465
+ "folding": {
466
+ "$ref": "#/$defs/_folding"
467
+ },
468
+ "description": {
469
+ "type": "string",
470
+ "description": "General description of collected metrics/scopes."
471
+ },
472
+ "availability": {
473
+ "type": "array",
474
+ "description": "Metrics collection availability conditions. Some metrics are only available when certain conditions are met. For example, Apache exposes additional metrics when Extended status is configured, Consul exposes different set of metrics depends on its mode. This field should list the available conditions that will later be matched for each of the metrics.",
475
+ "items": {
476
+ "type": "string",
477
+ "description": "Availability condition name."
478
+ }
479
+ },
480
+ "scopes": {
481
+ "type": "array",
482
+ "description": "List of scopes and their metrics.",
483
+ "items": {
484
+ "type": "object",
485
+ "properties": {
486
+ "name": {
487
+ "type": "string",
488
+ "description": "Scope name."
489
+ },
490
+ "description": {
491
+ "type": "string",
492
+ "description": "Scope description."
493
+ },
494
+ "labels": {
495
+ "type": "array",
496
+ "description": "Label set of the scope.",
497
+ "items": {
498
+ "type": "object",
499
+ "properties": {
500
+ "name": {
501
+ "type": "string",
502
+ "description": "Label name."
503
+ },
504
+ "description": {
505
+ "type": "string",
506
+ "description": "Label description."
507
+ }
508
+ },
509
+ "required": [
510
+ "name",
511
+ "description"
512
+ ]
513
+ }
514
+ },
515
+ "metrics": {
516
+ "type": "array",
517
+ "description": "List of collected metrics (chart contexts) in the scope.",
518
+ "items": {
519
+ "type": "object",
520
+ "properties": {
521
+ "name": {
522
+ "type": "string",
523
+ "description": "Metric name (chart context)."
524
+ },
525
+ "availability": {
526
+ "type": "array",
527
+ "description": "Metric collection availability conditions. An empty list means that it is available for all conditions defined in 'metrics.availability'.",
528
+ "items": {
529
+ "type": "string",
530
+ "description": "Availability condition name."
531
+ }
532
+ },
533
+ "description": {
534
+ "type": "string",
535
+ "description": "Metric description (chart title)."
536
+ },
537
+ "unit": {
538
+ "type": "string",
539
+ "description": "Metric description (chart unit)."
540
+ },
541
+ "chart_type": {
542
+ "type": "string",
543
+ "description": "Metric description (chart type)."
544
+ },
545
+ "dimensions": {
546
+ "type": "array",
547
+ "description": "",
548
+ "items": {
549
+ "type": "object",
550
+ "properties": {
551
+ "name": {
552
+ "type": "string",
553
+ "description": "Dimension name."
554
+ }
555
+ },
556
+ "required": [
557
+ "name"
558
+ ]
559
+ }
560
+ }
561
+ },
562
+ "required": [
563
+ "name",
564
+ "description",
565
+ "unit",
566
+ "chart_type",
567
+ "dimensions"
568
+ ]
569
+ }
570
+ }
571
+ },
572
+ "required": [
573
+ "name",
574
+ "description",
575
+ "labels",
576
+ "metrics"
577
+ ]
578
+ }
579
+ }
580
+ },
581
+ "required": [
582
+ "folding",
583
+ "description",
584
+ "availability",
585
+ "scopes"
586
+ ]
587
}
588
},
589
"required": [
@@ -436,5 +593,74 @@
593
"troubleshooting",
594
"alerts",
595
"metrics"
439
- ]
596
+ ],
597
+ "$defs": {
598
+ "_folding": {
599
+ "type": "object",
600
+ "description": "Content folding settings.",
601
+ "properties": {
602
+ "title": {
603
+ "description": "Folded content summary title.",
604
+ "type": "string"
605
+ },
606
+ "enabled": {
607
+ "description": "Determines if this content should be folded.",
608
+ "type": "boolean"
609
+ }
610
+ },
611
+ "required": [
612
+ "title",
613
+ "enabled"
614
+ ]
615
+ },
616
+ "_folding_relaxed": {
617
+ "type": "object",
618
+ "description": "Content folding settings with optional title.",
619
+ "properties": {
620
+ "title": {
621
+ "description": "Folded content summary title.",
622
+ "type": "string"
623
+ },
624
+ "enabled": {
625
+ "description": "Determines if this content should be folded.",
626
+ "type": "boolean"
627
+ }
628
+ },
629
+ "required": [
630
+ "enabled"
631
+ ]
632
+ },
633
+ "_monitored_instance": {
634
+ "type": "object",
635
+ "description": "Information about the monitored instance (metrics source).",
636
+ "properties": {
637
+ "name": {
638
+ "description": "Metrics source name (e.g. VerneMQ, Network interfaces, Files and directories). Use official spelling for applications.",
639
+ "type": "string"
640
+ },
641
+ "link": {
642
+ "description": "Link to the monitored instance official website if any.",
643
+ "type": "string"
644
+ },
645
+ "categories": {
646
+ "type": "array",
647
+ "description": "Category IDs that this integration falls into. IDs can be found in integrations/categories.yaml",
648
+ "items": {
649
+ "type": "string",
650
+ "description": "String defining integration category"
651
+ }
652
+ },
653
+ "icon_filename": {
654
+ "type": "string",
655
+ "description": "The filename of the integration's icon, as sourced from https://github.com/netdata/website/tree/master/themes/tailwind/static/img."
656
+ }
657
+ },
658
+ "required": [
659
+ "name",
660
+ "link",
661
+ "categories",
662
+ "icon_filename"
663
+ ]
664
+ }
665
+ }
666
}