diff options
author | Fotis Voutsas <fotis@netdata.cloud> | 2023-07-07 13:10:20 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 13:10:20 +0300 |
commit | 9a5a59885530822f16ccd8cacb1aeaafe934db45 (patch) | |
tree | c38e664b7ce18ac48dcf831bf04cf465dae850f5 /docs | |
parent | f26ad7107ca7a20407a3a94ba40d05ad0aee1425 (diff) |
Create integrations JSON schema (#15302)
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/.templates/integration/schema.json | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/docs/.templates/integration/schema.json b/docs/.templates/integration/schema.json new file mode 100644 index 0000000000..f4a5e96d2e --- /dev/null +++ b/docs/.templates/integration/schema.json @@ -0,0 +1,124 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "title": "Netdata Integrations file", + "properties": { + "categories": { + "type": "object", + "description": "A list defining all the available categories for the integrations.", + "properties": { + "list": { + "type": "array", + "items": { + "type": "object", + "description": "The concept of IDs between categories is used, so we can handle nested categories. That way they will be able to mention their parent, and we should be able to make the structure of categories. Every category's ID will be used by the various integrations too to mention in which category they lie. Along with this, a priority field is needed to define the ordering on a menu-level.", + "properties": { + "name": { + "type": "string", + "description": "Name of the category. This is the actual name of the category or subcategory, (e.g. Web Servers, Operating Systems, Databases)." + }, + "limit_results": { + "type": [ + "null", + "integer" + ], + "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." + }, + "icon_name": { + "type": "string", + "description": "The name of the icon from the Netdata UI." + }, + "description": { + "type": "string", + "description": "Text that will be presented below the category title." + }, + "priority": { + "type": "integer", + "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." + }, + "id": { + "type": "integer", + "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." + }, + "parent_id": { + "type": [ + "null", + "integer" + ], + "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." + } + } + } + } + } + }, + "integrations": { + "type": "array", + "description": "A list of integration elements, combination of metadata.yaml and other sources.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "A unique numeric identifier for the integration." + }, + "name": { + "type": "string" + }, + "categories": { + "type": "array", + "description": "an array of categories that the integration belongs to", + "items": { + "type": "object", + "properties": { + "category_id": { + "type": "integer", + "description": "The category_ID for this integration." + }, + "priority": { + "type": "integer", + "description": "Priority for this specific category. Will control where the integration will be positioned in this category" + } + } + } + }, + "icon": { + "type": "string", + "description": "path to the icon for this integration." + }, + "keywords": { + "type": "array", + "description": "An array of terms related to the integration.", + "items": { + "type": "string" + } + }, + "overview": { + "type": "string", + "description": "The text that will go in the top of the page, in markdown format." + }, + "metrics": { + "type": "string", + "description": "Metrics section rendered in markdown format." + }, + "alerts": { + "type": "string", + "description": "Alerts section rendered in markdown format." + }, + "setup": { + "type": "string", + "description": "Setup section rendered in markdown format." + }, + "troubleshooting": { + "type": "string", + "description": "troubleshooting section rendered in markdown format." + }, + "related_resources": { + "type": "string", + "description": "Related Resources section rendered in markdown format." + } + } + } + } + } +}
\ No newline at end of file |