{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://github.com/flanksource/config-db/api/v1/logs", "$ref": "#/$defs/Logs", "$defs": { "BigQueryConfig": { "properties": { "connection": { "type": "string" }, "endpoint": { "type": "string" }, "credentials": { "$ref": "#/$defs/EnvVar" }, "skipTLSVerify": { "type": "boolean" }, "project": { "type": "string" }, "query": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "ChangeMapping": { "properties": { "filter": { "type": "string" }, "severity": { "type": "string" }, "type": { "type": "string" }, "action": { "type": "string" }, "summary": { "type": "string" }, "config_id": { "type": "string" }, "config_type": { "type": "string" }, "scraper_id": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "ConfigFieldExclusion": { "properties": { "types": { "items": { "type": "string" }, "type": "array" }, "jsonpath": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "jsonpath" ] }, "ConfigMapKeySelector": { "properties": { "name": { "type": "string" }, "key": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "key" ] }, "ConfigProperties": { "properties": { "label": { "type": "string" }, "name": { "type": "string" }, "tooltip": { "type": "string" }, "icon": { "type": "string" }, "type": { "type": "string" }, "color": { "type": "string" }, "order": { "type": "integer" }, "headline": { "type": "boolean" }, "hidden": { "type": "boolean" }, "text": { "type": "string" }, "value": { "type": "integer" }, "unit": { "type": "string" }, "max": { "type": "integer" }, "min": { "type": "integer" }, "status": { "type": "string" }, "lastTransition": { "type": "string" }, "links": { "items": { "$ref": "#/$defs/Link" }, "type": "array" }, "filter": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "EnvVar": { "properties": { "name": { "type": "string" }, "value": { "type": "string" }, "valueFrom": { "$ref": "#/$defs/EnvVarSource" } }, "additionalProperties": false, "type": "object" }, "EnvVarSource": { "properties": { "serviceAccount": { "type": "string" }, "helmRef": { "$ref": "#/$defs/HelmRefKeySelector" }, "configMapKeyRef": { "$ref": "#/$defs/ConfigMapKeySelector" }, "secretKeyRef": { "$ref": "#/$defs/SecretKeySelector" } }, "additionalProperties": false, "type": "object" }, "FieldMappingConfig": { "properties": { "id": { "items": { "type": "string" }, "type": "array" }, "message": { "items": { "type": "string" }, "type": "array" }, "timestamp": { "items": { "type": "string" }, "type": "array" }, "host": { "items": { "type": "string" }, "type": "array" }, "severity": { "items": { "type": "string" }, "type": "array" }, "source": { "items": { "type": "string" }, "type": "array" }, "ignore": { "items": { "type": "string" }, "type": "array" } }, "additionalProperties": false, "type": "object" }, "GCPCloudLoggingConfig": { "properties": { "connection": { "type": "string" }, "endpoint": { "type": "string" }, "credentials": { "$ref": "#/$defs/EnvVar" }, "skipTLSVerify": { "type": "boolean" }, "project": { "type": "string" }, "start": { "type": "string" }, "end": { "type": "string" }, "limit": { "type": "string" }, "filter": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "HelmRefKeySelector": { "properties": { "name": { "type": "string" }, "key": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "key" ] }, "JSONStringMap": { "additionalProperties": { "type": "string" }, "type": "object" }, "Link": { "properties": { "type": { "type": "string" }, "url": { "type": "string" }, "tooltip": { "type": "string" }, "icon": { "type": "string" }, "text": { "type": "string" }, "label": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "LocationOrAlias": { "properties": { "type": { "type": "string" }, "filter": { "type": "string" }, "values": { "items": { "type": "string" }, "type": "array" }, "withParent": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "type" ] }, "Logs": { "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "items": { "type": "string" }, "type": { "type": "string" }, "class": { "type": "string" }, "format": { "type": "string" }, "status": { "type": "string" }, "health": { "type": "string" }, "timestampFormat": { "type": "string" }, "createFields": { "items": { "type": "string" }, "type": "array" }, "deleteFields": { "items": { "type": "string" }, "type": "array" }, "transform": { "$ref": "#/$defs/Transform" }, "labels": { "$ref": "#/$defs/JSONStringMap" }, "tags": { "$ref": "#/$defs/Tags" }, "properties": { "items": { "$ref": "#/$defs/ConfigProperties" }, "type": "array" }, "loki": { "$ref": "#/$defs/LokiConfig" }, "gcpCloudLogging": { "$ref": "#/$defs/GCPCloudLoggingConfig" }, "openSearch": { "$ref": "#/$defs/OpenSearchConfig" }, "bigQuery": { "$ref": "#/$defs/BigQueryConfig" }, "fieldMapping": { "$ref": "#/$defs/FieldMappingConfig" } }, "additionalProperties": false, "type": "object" }, "LokiConfig": { "properties": { "connection": { "type": "string" }, "url": { "type": "string" }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, "start": { "type": "string" }, "end": { "type": "string" }, "limit": { "type": "string" }, "query": { "type": "string" }, "since": { "type": "string" }, "step": { "type": "string" }, "interval": { "type": "string" }, "direction": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "Lookup": { "properties": { "expr": { "type": "string" }, "value": { "type": "string" }, "label": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "Mask": { "properties": { "selector": { "type": "string" }, "jsonpath": { "type": "string" }, "value": { "type": "string" } }, "additionalProperties": false, "type": "object" }, "MaskList": { "items": { "$ref": "#/$defs/Mask" }, "type": "array" }, "OpenSearchConfig": { "properties": { "connection": { "type": "string" }, "address": { "type": "string" }, "username": { "$ref": "#/$defs/EnvVar" }, "password": { "$ref": "#/$defs/EnvVar" }, "index": { "type": "string" }, "query": { "type": "string" }, "limit": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "index", "query" ] }, "RelationshipConfig": { "properties": { "id": { "$ref": "#/$defs/Lookup" }, "external_id": { "$ref": "#/$defs/Lookup" }, "name": { "$ref": "#/$defs/Lookup" }, "namespace": { "$ref": "#/$defs/Lookup" }, "type": { "$ref": "#/$defs/Lookup" }, "agent": { "$ref": "#/$defs/Lookup" }, "scope": { "$ref": "#/$defs/Lookup" }, "labels": { "additionalProperties": { "type": "string" }, "type": "object" }, "expr": { "type": "string" }, "filter": { "type": "string" }, "parent": { "type": "boolean" } }, "additionalProperties": false, "type": "object" }, "SecretKeySelector": { "properties": { "name": { "type": "string" }, "key": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "key" ] }, "Tag": { "properties": { "name": { "type": "string" }, "label": { "type": "string" }, "jsonpath": { "type": "string" }, "value": { "type": "string" } }, "additionalProperties": false, "type": "object", "required": [ "name" ] }, "Tags": { "items": { "$ref": "#/$defs/Tag" }, "type": "array" }, "Transform": { "properties": { "gotemplate": { "type": "string" }, "jsonpath": { "type": "string" }, "expr": { "type": "string" }, "javascript": { "type": "string" }, "exclude": { "items": { "$ref": "#/$defs/ConfigFieldExclusion" }, "type": "array" }, "mask": { "$ref": "#/$defs/MaskList" }, "relationship": { "items": { "$ref": "#/$defs/RelationshipConfig" }, "type": "array" }, "changes": { "$ref": "#/$defs/TransformChange" }, "locations": { "items": { "$ref": "#/$defs/LocationOrAlias" }, "type": "array" }, "aliases": { "items": { "$ref": "#/$defs/LocationOrAlias" }, "type": "array" } }, "additionalProperties": false, "type": "object" }, "TransformChange": { "properties": { "mapping": { "items": { "$ref": "#/$defs/ChangeMapping" }, "type": "array" }, "exclude": { "items": { "type": "string" }, "type": "array" } }, "additionalProperties": false, "type": "object" } } }