Now i am getting the below error

level=error ts=2020-04-29T14:23:14.189Z caller=main.go:740 err="error
loading config from \"/etc/config-shared/prometheus.yaml\": couldn't load
configuration (--config.file=\"/etc/config-shared/prometheus.yaml\"):
parsing YAML file /etc/config-shared/prometheus.yaml: labeldrop action
requires only 'regex', and no other fields"

My configuration is as below

alertRelabelConfigs:
   alert_relabel_configs:
   - source_labels: [replica]
     regex: replica
     action: labeldrop
Should I remove source_label ?

On Wed, Apr 29, 2020 at 5:16 PM Brian Candler <[email protected]> wrote:

> (1) labeldrop, not drop.
>
> (2) source_labels is a list:  source_labels: [replica]
>
> (3) as per the documentation
> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/>,
> the alert_relabel_configs goes under the "alerting" section, as a sibling
> to "alertmanagers"
>
> alerting:
>   alert_relabel_configs:
>     [ - <relabel_config> 
> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config>
>  ... ]
>   alertmanagers:
>     [ - <alertmanager_config> 
> <https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config>
>  ... ]
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/f88d6534-f673-4589-a535-80c5a0c3e762%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/f88d6534-f673-4589-a535-80c5a0c3e762%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAPz289uKNPDCh%2B0dO4tzFrpOoD7DrjOGdKHHaUa%2BJCww64mYaQ%40mail.gmail.com.

Reply via email to