polkadot-validator-setup icon indicating copy to clipboard operation
polkadot-validator-setup copied to clipboard

Prometheus autoprovisioning

Open derfredy opened this issue 5 years ago • 1 comments

Prometheus has a folder where you can place a json file per machine you'd like to scrape. It is located by default in /etc/prometheus/provisioning

An example of this kind of files and static configurations looks like this:

cat provisioning/polkadot-sentry-2.json

[
    {
        "labels": {
            "job": "polkadot-sentry-2",
            "group": "substrate",
            "network": "polkadot"
        },
        "targets": [
            "XX.XX.XX.XX:9615",
            "XX.XX.XX.XX:9100"
        ]
    }
]

It would be really nice if the last of the roles after a successful deployment creates and uploads this file to your monitoring server. There is no need to restart prometheus. A proper use of labels will later help you to configure your grafana panels and new machines should pop up automagically there.

derfredy avatar Sep 04 '20 10:09 derfredy

Thanks for taking the time @derfredy! Sounds good, adding to the backlog.

fgimenez avatar Sep 04 '20 12:09 fgimenez