Commit 20bc7611 authored by Ryan Cobb's avatar Ryan Cobb

Add metrics dashboard json schemas

Add metrics dashboard json schemas to be used for metrics dashboard
validation
parent 60b14e0a
{
"type": "object",
"properties": {
"name": { "type": "string" },
"format": {
"type": "string",
"default": "engineering"
},
"precision": {
"type": "number",
"default": 2
}
}
}
{
"type": "object",
"required": ["dashboard", "panel_groups"],
"properties": {
"dashboard": { "type": "string" },
"panel_groups": {
"type": "array",
"items": { "$ref": "./panel_group.json" }
},
"templating": {
"$ref": "./templating.json"
},
"links": {
"type": "array",
"items": { "$ref": "./link.json" }
}
}
}
{
"type": "object",
"required": ["url"],
"properties": {
"url": { "type": "string" },
"title": { "type": "string" },
"type": {
"type": "string",
"enum": ["grafana"]
}
}
}
{
"type": "object",
"required": ["unit"],
"oneOf": [{ "required": ["query"] }, { "required": ["query_range"] }],
"properties": {
"id": {
"type": "string",
"format": "add_to_metric_id_cache"
},
"unit": { "type": "string" },
"label": { "type": "string" },
"query": { "type": "string" },
"query_range": { "type": "string" },
"step": { "type": "number" }
}
}
{
"type": "object",
"required": ["title", "metrics"],
"properties": {
"type": {
"type": "string",
"enum": ["area-chart", "anomaly-chart", "bar", "column", "stacked-column", "single-stat", "heatmap"],
"default": "area-chart"
},
"title": { "type": "string" },
"y_label": { "type": "string" },
"y_axis": { "$ref": "./axis.json" },
"max_value": { "type": "number" },
"weight": { "type": "number" },
"metrics": {
"type": "array",
"items": { "$ref": "./metric.json" }
},
"links": {
"type": "array",
"items": { "$ref": "./link.json" }
}
}
}
{
"type": "object",
"required": ["group", "panels"],
"properties": {
"group": { "type": "string" },
"priority": { "type": "number" },
"panels": {
"type": "array",
"items": { "$ref": "./panel.json" }
}
}
}
{
"type": "object",
"required": ["variables"],
"properties": {
"variables": { "type": "object" }
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment