The following is a sanitized version of the job configuration for scraping the endpoint of a Sybase monitoring instance.
- job_name: sybase-job
basic_auth:
username: "user"
password: "password"
honor_timestamps: true
scheme: https
scrape_interval: 30s
scrape_timeout: 30s
metrics_path: "/prometheus/metrics?tls=false&port=13603&target=10.10.10.10:12311&entity=NPASEX.SYB_UK-DEV-01&entity_type=SYBASE"
tls_config:
insecure_skip_verify: true
follow_redirects: true
static_configs:
- targets: ["10.10.10.10:12311"]
When defined in the prometheus configuration file, it’s picked up without issue when invoking a config reload. However, if defined in a separate file and referenced in the main config file using scrape_config_files parameter, it fails with an unmarshal error
scrape_config_files:
- /prom_config/dir/sybase/*.yml
Full error:
May 14 13:11:49 promhost1 prometheus[1033]: ts=2024-05-14T12:11:49.650Z caller=main.go:1255 level=error msg="Failed to apply configuration" err=""/prom_config/dir/sybase/npasex.syb_ukdev-01.yml": yaml: unmarshal errors:n line 1: cannot unmarshal !!seq into config.ScrapeConfigs"
Any help would be greatly appreciated
New contributor
trevp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.