This may sound like a stupid question but I haven't had much luck googling it. I'm wondering if there is an existing way to include multiple files in Prometheus. This is to help me with a few things:
i) Make it more organizable instead of have everything in a single file. So I could have a scrape_config in one ec2.yaml, another scrape_config in k8s.yaml, and in my main prometheus.yaml I can just state that it includes both YAMLs. My Prometheus would then scrape both targets defined in both files. Currently it seems possible only with rule_files, which does not accept a prometheus config (it only accepts rules).
ii) I currently am experimenting with Tectonic and would like to be able to drop rule files in set places to use with the Prometheus Operator resource. There's an existing config reloader image that is able to reload prometheus, but the trigger seems to be based only if there are rule file changes (the main prometheus.yaml is configured automatically by Tectonic). So if I added in a test.rules file, it will add it to the YAML, but I am unable to specify scrape_configs in that rule file because it will complain: unexpected <op:-> in record statement, expected "="
Anyone have any suggestions?