Static
The static step allows you to include data from local files or inline values in your collection job. This is useful for including configuration files, static data, or any content that doesn’t require a collector.
Configuration
Section titled “Configuration”-
filepath- Optional (string)Filepath is a local and relative path to a file. Symlinks and directories are not allowed.
-
value- Optional Template (string)Value is an inline value to use as the static value.
-
parse_as- Optional (string)Must be one of:ParseAs is the format to parse the value as.
json,raw.
You must specify exactly one of filepath or value.
Parsing behavior
Section titled “Parsing behavior”The parse_as option controls how the data is interpreted:
- json (default): Parses the content as JSON and includes the resulting structure in the output
- raw: Includes the content as-is without parsing
When parse_as is not specified:
- Files with a
.jsonextension are automatically parsed as JSON - All other content defaults to JSON parsing
Output format
Section titled “Output format”When using parse_as: raw:
- For files:
{"filename": "<filepath>"} - For inline values:
{"value": "<content>"}
When using parse_as: json, the parsed JSON structure is included directly.
Examples
Section titled “Examples”Load a JSON file
Section titled “Load a JSON file”steps: - id: config static: filepath: ./config.jsonInline JSON value
Section titled “Inline JSON value”steps: - id: metadata static: value: | {"environment": "production", "version": "1.0.0"} parse_as: jsonRaw file content
Section titled “Raw file content”steps: - id: readme static: filepath: ./README.md parse_as: raw