Don't send some metrics to prometheus

Problem/Question

I would like to prevent netdata from sending the below metrics:
netdata_cpu_interrupts_interrupts_persec_average
netdata_cpu_interrupts_total

So I add this configuration to the netdata.conf file:

[backend]
        send charts matching = !cpu.*_interrupts *

But I still see the metrics in the Prometheus endpoint api/v1/allmetrics?format=prometheus_all_hosts:

netdata_cpu_interrupts_interrupts_persec_average{chart="cpu.cpu0_interrupts",family="interrupts",dimension="i8042_1",instance="netdata-test-01"} 0.0000000 1618639870000

Hi @Yashar_Nesabian

That is a bug, send charts matching doesn’t work when using [backend].

We suggest to switch to exporting engine

# exporting.conf

[pc netdata]# cat exporting.conf
[exporting:global]
    enabled = no
    # send configured labels = yes
    # send automatic labels = no
    # update every = 10

[prometheus:exporter]
    # data source = average
    # send names instead of ids = yes
    # send configured labels = yes
    # send automatic labels = no
    # send charts matching = *
    send charts matching = !cpu.*_interrupts *
1 Like

Hey @ilyam8,

Since exporting is the new backends, is there a way to let the user know that they are using a deprecated feature?

Relevant to this, why do we allow users to use backends?

Thanks @ilyam8 this solved the problem

There were several bugs:

  • when only backends send charts matching configured
  • when both backends and exporting send charts matching configured

Fixed in Backend chart filtering backward compatibility fix by vlvkobal · Pull Request #11002 · netdata/netdata · GitHub

1 Like

But why do we still have legacy support for [backend] in the first place @ilyam8 ?

We are planning to remove it completely soon.

1 Like

Awesome, thanks! I was really really curious :sweat_smile: