yes that worked, thanks
On Friday, August 18, 2023 at 11:50:39 AM UTC-4 Brian Candler wrote:
> Aside: I believe there is no need for source_labels here, since you're not
> matching on them.
>
> - target_label: group
> replacement: group1
>
> should be sufficient. ("action: replace" is default)
>
> On Friday, 18 August 2023 at 14:20:57 UTC+1 Richie wrote:
>
>> Brian, thanks for the hint, pasting working excerpt below
>>
>> integrations:
>> node_exporter:
>> enabled: true
>> enable_collectors:
>> - systemd
>> relabel_configs:
>> - source_labels: [__address__]
>> target_label: group
>> replacement: "group1"
>> On Friday, August 18, 2023 at 8:18:33 AM UTC-4 Brian Candler wrote:
>>
>>> relabel_configs are per scrape job. It appears that you've applied this
>>> config to the job called "agent" but not to the job called
>>> "integrations/node_exporter"
>>>
>>> On Friday, 18 August 2023 at 13:05:48 UTC+1 Richie wrote:
>>>
>>>> I am trying to add a label to the mentioned metric from the grafana
>>>> agent config. I have tried the static label config, the relabel configs
>>>> and metric_relabel_configs blocks but no luck.
>>>>
>>>> example:
>>>> relabel_configs:
>>>> - source_labels: [__address__]
>>>> target_label: group
>>>> replacement: "group1"
>>>>
>>>> The new label shows up on many of the metrics but for whatever reason
>>>> it doesn't show up in node_systemd_unit_state metric.
>>>>
>>>> The reasoning for this is for alerting so that I can filter groups of
>>>> nodes have their alerts to go specific contacts.
>>>>
>>>> [image: Screenshot_20230817_165243.png][image:
>>>> Screenshot_20230817_165524.png]
>>>>
>>>>
--
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/58465c13-f5e3-42f1-9083-c9223a95e329n%40googlegroups.com.