-
Notifications
You must be signed in to change notification settings - Fork 6
Add config schemas for unstable module #510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "$id": "either_id.schema.json", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "oneOf": [{ "required": ["id"] }, { "required": ["external-id"] }], | ||
| "properties": { | ||
| "id": { | ||
| "type": "integer", | ||
| "description": "Resource internal ID" | ||
| }, | ||
| "external-id": { | ||
| "type": "string", | ||
| "description": "Resource external ID" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "$id": "extractor_config.schema.json", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "description": "Base extractor configuration object", | ||
| "unevaluatedProperties": false, | ||
| "properties": { | ||
| "state-store": { | ||
| "$ref": "state_store_config.schema.json" | ||
| }, | ||
| "metrics": { | ||
| "$ref": "metrics_config.schema.json" | ||
| }, | ||
| "log-handlers": { | ||
| "type": "array", | ||
| "description": "List of log handlers to use for logging from the extractor", | ||
| "items": { | ||
| "$ref": "log_handler_config.schema.json" | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| { | ||
| "$id": "log_handler_config.schema.json", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "description": "Configuration of a log handler for an extractor.", | ||
| "discriminatorProp": "type", | ||
| "oneOf": [ | ||
| { | ||
| "type": "object", | ||
| "description": "Configuration for a log handler that writes logs to a local file", | ||
| "unevaluatedProperties": false, | ||
| "title": "File", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "const": "file", | ||
| "description": "Type of log handler, must be 'file' for a log handler that writes logs to a local file" | ||
| }, | ||
| "path": { | ||
| "type": "string", | ||
| "description": "File path to the log file to write logs to" | ||
| }, | ||
| "retention": { | ||
| "type": "integer", | ||
| "description": "Number of log files to retain when rotating logs.", | ||
| "default": 7 | ||
| }, | ||
| "level": { | ||
| "type": "string", | ||
| "description": "Select the verbosity level for console logging. To reduce the verbosity levels, use `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`.", | ||
| "enum": [ | ||
| "DEBUG", | ||
| "INFO", | ||
| "WARNING", | ||
| "ERROR", | ||
| "CRITICAL" | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "type", | ||
| "path", | ||
| "level" | ||
| ] | ||
| }, | ||
| { | ||
| "type": "object", | ||
| "description": "Configuration for a log handler that writes logs to the console", | ||
| "unevaluatedProperties": false, | ||
| "title": "Console", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "const": "console", | ||
| "description": "Type of log handler, must be 'console' for a log handler that writes logs to the console" | ||
| }, | ||
| "level": { | ||
| "type": "string", | ||
| "description": "Select the verbosity level for console logging. To reduce the verbosity levels, use `DEBUG`, `INFO`, `WARNING`, `ERROR`, or `CRITICAL`.", | ||
| "enum": [ | ||
| "DEBUG", | ||
| "INFO", | ||
| "WARNING", | ||
| "ERROR", | ||
| "CRITICAL" | ||
| ] | ||
| } | ||
| }, | ||
| "required": [ | ||
| "type", | ||
| "level" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| { | ||
| "$id": "metrics_config.schema.json", | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "description": "Configuration of metrics collection for an extractor", | ||
| "properties": { | ||
| "push-gateways": { | ||
| "type": "array", | ||
| "description": "List of Prometheus Push Gateways to push metrics to", | ||
| "items": { | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "properties": { | ||
| "host": { | ||
| "type": "string", | ||
| "description": "Host of the Prometheus Push Gateway, e.g. 'pushgateway.example.com'" | ||
| }, | ||
| "job-name": { | ||
| "type": "string", | ||
| "description": "Job name to use when pushing metrics to the Prometheus Push Gateway" | ||
| }, | ||
| "username": { | ||
| "type": "string", | ||
| "description": "Username for authenticating with the Prometheus Push Gateway, if required" | ||
| }, | ||
| "password": { | ||
| "type": "string", | ||
| "description": "Password for authenticating with the Prometheus Push Gateway, if required" | ||
| }, | ||
| "clear-after": { | ||
| "type": "string", | ||
| "description": "Interval for clearing metrics from the Prometheus Push Gateway, on the form 12s, 15m, 1h, etc. If not specified, metrics will not be cleared from the Push Gateway." | ||
| }, | ||
| "push-interval": { | ||
| "type": "string", | ||
| "description": "Interval for pushing metrics to the Prometheus Push Gateway, on the form 12s, 15m, 1h, etc.", | ||
| "default": "30s" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "host", | ||
| "job-name" | ||
| ] | ||
| } | ||
| }, | ||
| "cognite": { | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "description": "Configuration for pushing metrics to CDF Classic time-series", | ||
| "properties": { | ||
| "external-id-prefix": { | ||
| "type": "string", | ||
| "description": "Prefix on external ID used when creating CDF time series to store metrics." | ||
| }, | ||
| "asset-name": { | ||
| "type": "string", | ||
| "description": "Enter the name for a CDF asset that will have all the metrics time series attached to it." | ||
| }, | ||
| "asset-external-id": { | ||
| "type": "string", | ||
| "description": "Enter the external ID for a CDF asset with all the metrics time series attached to it." | ||
| }, | ||
| "push-interval": { | ||
| "type": "string", | ||
| "description": "Enter the interval between each push to CDF, on the form 12s, 15m, 1h, etc.", | ||
| "default": "30s" | ||
| }, | ||
| "data-set": { | ||
| "description": "The data set where the metrics will be created.", | ||
| "$ref": "either_id.schema.json" | ||
| } | ||
| }, | ||
| "required": [ | ||
| "external-id-prefix" | ||
| ] | ||
| }, | ||
| "server": { | ||
| "type": "object", | ||
| "unevaluatedProperties": false, | ||
| "description": "Configuration for exposing an HTTP server with Prometheus metrics for scraping.", | ||
| "properties": { | ||
| "host": { | ||
| "type": "string", | ||
| "description": "Host to run the Prometheus server on.", | ||
| "default": "0.0.0.0" | ||
| }, | ||
| "port": { | ||
| "type": "integer", | ||
| "description": "Port to run the Prometheus server on.", | ||
| "default": 8080 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.