From b29a99a2c721145152439a524b2124c4d976d6a4 Mon Sep 17 00:00:00 2001 From: Chris Goller Date: Thu, 7 Sep 2017 16:49:05 -0500 Subject: [PATCH] Update swagger docs with new kapacitor rule fields --- server/swagger.json | 407 +++++++++++++++++++++++++++++++------------- 1 file changed, 288 insertions(+), 119 deletions(-) diff --git a/server/swagger.json b/server/swagger.json index 79293669d..baed5e911 100644 --- a/server/swagger.json +++ b/server/swagger.json @@ -71,7 +71,8 @@ "Location": { "type": "string", "format": "url", - "description": "Location of the newly created data source resource." + "description": + "Location of the newly created data source resource." } }, "schema": { @@ -103,7 +104,8 @@ "description": "These data sources store time series data.", "responses": { "200": { - "description": "Data source used to supply time series information.", + "description": + "Data source used to supply time series information.", "schema": { "$ref": "#/definitions/Source" } @@ -151,7 +153,8 @@ } }, "404": { - "description": "Happens when trying to access a non-existent data source.", + "description": + "Happens when trying to access a non-existent data source.", "schema": { "$ref": "#/definitions/Error" } @@ -175,7 +178,8 @@ "required": true } ], - "summary": "This specific data source will be removed from the data store. All associated kapacitor resources and kapacitor rules resources are also removed.", + "summary": + "This specific data source will be removed from the data store. All associated kapacitor resources and kapacitor rules resources are also removed.", "responses": { "204": { "description": "data source has been removed" @@ -242,7 +246,8 @@ "/sources/{id}/proxy": { "post": { "tags": ["sources", "proxy"], - "description": "Query the backend time series data source and return the response according to `format`", + "description": + "Query the backend time series data source and return the response according to `format`", "parameters": [ { "name": "id", @@ -263,13 +268,15 @@ ], "responses": { "200": { - "description": "Result of the query from the backend time series data source.", + "description": + "Result of the query from the backend time series data source.", "schema": { "$ref": "#/definitions/ProxyResponse" } }, "400": { - "description": "Any query that results in a data source error (syntax error, etc) will cause this response. The error message will be passed back in the body", + "description": + "Any query that results in a data source error (syntax error, etc) will cause this response. The error message will be passed back in the body", "schema": { "$ref": "#/definitions/Error" } @@ -327,20 +334,23 @@ { "name": "rp", "in": "query", - "description": "Sets the target retention policy for the write. InfluxDB writes to the DEFAULT retention policy if you do not specify a retention policy.", + "description": + "Sets the target retention policy for the write. InfluxDB writes to the DEFAULT retention policy if you do not specify a retention policy.", "type": "string" }, { "name": "precision", "in": "query", - "description": "Sets the precision for the supplied Unix time values. InfluxDB assumes that timestamps are in nanoseconds if you do not specify precision.", + "description": + "Sets the precision for the supplied Unix time values. InfluxDB assumes that timestamps are in nanoseconds if you do not specify precision.", "type": "string", "enum": ["ns", "u", "ms", "s", "m", "h"] }, { "name": "consistency", "in": "query", - "description": "Sets the write consistency for the point. InfluxDB assumes that the write consistency is one if you do not specify consistency. See the InfluxEnterprise documentation for detailed descriptions of each consistency option.", + "description": + "Sets the write consistency for the point. InfluxDB assumes that the write consistency is one if you do not specify consistency. See the InfluxEnterprise documentation for detailed descriptions of each consistency option.", "type": "string", "enum": ["any", "one", "quorum", "all"] } @@ -350,7 +360,8 @@ "description": "Points written successfuly to database." }, "400": { - "description": "Any query that results in a data source error (syntax error, etc) will cause this response. The error message will be passed back in the body", + "description": + "Any query that results in a data source error (syntax error, etc) will cause this response. The error message will be passed back in the body", "schema": { "$ref": "#/definitions/Error" } @@ -572,7 +583,8 @@ } }, "404": { - "description": "Happens when trying to access a non-existent user or source.", + "description": + "Happens when trying to access a non-existent user or source.", "schema": { "$ref": "#/definitions/Error" } @@ -626,7 +638,8 @@ "/sources/{id}/roles": { "get": { "tags": ["sources", "users", "roles"], - "summary": "Retrieve all data sources roles. Available only in Influx Enterprise", + "summary": + "Retrieve all data sources roles. Available only in Influx Enterprise", "parameters": [ { "name": "id", @@ -784,7 +797,8 @@ } }, "404": { - "description": "Happens when trying to access a non-existent role or source.", + "description": + "Happens when trying to access a non-existent role or source.", "schema": { "$ref": "#/definitions/Error" } @@ -1199,7 +1213,8 @@ "Location": { "type": "string", "format": "url", - "description": "Location of the newly created kapacitor resource." + "description": + "Location of the newly created kapacitor resource." } }, "schema": { @@ -1293,7 +1308,8 @@ } }, "404": { - "description": "Happens when trying to access a non-existent data source or kapacitor.", + "description": + "Happens when trying to access a non-existent data source or kapacitor.", "schema": { "$ref": "#/definitions/Error" } @@ -1325,7 +1341,8 @@ } ], "summary": "Remove Kapacitor backend", - "description": "This specific kapacitor will be removed. All associated rule resources will also be removed from the store.", + "description": + "This specific kapacitor will be removed. All associated rule resources will also be removed from the store.", "responses": { "204": { "description": "kapacitor has been removed." @@ -1367,7 +1384,8 @@ ], "responses": { "200": { - "description": "All alert rules for this specific kapacitor are returned", + "description": + "All alert rules for this specific kapacitor are returned", "schema": { "$ref": "#/definitions/Rules" } @@ -1421,7 +1439,8 @@ "Location": { "type": "string", "format": "url", - "description": "Location of the newly created kapacitor rule resource." + "description": + "Location of the newly created kapacitor rule resource." } }, "schema": { @@ -1435,13 +1454,15 @@ } }, "422": { - "description": "Source ID , Kapacitor ID or alert are unprocessable", + "description": + "Source ID , Kapacitor ID or alert are unprocessable", "schema": { "$ref": "#/definitions/Error" } }, "default": { - "description": "Internal server error; generally a problem creating alert in kapacitor", + "description": + "Internal server error; generally a problem creating alert in kapacitor", "schema": { "$ref": "#/definitions/Error" } @@ -1541,7 +1562,8 @@ } }, "404": { - "description": "Happens when trying to access a non-existent data source, kapacitor, or rule.", + "description": + "Happens when trying to access a non-existent data source, kapacitor, or rule.", "schema": { "$ref": "#/definitions/Error" } @@ -1602,7 +1624,8 @@ "/sources/{id}/kapacitors/{kapa_id}/proxy": { "get": { "tags": ["sources", "kapacitors", "proxy"], - "description": "GET to `path` of kapacitor. The response and status code from kapacitor is directly returned.", + "description": + "GET to `path` of kapacitor. The response and status code from kapacitor is directly returned.", "parameters": [ { "name": "id", @@ -1622,7 +1645,8 @@ "name": "path", "in": "query", "type": "string", - "description": "The kapacitor API path to use in the proxy redirect", + "description": + "The kapacitor API path to use in the proxy redirect", "required": true } ], @@ -1646,7 +1670,8 @@ }, "delete": { "tags": ["sources", "kapacitors", "proxy"], - "description": "DELETE to `path` of kapacitor. The response and status code from kapacitor is directly returned.", + "description": + "DELETE to `path` of kapacitor. The response and status code from kapacitor is directly returned.", "parameters": [ { "name": "id", @@ -1666,7 +1691,8 @@ "name": "path", "in": "query", "type": "string", - "description": "The kapacitor API path to use in the proxy redirect", + "description": + "The kapacitor API path to use in the proxy redirect", "required": true } ], @@ -1690,7 +1716,8 @@ }, "patch": { "tags": ["sources", "kapacitors", "proxy"], - "description": "PATCH body directly to configured kapacitor. The response and status code from kapacitor is directly returned.", + "description": + "PATCH body directly to configured kapacitor. The response and status code from kapacitor is directly returned.", "parameters": [ { "name": "id", @@ -1710,7 +1737,8 @@ "name": "path", "in": "query", "type": "string", - "description": "The kapacitor API path to use in the proxy redirect", + "description": + "The kapacitor API path to use in the proxy redirect", "required": true }, { @@ -1743,7 +1771,8 @@ }, "post": { "tags": ["sources", "kapacitors", "proxy"], - "description": "POST body directly to configured kapacitor. The response and status code from kapacitor is directly returned.", + "description": + "POST body directly to configured kapacitor. The response and status code from kapacitor is directly returned.", "parameters": [ { "name": "id", @@ -1763,7 +1792,8 @@ "name": "path", "in": "query", "type": "string", - "description": "The kapacitor API path to use in the proxy redirect", + "description": + "The kapacitor API path to use in the proxy redirect", "required": true }, { @@ -1799,7 +1829,8 @@ "get": { "tags": ["layouts", "mappings"], "summary": "Mappings between app names and measurements", - "description": "Mappings provide a means to alias measurement names found within a telegraf database and application layouts found within Chronograf\n", + "description": + "Mappings provide a means to alias measurement names found within a telegraf database and application layouts found within Chronograf\n", "responses": { "200": { "description": "An array of mappings", @@ -1844,7 +1875,8 @@ "collectionFormat": "multi" } ], - "description": "Layouts are a collection of `Cells` that visualize time-series data.\n", + "description": + "Layouts are a collection of `Cells` that visualize time-series data.\n", "responses": { "200": { "description": "An array of layouts", @@ -1867,7 +1899,8 @@ { "name": "layout", "in": "body", - "description": "Defines the layout and queries of the cells within the layout.", + "description": + "Defines the layout and queries of the cells within the layout.", "schema": { "$ref": "#/definitions/Layout" } @@ -1908,8 +1941,10 @@ "required": true } ], - "summary": "Specific pre-configured layout containing cells and queries.", - "description": "layouts will hold information about how to layout the page of graphs.\n", + "summary": + "Specific pre-configured layout containing cells and queries.", + "description": + "layouts will hold information about how to layout the page of graphs.\n", "responses": { "200": { "description": "Returns the specified layout containing `cells`.", @@ -1984,13 +2019,15 @@ ], "responses": { "200": { - "description": "Layout has been replaced and the new layout is returned.", + "description": + "Layout has been replaced and the new layout is returned.", "schema": { "$ref": "#/definitions/Layout" } }, "404": { - "description": "Happens when trying to access a non-existent layout.", + "description": + "Happens when trying to access a non-existent layout.", "schema": { "$ref": "#/definitions/Error" } @@ -2043,7 +2080,8 @@ "Location": { "type": "string", "format": "url", - "description": "Location of the newly created dashboard resource." + "description": + "Location of the newly created dashboard resource." } }, "schema": { @@ -2072,10 +2110,12 @@ } ], "summary": "Specific dashboard", - "description": "Dashboards contain visual display information as well as links to queries", + "description": + "Dashboards contain visual display information as well as links to queries", "responses": { "200": { - "description": "Returns the specified dashboard with links to queries.", + "description": + "Returns the specified dashboard with links to queries.", "schema": { "$ref": "#/definitions/Dashboard" } @@ -2147,13 +2187,15 @@ ], "responses": { "200": { - "description": "Dashboard has been replaced and the new dashboard is returned.", + "description": + "Dashboard has been replaced and the new dashboard is returned.", "schema": { "$ref": "#/definitions/Dashboard" } }, "404": { - "description": "Happens when trying to access a non-existent dashboard.", + "description": + "Happens when trying to access a non-existent dashboard.", "schema": { "$ref": "#/definitions/Error" } @@ -2169,7 +2211,8 @@ "patch": { "tags": ["layouts"], "summary": "Update dashboard information.", - "description": "Update either the dashboard name or the dashboard cells", + "description": + "Update either the dashboard name or the dashboard cells", "parameters": [ { "name": "id", @@ -2181,7 +2224,8 @@ { "name": "config", "in": "body", - "description": "dashboard configuration update parameters. Must be either name or cells", + "description": + "dashboard configuration update parameters. Must be either name or cells", "schema": { "$ref": "#/definitions/Dashboard" }, @@ -2190,13 +2234,15 @@ ], "responses": { "200": { - "description": "Dashboard has been updated and the new dashboard is returned.", + "description": + "Dashboard has been updated and the new dashboard is returned.", "schema": { "$ref": "#/definitions/Dashboard" } }, "404": { - "description": "Happens when trying to access a non-existent dashboard.", + "description": + "Happens when trying to access a non-existent dashboard.", "schema": { "$ref": "#/definitions/Error" } @@ -2240,7 +2286,8 @@ "shardDuration": "7d", "default": true, "links": { - "self": "/chronograf/v1/ousrces/1/dbs/NOAA_water_database/rps/liquid" + "self": + "/chronograf/v1/ousrces/1/dbs/NOAA_water_database/rps/liquid" } } ], @@ -2337,11 +2384,13 @@ "url": { "type": "string", "format": "url", - "description": "URL for the kapacitor backend (e.g. http://localhost:9092)" + "description": + "URL for the kapacitor backend (e.g. http://localhost:9092)" }, "active": { "type": "boolean", - "description": "Indicates whether the kapacitor is the current kapacitor being used for a source" + "description": + "Indicates whether the kapacitor is the current kapacitor being used for a source" }, "links": { "type": "object", @@ -2353,12 +2402,14 @@ }, "proxy": { "type": "string", - "description": "URL location of proxy endpoint for this kapacitor", + "description": + "URL location of proxy endpoint for this kapacitor", "format": "url" }, "rules": { "type": "string", - "description": "URL location of rules endpoint for this kapacitor", + "description": + "URL location of rules endpoint for this kapacitor", "format": "url" } } @@ -2366,7 +2417,8 @@ } }, "KapacitorProxy": { - "description": "Entirely used as the body for the request to the kapacitor backend.", + "description": + "Entirely used as the body for the request to the kapacitor backend.", "type": "object" }, "KapacitorProxyResponse": { @@ -2392,7 +2444,8 @@ "type": "string", "description": "InfluxQL statement to be analyzed", "example": { - "query": "select max(usage_system) from telegraf.autogen.cpu group by time(10m)" + "query": + "select max(usage_system) from telegraf.autogen.cpu group by time(10m)" } } } @@ -2403,7 +2456,8 @@ "query": { "type": "string", "example": { - "query": "select max(usage_system) from telegraf.autogen.cpu group by time(10m)" + "query": + "select max(usage_system) from telegraf.autogen.cpu group by time(10m)" }, "description": "InfluxQL statement to be analyzed" }, @@ -2563,12 +2617,14 @@ }, "KapacitorProperty": { "type": "object", - "description": "Represents a property attached to a node in the kapacitor TICKscript graph", + "description": + "Represents a property attached to a node in the kapacitor TICKscript graph", "required": ["name"], "properties": { "name": { "type": "string", - "description": "Name of the kapacitor property e.g. channel for a slack ndoe" + "description": + "Name of the kapacitor property e.g. channel for a slack ndoe" }, "args": { "type": "array", @@ -2624,7 +2680,8 @@ }, "default": { "type": "boolean", - "description": "Indicates whether this retention policy should be the default" + "description": + "Indicates whether this retention policy should be the default" }, "links": { "type": "object", @@ -2677,12 +2734,28 @@ "value": "10" }, "name": "Untitled Rule", - "tickscript": "var db = 'telegraf'\n\nvar rp = 'autogen'\n\nvar measurement = 'cpu'\n\nvar groupBy = []\n\nvar whereFilter = lambda: TRUE\n\nvar period = 10m\n\nvar every = 30s\n\nvar name = 'Untitled Rule'\n\nvar idVar = name + ':{{.Group}}'\n\nvar message = 'too much spam'\n\nvar idTag = 'alertID'\n\nvar levelTag = 'level'\n\nvar messageField = 'message'\n\nvar durationField = 'duration'\n\nvar outputDB = 'chronograf'\n\nvar outputRP = 'autogen'\n\nvar outputMeasurement = 'alerts'\n\nvar triggerType = 'threshold'\n\nvar details = 'muh body'\n\nvar crit = 10\n\nvar data = stream\n |from()\n .database(db)\n .retentionPolicy(rp)\n .measurement(measurement)\n .groupBy(groupBy)\n .where(whereFilter)\n |window()\n .period(period)\n .every(every)\n .align()\n |max('usage_system')\n .as('value')\n\nvar trigger = data\n |alert()\n .crit(lambda: \"value\" > crit)\n .stateChangesOnly()\n .message(message)\n .id(idVar)\n .idTag(idTag)\n .levelTag(levelTag)\n .messageField(messageField)\n .durationField(durationField)\n .details(details)\n .alerta()\n\ntrigger\n |influxDBOut()\n .create()\n .database(outputDB)\n .retentionPolicy(outputRP)\n .measurement(outputMeasurement)\n .tag('alertName', name)\n .tag('triggerType', triggerType)\n\ntrigger\n |httpOut('output')\n", - "status": "enabled", + "tickscript": + "var db = 'telegraf'\n\nvar rp = 'autogen'\n\nvar measurement = 'cpu'\n\nvar groupBy = []\n\nvar whereFilter = lambda: TRUE\n\nvar period = 10m\n\nvar every = 30s\n\nvar name = 'Untitled Rule'\n\nvar idVar = name + ':{{.Group}}'\n\nvar message = 'too much spam'\n\nvar idTag = 'alertID'\n\nvar levelTag = 'level'\n\nvar messageField = 'message'\n\nvar durationField = 'duration'\n\nvar outputDB = 'chronograf'\n\nvar outputRP = 'autogen'\n\nvar outputMeasurement = 'alerts'\n\nvar triggerType = 'threshold'\n\nvar details = 'muh body'\n\nvar crit = 10\n\nvar data = stream\n |from()\n .database(db)\n .retentionPolicy(rp)\n .measurement(measurement)\n .groupBy(groupBy)\n .where(whereFilter)\n |window()\n .period(period)\n .every(every)\n .align()\n |max('usage_system')\n .as('value')\n\nvar trigger = data\n |alert()\n .crit(lambda: \"value\" > crit)\n .stateChangesOnly()\n .message(message)\n .id(idVar)\n .idTag(idTag)\n .levelTag(levelTag)\n .messageField(messageField)\n .durationField(durationField)\n .details(details)\n .alerta()\n\ntrigger\n |influxDBOut()\n .create()\n .database(outputDB)\n .retentionPolicy(outputRP)\n .measurement(outputMeasurement)\n .tag('alertName', name)\n .tag('triggerType', triggerType)\n\ntrigger\n |httpOut('output')\n", + "type": "stream", + "dbrps": [ + { + "db": "telegraf", + "rp": "autogen" + } + ], + "status": "disabled", + "executing": false, + "error": "", + "created": "2017-05-05T16:16:03.471138388-05:00", + "modified": "2017-05-23T15:57:42.625909746-05:00", + "last-enabled": "2017-05-05T16:16:25.890210217-05:00", "links": { - "self": "/chronograf/v1/sources/5/kapacitors/5/rules/chronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38", - "kapacitor": "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38", - "output": "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38%2Foutput" + "self": + "/chronograf/v1/sources/5/kapacitors/5/rules/chronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38", + "kapacitor": + "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38", + "output": + "/chronograf/v1/sources/5/kapacitors/5/proxy?path=%2Fkapacitor%2Fv1%2Ftasks%2Fchronograf-v1-b2b065ea-79bd-4e4f-8c0d-d0ef68477d38%2Foutput" } }, "required": ["query", "every", "trigger"], @@ -2700,11 +2773,13 @@ }, "every": { "type": "string", - "description": "Golang duration string specifying how often the alert condition is checked" + "description": + "Golang duration string specifying how often the alert condition is checked" }, "alerts": { "type": "array", - "description": "Array of alerting services to warn if the alert is triggered", + "description": + "Array of alerting services to warn if the alert is triggered", "items": { "type": "string", "enum": [ @@ -2718,8 +2793,11 @@ "smtp", "email", "exec", + "log", + "pushover", "sensu", "slack", + "smtp", "talk", "telegram", "tcp" @@ -2739,11 +2817,13 @@ }, "details": { "type": "string", - "description": "Template for constructing a detailed HTML message for the alert. (Currently, only used for email/smtp" + "description": + "Template for constructing a detailed HTML message for the alert. (Currently, only used for email/smtp" }, "trigger": { "type": "string", - "description": "Trigger defines the alerting structure; deadman alert if no data are received for the specified time range; relative alert if the data change relative to the data in a different time range; threshold alert if the data cross a boundary", + "description": + "Trigger defines the alerting structure; deadman alert if no data are received for the specified time range; relative alert if the data change relative to the data in a different time range; threshold alert if the data cross a boundary", "enum": ["deadman", "relative", "threshold"] }, "values": { @@ -2756,11 +2836,13 @@ "enum": ["% change", "change"] }, "period": { - "description": "Length of time before deadman is alerted (golang duration)", + "description": + "Length of time before deadman is alerted (golang duration)", "type": "string" }, "shift": { - "description": "Amount of time to look into the past to compare to the present (golang duration)", + "description": + "Amount of time to look into the past to compare to the present (golang duration)", "type": "string" }, "operator": { @@ -2778,7 +2860,8 @@ ] }, "value": { - "description": "Value is the boundary value when alert goes critical", + "description": + "Value is the boundary value when alert goes critical", "type": "string" }, "rangeValue": { @@ -2787,15 +2870,57 @@ } } }, + "dbrps": { + "type": "array", + "description": + "List of database retention policy pairs the task is allowed to access.", + "items": { + "$ref": "#/definitions/DBRP" + } + }, "tickscript": { "type": "string", "description": "TICKscript representing this rule" }, "status": { "type": "string", - "description": "Represents if this rule is enabled or disabled in kapacitor", + "description": + "Represents if this rule is enabled or disabled in kapacitor", "enum": ["enabled", "disabled"] }, + "executing": { + "type": "boolean", + "description": "Whether the task is currently executing.", + "readOnly": true + }, + "type": { + "type": "string", + "description": + "Represents the task type where stream is data streamed to kapacitor and batch is queried by kapacitor.", + "enum": ["stream", "batch"] + }, + "error": { + "type": "string", + "description": + "Any error encountered when kapacitor executes the task.", + "readOnly": true + }, + "created": { + "type": "string", + "description": "Date the task was first created", + "readOnly": true + }, + "modified": { + "type": "string", + "description": "Date the task was last modified", + "readOnly": true + }, + "last-enabled": { + "type": "string", + "description": "Date the task was last set to status enabled", + "readOnly": true + }, + "links": { "type": "object", "required": ["self", "kapacitor"], @@ -2806,12 +2931,14 @@ "format": "uri" }, "kapacitor": { - "description": "Link pointing to the kapacitor proxy for this rule including the path query parameter.", + "description": + "Link pointing to the kapacitor proxy for this rule including the path query parameter.", "type": "string", "format": "uri" }, "output": { - "description": "Link pointing to the kapacitor httpOut node of the tickscript; includes the path query argument", + "description": + "Link pointing to the kapacitor httpOut node of the tickscript; includes the path query argument", "type": "string", "format": "uri" } @@ -2819,17 +2946,20 @@ } } }, - "Sources": { + "DBRP": { "type": "object", - "required": ["sources"], + "description": "Database retention policy pair", "properties": { - "sources": { - "type": "array", - "items": { - "$ref": "#/definitions/Source" - } + "db": { + "description": "Database name", + "type": "string" + }, + "rp": { + "description": "Retention policy", + "type": "string" } - } + }, + "required": ["db", "rp"] }, "Source": { "type": "object", @@ -2854,7 +2984,8 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier representing a specific data source.", + "description": + "Unique identifier representing a specific data source.", "readOnly": true }, "name": { @@ -2877,12 +3008,14 @@ }, "sharedSecret": { "type": "string", - "description": "JWT signing secret for optional Authorization: Bearer to InfluxDB" + "description": + "JWT signing secret for optional Authorization: Bearer to InfluxDB" }, "url": { "type": "string", "format": "url", - "description": "URL for the time series data source backend (e.g. http://localhost:8086)" + "description": + "URL for the time series data source backend (e.g. http://localhost:8086)" }, "metaUrl": { "type": "string", @@ -2891,7 +3024,8 @@ }, "insecureSkipVerify": { "type": "boolean", - "description": "True means any certificate presented by the source is accepted. Typically used for self-signed certs. Probably should only be used for testing." + "description": + "True means any certificate presented by the source is accepted. Typically used for self-signed certs. Probably should only be used for testing." }, "default": { "type": "boolean", @@ -2899,7 +3033,8 @@ }, "telegraf": { "type": "string", - "description": "Database where telegraf information is stored for this source", + "description": + "Database where telegraf information is stored for this source", "default": "telegraf" }, "links": { @@ -2922,27 +3057,32 @@ }, "queries": { "type": "string", - "description": "URL location of the queries endpoint for this source", + "description": + "URL location of the queries endpoint for this source", "format": "url" }, "kapacitors": { "type": "string", - "description": "URL location of the kapacitors endpoint for this source", + "description": + "URL location of the kapacitors endpoint for this source", "format": "url" }, "users": { "type": "string", - "description": "URL location of the users endpoint for this source", + "description": + "URL location of the users endpoint for this source", "format": "url" }, "permissions": { "type": "string", - "description": "URL location of the permissions endpoint for this source", + "description": + "URL location of the permissions endpoint for this source", "format": "url" }, "roles": { "type": "string", - "description": "Optional path to the roles endpoint IFF it is supported on this source", + "description": + "Optional path to the roles endpoint IFF it is supported on this source", "format": "url" } } @@ -2980,7 +3120,8 @@ }, "tempVars": { "type": "array", - "description": "Template variables to replace within an InfluxQL query", + "description": + "Template variables to replace within an InfluxQL query", "items": { "$ref": "#/definitions/TemplateVariable" } @@ -2989,7 +3130,8 @@ }, "TemplateVariable": { "type": "object", - "description": "Named variable within an InfluxQL query to be replaced with values", + "description": + "Named variable within an InfluxQL query to be replaced with values", "properties": { "tempVar": { "type": "string", @@ -3006,7 +3148,8 @@ }, "TemplateValue": { "type": "object", - "description": "Value use to replace a template in an InfluxQL query. The type governs the output format", + "description": + "Value use to replace a template in an InfluxQL query. The type governs the output format", "properties": { "value": { "type": "string", @@ -3015,7 +3158,8 @@ "type": { "type": "string", "enum": ["csv", "tagKey", "tagValue", "fieldKey", "timeStamp"], - "description": "The type will change the format of the output value. tagKey/fieldKey are double quoted; tagValue are single quoted; csv and timeStamp are not quoted." + "description": + "The type will change the format of the output value. tagKey/fieldKey are double quoted; tagValue are single quoted; csv and timeStamp are not quoted." } } }, @@ -3284,25 +3428,29 @@ } }, "Permissions": { - "description": "Permissions represent the entire set of permissions a User or Role may have", + "description": + "Permissions represent the entire set of permissions a User or Role may have", "type": "array", "items": { "$ref": "#/definitions/Permission" } }, "Permission": { - "description": "Permission is a specific allowance for User or Role bound to a scope of the data source", + "description": + "Permission is a specific allowance for User or Role bound to a scope of the data source", "type": "object", "required": ["scope", "allowed"], "properties": { "scope": { "type": "string", - "description": "Describes if the permission is for all databases or restricted to one database", + "description": + "Describes if the permission is for all databases or restricted to one database", "enum": ["all", "database"] }, "name": { "type": "string", - "description": "If the scope is database this identifies the name of the database" + "description": + "If the scope is database this identifies the name of the database" }, "allowed": { "$ref": "#/definitions/Allowances" @@ -3315,7 +3463,8 @@ } }, "AllPermissions": { - "description": "All possible permissions for this particular datasource. Used as a static list", + "description": + "All possible permissions for this particular datasource. Used as a static list", "type": "object", "properties": { "permissions": { @@ -3339,11 +3488,13 @@ } }, "Allowances": { - "description": "Allowances defines what actions a user can have on a scoped permission", + "description": + "Allowances defines what actions a user can have on a scoped permission", "type": "array", "items": { "type": "string", - "description": "OSS InfluxDB is READ and WRITE. Enterprise is all others", + "description": + "OSS InfluxDB is READ and WRITE. Enterprise is all others", "enum": [ "READ", "WRITE", @@ -3387,7 +3538,8 @@ "properties": { "id": { "type": "string", - "description": "ID is an opaque string that uniquely identifies this layout." + "description": + "ID is an opaque string that uniquely identifies this layout." }, "app": { "type": "string", @@ -3395,7 +3547,8 @@ }, "measurement": { "type": "string", - "description": "Measurement is the descriptive name of the time series data." + "description": + "Measurement is the descriptive name of the time series data." }, "cells": { "type": "array", @@ -3423,11 +3576,13 @@ "name": "Docker - Container Network", "queries": [ { - "query": "SELECT derivative(mean(\"tx_bytes\"), 10s) AS \"net_tx_bytes\" FROM \"docker_container_net\"", + "query": + "SELECT derivative(mean(\"tx_bytes\"), 10s) AS \"net_tx_bytes\" FROM \"docker_container_net\"", "groupbys": ["\"container_name\""] }, { - "query": "SELECT derivative(mean(\"rx_bytes\"), 10s) AS \"net_rx_bytes\" FROM \"docker_container_net\"", + "query": + "SELECT derivative(mean(\"rx_bytes\"), 10s) AS \"net_rx_bytes\" FROM \"docker_container_net\"", "groupbys": ["\"container_name\""] } ], @@ -3461,7 +3616,8 @@ "type": "string" }, "name": { - "description": "The application name which will be assigned to the corresponding measurement", + "description": + "The application name which will be assigned to the corresponding measurement", "type": "string" } }, @@ -3523,7 +3679,8 @@ "name": "usage_user", "queries": [ { - "query": "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", + "query": + "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", "label": "%" } ], @@ -3575,7 +3732,8 @@ }, "example": { "label": "# warnings", - "query": "SELECT count(\"check_id\") as \"Number Warning\" FROM consul_health_checks", + "query": + "SELECT count(\"check_id\") as \"Number Warning\" FROM consul_health_checks", "wheres": ["\"status\" = 'warning'"], "groupbys": ["\"service_name\""] } @@ -3623,7 +3781,8 @@ "name": "", "queries": [ { - "query": "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", + "query": + "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", "label": "%", "queryConfig": { "database": "", @@ -3782,7 +3941,8 @@ "name": "usage_user", "queries": [ { - "query": "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", + "query": + "SELECT mean(\"usage_user\") AS \"usage_user\" FROM \"cpu\"", "db": "telegraf", "label": "%" } @@ -3797,7 +3957,8 @@ "name": "usage_system", "queries": [ { - "query": "SELECT mean(\"usage_system\") AS \"usage_system\" FROM \"cpu\"", + "query": + "SELECT mean(\"usage_system\") AS \"usage_system\" FROM \"cpu\"", "db": "telegraf", "label": "%" } @@ -3819,7 +3980,8 @@ "type": "array", "minItems": 0, "maxItems": 2, - "description": "The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits", + "description": + "The extents of an axis in the form [lower, upper]. Clients determine whether bounds are to be inclusive or exclusive of their limits", "items": { "type": "integer", "format": "int64" @@ -3830,19 +3992,23 @@ "type": "string" }, "prefix": { - "description": "Prefix represents a label prefix for formatting axis values.", + "description": + "Prefix represents a label prefix for formatting axis values.", "type": "string" }, "suffix": { - "description": "Suffix represents a label suffix for formatting axis values.", + "description": + "Suffix represents a label suffix for formatting axis values.", "type": "string" }, "base": { - "description": "Base represents the radix for formatting axis values.", + "description": + "Base represents the radix for formatting axis values.", "type": "string" }, "scale": { - "description": "Scale is the axis formatting scale. Supported: \"log\", \"linear\"", + "description": + "Scale is the axis formatting scale. Supported: \"log\", \"linear\"", "type": "string" } } @@ -3876,16 +4042,19 @@ "format": "url" }, "external": { - "description": "external links provided to client, ex. status feed URL", + "description": + "external links provided to client, ex. status feed URL", "type": "object", "properties": { "statusFeed": { - "description": "link to a JSON Feed for the News Feed on client's Status Page", + "description": + "link to a JSON Feed for the News Feed on client's Status Page", "type": "string", "format": "url" }, "custom": { - "description": "a collection of custom links set by the user to be rendered in the client User menu", + "description": + "a collection of custom links set by the user to be rendered in the client User menu", "type": "array", "items": { "type": "object",