Metricbeat collect from single namespace

Hi

Is it possible to make use of metricbeat/kubernetes to collect data from a single namespace? Background is we would like bundle it with a product to monitor itself. That product will run within a dedicated Kubernetes namespace. There are two limitations to the setup:

  • Metricset is setup as regular deployment rather than deamonset (as we do not want to install on all nodes in a potentially large cluster where we only want to monitor a small piece).
  • we are not allowed to hold any data other from our own namespace

But having access to kube-stats-metrics in general is fine.

Thx, Regards Remo

Hi @remmeier and welcome :slight_smile:

At the moment only the events metricset of the Kubernetes module can be configured to collect data only from specific namespaces. It is not possible to do it in other metricsets.

There are some options though:

  • Kubernetes autodiscover provider can be configured for specific namespaces with the namespace setting, in that case only resources in this namespace are discovered. (I am checking and it seems that this setting is not documented, I'll look to add this).
  • Even if events are being collected, you can drop them before being sent with the drop_event processor.

I hope that helps, but if none of these options work for you, feel free to open an enhancement request explaining your use case.

thx for this information (and in general the great product), that helps already. We will investigate a bit!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.