File
The file
scraper is used to create config items from files in a local folder (or git). This can be used to track changes in files like /etc/hosts
or /etc/passwd
, or for service metadata stored in git.
See Kubernetes Files for scraping files inside running kubernetes pods.
file-scraper.yamlapiVersion: configs.flanksource.com/v1
kind: ScrapeConfig
metadata:
name: file-git-scraper
spec:
file:
- type: $.kind
id: $.metadata.name
url: github.com/flanksource/canary-checker
paths:
- fixtures/minimal/http_pass_single.yaml
Scraper
Field | Description | Scheme | Required |
---|---|---|---|
schedule | Specify the interval to scrape in cron format. Defaults to every 60 minutes. | string | |
full | Set to true to extract changes from scraped configurations. Defaults to false . | bool | |
retention | Settings for retaining changes, analysis and scraped items | Retention | |
file | Specifies the list of File configurations to scrape. | []File |
File
Field | Description | Scheme |
---|---|---|
id* | A deterministic or natural id for the resource |
|
paths* | Specify paths to configuration(s) for scraping | []glob |
type* | e.g. |
|
url | Specify URL e.g github repository containing the configuration(s) |
|
class |
| |
createFields | Identify the created time for a resource (if different to scrape time). If multiple fields are specified, the first non-empty value will be used |
|
deleteFields | Identify when a config item was deleted. If multiple fields are specified, the first non-empty value will be used |
|
format | Format of config item e.g. |
|
ignore | Fields to ignore and strip out of the config | []JSONPath |
items | Extract multiple config items from this array | |
name | . Defaults to |
|
properties | Custom templatable properties for the scraped config items. | |
tags | Additional tags | map[string]string |
timestampFormat | Format to parse timestamps in | Go time format |