You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error decoding 'receivers': error reading configuration for "prometheus": prometheus receiver failed to unmarshal yaml to prometheus config: labeldrop action requires only 'regex', and no other fields
The problem is that the default value for the replacement key is $1, which the collector treats as variable substitution, and resolves to an empty string. The fact that this causes an error here has to do with the specifics of how Prometheus validates the relabel configs - it checks for the existence of unnecessary fields by comparing them against defaults, but the underlying problem affects all relabel actions.
I think this can be fixed by simply unsetting the value in the config replace function if it's the default, and I'll submit a draft of the fix shortly.
The text was updated successfully, but these errors were encountered:
The following resource using a
labeldrop
relabel action in prometheus receiver:gives the following receiver config in the ConfigMap:
and the following collector error:
The problem is that the default value for the
replacement
key is$1
, which the collector treats as variable substitution, and resolves to an empty string. The fact that this causes an error here has to do with the specifics of how Prometheus validates the relabel configs - it checks for the existence of unnecessary fields by comparing them against defaults, but the underlying problem affects all relabel actions.I think this can be fixed by simply unsetting the value in the config replace function if it's the default, and I'll submit a draft of the fix shortly.
The text was updated successfully, but these errors were encountered: