0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-27 14:16:20 +00:00

Create integrations JSON schema ()

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
This commit is contained in:
Fotis Voutsas 2023-07-07 13:10:20 +03:00 committed by GitHub
parent f26ad7107c
commit 9a5a598855
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 0 deletions
collectors/metadata
docs/.templates/integration

View file

@ -20,6 +20,13 @@
"$ref": "#/$defs/_monitored_instance" "$ref": "#/$defs/_monitored_instance"
} }
}, },
"keywords": {
"type":"array",
"description": "An array of terms related to the integration.",
"items": {
"type":"string"
}
},
"overview": { "overview": {
"type": "object", "type": "object",
"properties": { "properties": {

View file

@ -6,6 +6,8 @@ monitored_instance:
alternative_monitored_instances: alternative_monitored_instances:
- name: "" - name: ""
link: "" link: ""
keywords:
- ""
overview: overview:
data_collection: data_collection:
metrics_description: "" metrics_description: ""

View file

@ -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."
}
}
}
}
}
}