This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/alert-rule-set.schema.json",
|
||||
"title": "Pulse alert rule set",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["schemaVersion", "rules"],
|
||||
"properties": {
|
||||
"schemaVersion": {"const": 1},
|
||||
"rules": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "alert-rule.schema.json"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/alert-rule.schema.json",
|
||||
"title": "Pulse alert rule",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"id",
|
||||
"name",
|
||||
"enabled",
|
||||
"severity",
|
||||
"scope",
|
||||
"condition",
|
||||
"evaluationIntervalSeconds",
|
||||
"pendingSeconds",
|
||||
"resolveSeconds",
|
||||
"unknownBehavior",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 160
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"attention",
|
||||
"degraded",
|
||||
"critical"
|
||||
]
|
||||
},
|
||||
"scope": {
|
||||
"type": "object",
|
||||
"maxProperties": 20
|
||||
},
|
||||
"condition": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"inputType",
|
||||
"operator"
|
||||
],
|
||||
"properties": {
|
||||
"inputType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"metric",
|
||||
"entity-status",
|
||||
"event",
|
||||
"datasource-health"
|
||||
]
|
||||
},
|
||||
"metric": {
|
||||
"type": "string",
|
||||
"maxLength": 160
|
||||
},
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<=",
|
||||
"==",
|
||||
"!=",
|
||||
"matches",
|
||||
"absent"
|
||||
]
|
||||
},
|
||||
"threshold": {
|
||||
"type": [
|
||||
"number",
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"recoveryThreshold": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"aggregation": {
|
||||
"type": "string",
|
||||
"maxLength": 40
|
||||
},
|
||||
"windowSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 2592000
|
||||
}
|
||||
}
|
||||
},
|
||||
"evaluationIntervalSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 5,
|
||||
"maximum": 3600
|
||||
},
|
||||
"pendingSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 2592000
|
||||
},
|
||||
"cooldownSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 2592000
|
||||
},
|
||||
"resolveSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 2592000
|
||||
},
|
||||
"unknownBehavior": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"retain-firing-as-unknown",
|
||||
"become-unknown",
|
||||
"ignore-short-gap"
|
||||
]
|
||||
},
|
||||
"groupBy": {
|
||||
"type": "array",
|
||||
"maxItems": 10,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 80
|
||||
}
|
||||
},
|
||||
"suppressWhen": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 160
|
||||
}
|
||||
},
|
||||
"message": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"titleKey",
|
||||
"bodyKey"
|
||||
],
|
||||
"properties": {
|
||||
"titleKey": {
|
||||
"type": "string",
|
||||
"maxLength": 160
|
||||
},
|
||||
"bodyKey": {
|
||||
"type": "string",
|
||||
"maxLength": 160
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://pulse.example.com/specs/api-routes.json",
|
||||
"title": "ITWorx Pulse registered API route inventory",
|
||||
"type": "object",
|
||||
"version": 1,
|
||||
"basePath": "/api/v1",
|
||||
"routes": [
|
||||
{"method":"GET","path":"/healthz","registration":"/healthz","access":"public","implementation":"internal/service/health.go"},
|
||||
{"method":"GET","path":"/readyz","registration":"/readyz","access":"public","implementation":"internal/service/health.go"},
|
||||
{"method":"GET","path":"/auth/login","registration":"/auth/login","access":"public-oidc","implementation":"internal/authapi/handler.go"},
|
||||
{"method":"GET","path":"/auth/callback","registration":"/auth/callback","access":"public-oidc","implementation":"internal/authapi/handler.go"},
|
||||
{"method":"GET","path":"/auth/test-login","registration":"/auth/test-login","access":"development-only","implementation":"cmd/api/main.go"},
|
||||
{"method":"POST","path":"/session/logout","registration":"/session/logout","access":"session","implementation":"cmd/api/main.go"},
|
||||
|
||||
{"method":"GET","path":"/api/v1/system/status","registration":"/api/v1/system/status","access":"view","implementation":"internal/systemstatusapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/system/diagnostics","registration":"/api/v1/system/diagnostics","access":"operate","implementation":"internal/systemstatusapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/system/metrics","registration":"/api/v1/system/metrics","access":"operate","implementation":"internal/observability/metrics.go"},
|
||||
{"method":"GET","path":"/api/v1/system/backups","registration":"/api/v1/system/backups","access":"admin","implementation":"internal/backupapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/system/backups","registration":"/api/v1/system/backups","access":"admin","implementation":"internal/backupapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/onboarding","registration":"/api/v1/onboarding","access":"view","implementation":"internal/onboardingapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/onboarding","registration":"/api/v1/onboarding","access":"admin","implementation":"internal/onboardingapi/handler.go"},
|
||||
|
||||
{"method":"GET","path":"/api/v1/widgets/catalog","registration":"/api/v1/widgets/catalog","access":"view","implementation":"internal/widgetapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/widgets/preview","registration":"/api/v1/widgets/preview","access":"edit","implementation":"internal/widgetapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/metrics/catalog","registration":"/api/v1/metrics/catalog","access":"view","implementation":"internal/metricsapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/metrics/query","registration":"/api/v1/metrics/query","access":"view","implementation":"internal/metricquery/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/metrics/query-range","registration":"/api/v1/metrics/query-range","access":"view","implementation":"internal/metricquery/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/metrics/inspect","registration":"/api/v1/metrics/inspect","access":"operate","implementation":"internal/metricquery/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/live","registration":"/api/v1/live","access":"view-websocket","implementation":"internal/live/live.go"},
|
||||
|
||||
{"method":"GET","path":"/api/v1/dashboards","registration":"/api/v1/dashboards","access":"view","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/dashboards","registration":"/api/v1/dashboards","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/dashboards/{id}","registration":"/api/v1/dashboards/","access":"view","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"PATCH","path":"/api/v1/dashboards/{id}","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"DELETE","path":"/api/v1/dashboards/{id}","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"PUT","path":"/api/v1/dashboards/{id}/document","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/dashboards/{id}/preview","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/dashboards/{id}/clone","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/dashboards/{id}/versions","registration":"/api/v1/dashboards/","access":"view","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/dashboards/{id}/versions/{version}","registration":"/api/v1/dashboards/","access":"view","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/dashboards/{id}/restore","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/dashboards/{id}/restore/{version}","registration":"/api/v1/dashboards/","access":"edit","implementation":"internal/dashboardapi/handler.go"},
|
||||
|
||||
{"method":"GET","path":"/api/v1/entities","registration":"/api/v1/entities","access":"view","implementation":"internal/inventoryapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/entities/{id}","registration":"/api/v1/entities/","access":"view","implementation":"internal/inventoryapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/entities/{id}/relations","registration":"/api/v1/entities/","access":"view","implementation":"internal/inventoryapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/host","registration":"/api/v1/host","access":"view","implementation":"internal/hostapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/processes","registration":"/api/v1/processes","access":"view","implementation":"internal/processapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/containers","registration":"/api/v1/containers","access":"view","implementation":"internal/containerapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/containers/{id}","registration":"/api/v1/containers/","access":"view","implementation":"internal/containerapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/applications","registration":"/api/v1/applications","access":"view","implementation":"internal/applicationapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/events","registration":"/api/v1/events","access":"view","implementation":"internal/eventapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/applications/{id}","registration":"/api/v1/applications/","access":"view","implementation":"internal/applicationapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/array","registration":"/api/v1/array","access":"view","implementation":"internal/arrayapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/disks","registration":"/api/v1/disks","access":"view","implementation":"internal/diskapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/disks/{id}","registration":"/api/v1/disks/","access":"view","implementation":"internal/diskapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/pools","registration":"/api/v1/pools","access":"view","implementation":"internal/poolapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/pools/{id}","registration":"/api/v1/pools/","access":"view","implementation":"internal/poolapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/shares","registration":"/api/v1/shares","access":"view","implementation":"internal/shareapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/shares/{id}","registration":"/api/v1/shares/","access":"view","implementation":"internal/shareapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/forecasts","registration":"/api/v1/forecasts","access":"view","implementation":"internal/forecastapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/services","registration":"/api/v1/services","access":"view","implementation":"internal/serviceapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/services/{id}","registration":"/api/v1/services/","access":"view","implementation":"internal/serviceapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/services/{id}/history","registration":"/api/v1/services/","access":"view","implementation":"internal/serviceapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/services/{id}/dependencies","registration":"/api/v1/services/","access":"view","implementation":"internal/serviceapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/topology","registration":"/api/v1/topology","access":"view","implementation":"internal/serviceapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/network","registration":"/api/v1/network","access":"view","implementation":"internal/networkapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/reverse-proxy","registration":"/api/v1/reverse-proxy","access":"view","implementation":"internal/reverseproxyapi/handler.go"},
|
||||
|
||||
{"method":"GET","path":"/api/v1/alert-rules","registration":"/api/v1/alert-rules","access":"view","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-rules","registration":"/api/v1/alert-rules","access":"edit","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/alert-rules/{id}","registration":"/api/v1/alert-rules/","access":"view","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"PUT","path":"/api/v1/alert-rules/{id}","registration":"/api/v1/alert-rules/","access":"edit","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/alert-rules/{id}/versions","registration":"/api/v1/alert-rules/","access":"view","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-rules/{id}/test","registration":"/api/v1/alert-rules/","access":"edit","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-rules/{id}/enable","registration":"/api/v1/alert-rules/","access":"edit","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-rules/{id}/disable","registration":"/api/v1/alert-rules/","access":"edit","implementation":"internal/alertapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/alerts","registration":"/api/v1/alerts","access":"view","implementation":"internal/alertopsapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/alerts/{id}","registration":"/api/v1/alerts/","access":"view","implementation":"internal/alertopsapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alerts/{id}/acknowledge","registration":"/api/v1/alerts/","access":"operate","implementation":"internal/alertopsapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alerts/{id}/unacknowledge","registration":"/api/v1/alerts/","access":"operate","implementation":"internal/alertopsapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/alert-silences","registration":"/api/v1/alert-silences","access":"view","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-silences","registration":"/api/v1/alert-silences","access":"operate","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-silences/preview","registration":"/api/v1/alert-silences/","access":"view","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/alert-silences/{id}/revoke","registration":"/api/v1/alert-silences/","access":"operate","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/maintenance-windows","registration":"/api/v1/maintenance-windows","access":"view","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/maintenance-windows","registration":"/api/v1/maintenance-windows","access":"operate","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/maintenance-windows/preview","registration":"/api/v1/maintenance-windows/","access":"view","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/maintenance-windows/{id}/revoke","registration":"/api/v1/maintenance-windows/","access":"operate","implementation":"internal/alertcontrolapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/incidents","registration":"/api/v1/incidents","access":"view","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/incidents/{id}","registration":"/api/v1/incidents/","access":"view","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"PATCH","path":"/api/v1/incidents/{id}","registration":"/api/v1/incidents/","access":"operate","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"GET","path":"/api/v1/incidents/{id}/notes","registration":"/api/v1/incidents/","access":"view","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/incidents/{id}/notes","registration":"/api/v1/incidents/","access":"operate","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"POST","path":"/api/v1/incidents/{id}/alerts/{alertId}","registration":"/api/v1/incidents/","access":"operate","implementation":"internal/incidentapi/handler.go"},
|
||||
{"method":"DELETE","path":"/api/v1/incidents/{id}/alerts/{alertId}","registration":"/api/v1/incidents/","access":"operate","implementation":"internal/incidentapi/handler.go"}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/capability.schema.json",
|
||||
"title": "Pulse datasource capability document",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["contractVersion", "sourceType", "capabilities"],
|
||||
"properties": {
|
||||
"contractVersion": { "type": "string", "const": "v1" },
|
||||
"sourceType": { "type": "string", "enum": ["prometheus", "unraid", "agent", "exporter"] },
|
||||
"capabilities": {
|
||||
"type": "array",
|
||||
"maxItems": 100,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "version", "state"],
|
||||
"properties": {
|
||||
"id": { "type": "string", "minLength": 1, "maxLength": 120 },
|
||||
"version": { "type": "string", "minLength": 1, "maxLength": 32 },
|
||||
"state": { "type": "string", "enum": ["enabled", "unsupported", "unavailable", "disabled"] },
|
||||
"description": { "type": "string", "maxLength": 500 },
|
||||
"reasonCode": { "type": "string", "maxLength": 80 },
|
||||
"observedAt": { "type": ["string", "null"], "format": "date-time" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/dashboard.schema.json",
|
||||
"title": "Pulse dashboard document",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"id",
|
||||
"slug",
|
||||
"name",
|
||||
"scope",
|
||||
"variables",
|
||||
"widgets",
|
||||
"settings"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
||||
"maxLength": 80
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"personal",
|
||||
"shared",
|
||||
"system"
|
||||
]
|
||||
},
|
||||
"variables": {
|
||||
"type": "array",
|
||||
"maxItems": 30,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"name",
|
||||
"type",
|
||||
"label",
|
||||
"default"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z][a-zA-Z0-9_]*$"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"server",
|
||||
"entity",
|
||||
"container",
|
||||
"application",
|
||||
"disk",
|
||||
"pool",
|
||||
"service",
|
||||
"time-range",
|
||||
"enum"
|
||||
]
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"maxLength": 120
|
||||
},
|
||||
"default": {},
|
||||
"options": {
|
||||
"type": "array",
|
||||
"maxItems": 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"widgets": {
|
||||
"type": "array",
|
||||
"maxItems": 200,
|
||||
"items": {
|
||||
"$ref": "widget-instance.schema.json"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"defaultTimeRange": {
|
||||
"type": "string",
|
||||
"maxLength": 60
|
||||
},
|
||||
"live": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"refreshSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 300
|
||||
},
|
||||
"rotationSeconds": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 10,
|
||||
"maximum": 3600
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/entity.schema.json",
|
||||
"title": "Pulse entity",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"entityType",
|
||||
"canonicalName",
|
||||
"displayName",
|
||||
"status",
|
||||
"statusReasons",
|
||||
"sourceAliases",
|
||||
"firstSeenAt",
|
||||
"lastSeenAt"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"entityType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"server",
|
||||
"cpu",
|
||||
"memory",
|
||||
"gpu",
|
||||
"network-interface",
|
||||
"ups",
|
||||
"array",
|
||||
"pool",
|
||||
"disk",
|
||||
"partition",
|
||||
"filesystem",
|
||||
"share",
|
||||
"container",
|
||||
"image",
|
||||
"stack",
|
||||
"volume",
|
||||
"network",
|
||||
"application",
|
||||
"service",
|
||||
"endpoint",
|
||||
"certificate",
|
||||
"data-source",
|
||||
"collector",
|
||||
"probe"
|
||||
]
|
||||
},
|
||||
"canonicalName": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 255
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 255
|
||||
},
|
||||
"status": {
|
||||
"$ref": "#/$defs/status"
|
||||
},
|
||||
"statusReasons": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"code",
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"code": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z0-9_]+$",
|
||||
"maxLength": 80
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"maxLength": 500
|
||||
},
|
||||
"sourceId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "uuid"
|
||||
},
|
||||
"observedAt": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"sourceAliases": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"sourceId",
|
||||
"externalType",
|
||||
"externalId"
|
||||
],
|
||||
"properties": {
|
||||
"sourceId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"externalType": {
|
||||
"type": "string",
|
||||
"maxLength": 80
|
||||
},
|
||||
"externalId": {
|
||||
"type": "string",
|
||||
"maxLength": 512
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"attributes": {
|
||||
"type": "object",
|
||||
"maxProperties": 100
|
||||
},
|
||||
"firstSeenAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"lastSeenAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"tombstonedAt": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"operational",
|
||||
"attention",
|
||||
"degraded",
|
||||
"critical",
|
||||
"unknown",
|
||||
"maintenance",
|
||||
"disabled"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/event.schema.json",
|
||||
"title": "Pulse event",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"eventId",
|
||||
"eventType",
|
||||
"severity",
|
||||
"occurredAt",
|
||||
"receivedAt",
|
||||
"sourceId",
|
||||
"summary",
|
||||
"attributes"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"eventId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"eventType": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_]*)+$",
|
||||
"maxLength": 160
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"info",
|
||||
"attention",
|
||||
"warning",
|
||||
"critical"
|
||||
]
|
||||
},
|
||||
"entityId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "uuid"
|
||||
},
|
||||
"sourceId": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"occurredAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"receivedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"dedupKey": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 512
|
||||
},
|
||||
"correlationId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 128
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 500
|
||||
},
|
||||
"attributes": {
|
||||
"type": "object",
|
||||
"maxProperties": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/live-message.schema.json",
|
||||
"title": "Pulse live protocol message",
|
||||
"oneOf": [
|
||||
{
|
||||
"$ref": "#/$defs/subscribe"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/unsubscribe"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/samples"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/status"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/error"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/ping"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/pong"
|
||||
}
|
||||
],
|
||||
"$defs": {
|
||||
"base": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"subscribe": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"subscriptionId",
|
||||
"query",
|
||||
"intervalSeconds"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "subscribe"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128
|
||||
},
|
||||
"query": {
|
||||
"type": "object",
|
||||
"maxProperties": 20
|
||||
},
|
||||
"intervalSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 300
|
||||
}
|
||||
}
|
||||
},
|
||||
"unsubscribe": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"subscriptionId"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "unsubscribe"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128
|
||||
}
|
||||
}
|
||||
},
|
||||
"sample": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"series",
|
||||
"timestamp",
|
||||
"value",
|
||||
"freshness"
|
||||
],
|
||||
"properties": {
|
||||
"series": {
|
||||
"type": "string",
|
||||
"maxLength": 512
|
||||
},
|
||||
"timestamp": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"value": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"freshness": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"fresh",
|
||||
"delayed",
|
||||
"stale",
|
||||
"unavailable"
|
||||
]
|
||||
},
|
||||
"labels": {
|
||||
"type": "object",
|
||||
"maxProperties": 30
|
||||
}
|
||||
}
|
||||
},
|
||||
"samples": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"subscriptionId",
|
||||
"sequence",
|
||||
"serverTime",
|
||||
"samples"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "samples"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 128
|
||||
},
|
||||
"sequence": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"serverTime": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"samples": {
|
||||
"type": "array",
|
||||
"maxItems": 10000,
|
||||
"items": {
|
||||
"$ref": "#/$defs/sample"
|
||||
}
|
||||
},
|
||||
"coalesced": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"subscriptionId",
|
||||
"state"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "status"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": "string",
|
||||
"maxLength": 128
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"subscribed",
|
||||
"resync-required",
|
||||
"paused",
|
||||
"unsubscribed"
|
||||
]
|
||||
},
|
||||
"detail": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 500
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"code",
|
||||
"message",
|
||||
"correlationId"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "error"
|
||||
},
|
||||
"subscriptionId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 128
|
||||
},
|
||||
"code": {
|
||||
"type": "string",
|
||||
"pattern": "^[A-Z0-9_]+$",
|
||||
"maxLength": 80
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"maxLength": 500
|
||||
},
|
||||
"correlationId": {
|
||||
"type": "string",
|
||||
"maxLength": 128
|
||||
}
|
||||
}
|
||||
},
|
||||
"ping": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"nonce"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "ping"
|
||||
},
|
||||
"nonce": {
|
||||
"type": "string",
|
||||
"maxLength": 128
|
||||
}
|
||||
}
|
||||
},
|
||||
"pong": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"type",
|
||||
"nonce"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"type": {
|
||||
"const": "pong"
|
||||
},
|
||||
"nonce": {
|
||||
"type": "string",
|
||||
"maxLength": 128
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/metric-catalog.schema.json",
|
||||
"title": "Pulse semantic metric catalog",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["schemaVersion", "metrics"],
|
||||
"properties": {
|
||||
"schemaVersion": {"const": 1},
|
||||
"metrics": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "metric-definition.schema.json"}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,197 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/metric-definition.schema.json",
|
||||
"title": "Semantic metric definition",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"semanticName",
|
||||
"version",
|
||||
"description",
|
||||
"unit",
|
||||
"valueKind",
|
||||
"sourceKind",
|
||||
"queryTemplate",
|
||||
"allowedLabels",
|
||||
"cardinalityBudget",
|
||||
"limits",
|
||||
"allowedVisualizations",
|
||||
"freshnessSeconds"
|
||||
],
|
||||
"properties": {
|
||||
"semanticName": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9_]*)+$",
|
||||
"maxLength": 160
|
||||
},
|
||||
"version": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 1000
|
||||
},
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"maxLength": 40
|
||||
},
|
||||
"valueKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"gauge",
|
||||
"counter",
|
||||
"state",
|
||||
"histogram"
|
||||
]
|
||||
},
|
||||
"sourceKind": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"prometheus",
|
||||
"inventory",
|
||||
"event",
|
||||
"derived"
|
||||
]
|
||||
},
|
||||
"queryTemplate": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 4000
|
||||
},
|
||||
"requiredCapabilities": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 100
|
||||
}
|
||||
},
|
||||
"allowedLabels": {
|
||||
"type": "array",
|
||||
"maxItems": 30,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
|
||||
}
|
||||
},
|
||||
"defaultAggregation": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"avg",
|
||||
"sum",
|
||||
"min",
|
||||
"max",
|
||||
"rate",
|
||||
"increase",
|
||||
"p50",
|
||||
"p95",
|
||||
"p99"
|
||||
]
|
||||
},
|
||||
"cardinalityBudget": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10000
|
||||
},
|
||||
"limits": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"maxRangeSeconds",
|
||||
"maxSeries",
|
||||
"maxPoints",
|
||||
"timeoutSeconds"
|
||||
],
|
||||
"properties": {
|
||||
"maxRangeSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 60
|
||||
},
|
||||
"maxSeries": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 10000
|
||||
},
|
||||
"maxPoints": {
|
||||
"type": "integer",
|
||||
"minimum": 10,
|
||||
"maximum": 1000000
|
||||
},
|
||||
"timeoutSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 120
|
||||
}
|
||||
}
|
||||
},
|
||||
"allowedVisualizations": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"stat",
|
||||
"timeseries",
|
||||
"gauge",
|
||||
"ranked-list",
|
||||
"status-grid",
|
||||
"table",
|
||||
"heatmap",
|
||||
"storage-map",
|
||||
"topology",
|
||||
"service-matrix"
|
||||
]
|
||||
}
|
||||
},
|
||||
"freshnessSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"defaultThresholds": {
|
||||
"type": "array",
|
||||
"maxItems": 10,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"state",
|
||||
"operator",
|
||||
"value"
|
||||
],
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"attention",
|
||||
"degraded",
|
||||
"critical"
|
||||
]
|
||||
},
|
||||
"operator": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
">",
|
||||
">=",
|
||||
"<",
|
||||
"<=",
|
||||
"==",
|
||||
"!="
|
||||
]
|
||||
},
|
||||
"value": {
|
||||
"type": "number"
|
||||
},
|
||||
"durationSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,131 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/probe.schema.json",
|
||||
"title": "Service probe definition",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"id",
|
||||
"name",
|
||||
"type",
|
||||
"target",
|
||||
"intervalSeconds",
|
||||
"timeoutSeconds",
|
||||
"enabled"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 160
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"http",
|
||||
"tcp",
|
||||
"dns",
|
||||
"icmp",
|
||||
"tls"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"host"
|
||||
],
|
||||
"properties": {
|
||||
"scheme": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"enum": [
|
||||
"http",
|
||||
"https",
|
||||
null
|
||||
]
|
||||
},
|
||||
"host": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 253
|
||||
},
|
||||
"port": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 1,
|
||||
"maximum": 65535
|
||||
},
|
||||
"path": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 2048
|
||||
}
|
||||
}
|
||||
},
|
||||
"intervalSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 5,
|
||||
"maximum": 86400
|
||||
},
|
||||
"timeoutSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 120
|
||||
},
|
||||
"enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"expectedStatusCodes": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"minimum": 100,
|
||||
"maximum": 599
|
||||
}
|
||||
},
|
||||
"followRedirects": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"verifyTls": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"contentAssertion": {
|
||||
"type": [
|
||||
"object",
|
||||
"null"
|
||||
],
|
||||
"maxProperties": 10
|
||||
},
|
||||
"secretReference": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 255
|
||||
},
|
||||
"networkPolicyId": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "uuid"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/simulator-scenario.schema.json",
|
||||
"title": "Pulse telemetry simulator scenario",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"id",
|
||||
"name",
|
||||
"description",
|
||||
"initialState",
|
||||
"timeline",
|
||||
"expectedOutcomes"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 160
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"initialState": {
|
||||
"type": "object",
|
||||
"maxProperties": 100
|
||||
},
|
||||
"timeline": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 1000,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"atSeconds",
|
||||
"action",
|
||||
"payload"
|
||||
],
|
||||
"properties": {
|
||||
"atSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"set-metric",
|
||||
"emit-event",
|
||||
"set-source-health",
|
||||
"set-entity-status",
|
||||
"set-probe-result",
|
||||
"disconnect",
|
||||
"reconnect",
|
||||
"restart-database",
|
||||
"slow-client"
|
||||
]
|
||||
},
|
||||
"payload": {
|
||||
"type": "object",
|
||||
"maxProperties": 100
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"expectedOutcomes": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"maxItems": 100,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"bySeconds",
|
||||
"assertion"
|
||||
],
|
||||
"properties": {
|
||||
"bySeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"assertion": {
|
||||
"type": "string",
|
||||
"maxLength": 1000
|
||||
},
|
||||
"evidenceHint": {
|
||||
"type": "string",
|
||||
"maxLength": 500
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/task-ledger.schema.json",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schemaVersion",
|
||||
"project",
|
||||
"tasks"
|
||||
],
|
||||
"properties": {
|
||||
"schemaVersion": {
|
||||
"type": "integer",
|
||||
"const": 1
|
||||
},
|
||||
"project": {
|
||||
"type": "string"
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"milestone",
|
||||
"title",
|
||||
"objective",
|
||||
"dependsOn",
|
||||
"deliverables",
|
||||
"acceptanceChecks",
|
||||
"evidenceRequired",
|
||||
"status"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^M[0-9]+-[0-9]{2}$"
|
||||
},
|
||||
"milestone": {
|
||||
"type": "string",
|
||||
"pattern": "^M[0-9]+$"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"objective": {
|
||||
"type": "string"
|
||||
},
|
||||
"dependsOn": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"deliverables": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"acceptanceChecks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"evidenceRequired": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"not_started",
|
||||
"in_progress",
|
||||
"done",
|
||||
"blocked",
|
||||
"deferred"
|
||||
]
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"blocker": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,246 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://itworx.local/pulse/specs/widget-instance.schema.json",
|
||||
"title": "Dashboard widget instance",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"id",
|
||||
"type",
|
||||
"title",
|
||||
"data",
|
||||
"visualization",
|
||||
"behavior",
|
||||
"layouts"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"stat",
|
||||
"timeseries",
|
||||
"gauge",
|
||||
"ranked-list",
|
||||
"status-grid",
|
||||
"table",
|
||||
"heatmap",
|
||||
"event-timeline",
|
||||
"storage-map",
|
||||
"topology",
|
||||
"service-matrix",
|
||||
"alert-summary",
|
||||
"text",
|
||||
"query-inspector"
|
||||
]
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 120
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"maxLength": 500
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"sourceType"
|
||||
],
|
||||
"properties": {
|
||||
"sourceType": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"semantic-metric",
|
||||
"inventory",
|
||||
"events",
|
||||
"alerts",
|
||||
"incidents",
|
||||
"text"
|
||||
]
|
||||
},
|
||||
"metric": {
|
||||
"type": "string",
|
||||
"maxLength": 160
|
||||
},
|
||||
"scope": {
|
||||
"type": "object",
|
||||
"maxProperties": 20
|
||||
},
|
||||
"range": {
|
||||
"type": "string",
|
||||
"maxLength": 60
|
||||
},
|
||||
"aggregation": {
|
||||
"type": "string",
|
||||
"maxLength": 40
|
||||
},
|
||||
"groupBy": {
|
||||
"type": "array",
|
||||
"maxItems": 10,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"maxLength": 80
|
||||
}
|
||||
},
|
||||
"transformations": {
|
||||
"type": "array",
|
||||
"maxItems": 20,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"maxProperties": 20
|
||||
}
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 1000
|
||||
}
|
||||
}
|
||||
},
|
||||
"visualization": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"properties": {
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"maxLength": 40
|
||||
},
|
||||
"decimals": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 6
|
||||
},
|
||||
"legend": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"showSparkline": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"min": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"max": {
|
||||
"type": [
|
||||
"number",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"thresholds": {
|
||||
"type": "array",
|
||||
"maxItems": 10,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"maxProperties": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"behavior": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"locked": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hidden": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"hideWhenEmpty": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"showOnlyOnProblem": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"link": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 1000
|
||||
},
|
||||
"liveIntervalSeconds": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 300
|
||||
},
|
||||
"independentTimeRange": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"maxLength": 60
|
||||
}
|
||||
}
|
||||
},
|
||||
"layouts": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"desktop",
|
||||
"tablet",
|
||||
"mobile",
|
||||
"wallboard"
|
||||
],
|
||||
"properties": {
|
||||
"desktop": {
|
||||
"$ref": "#/$defs/layout"
|
||||
},
|
||||
"tablet": {
|
||||
"$ref": "#/$defs/layout"
|
||||
},
|
||||
"mobile": {
|
||||
"$ref": "#/$defs/layout"
|
||||
},
|
||||
"wallboard": {
|
||||
"$ref": "#/$defs/layout"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"layout": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"x",
|
||||
"y",
|
||||
"w",
|
||||
"h",
|
||||
"visible"
|
||||
],
|
||||
"properties": {
|
||||
"x": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 24
|
||||
},
|
||||
"y": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"w": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 24
|
||||
},
|
||||
"h": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 100
|
||||
},
|
||||
"visible": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user