<@U078Y59KC3B> when using pulsar functions in kube...
# ask-ai
s
@RunLLM when using pulsar functions in kubernetes, to get function metrics, do we need podMonitors for each function deployed?
r
To collect metrics from Pulsar Functions deployed in Kubernetes, you typically use Prometheus to scrape metrics from the function pods. According to the StreamNative blog on auto-scaling Pulsar Functions, you can use a
ServiceMonitor
to collect metrics from Pulsar Functions. This involves creating a
ServiceMonitor
resource that binds to each function's service, allowing Prometheus to monitor and collect metrics. You do not necessarily need a separate
PodMonitor
for each function if you are using
ServiceMonitor
with Prometheus Operator, as it can be configured to monitor multiple services. However, if you prefer using
PodMonitor
, it can be used to directly scrape metrics from the pods themselves. The choice between
ServiceMonitor
and
PodMonitor
depends on your specific setup and how you prefer to organize your monitoring configuration. Would you like more details on setting up
ServiceMonitor
or
PodMonitor
for Pulsar Functions in Kubernetes? Sources: - StreamNative blog on auto-scaling Pulsar Functions 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.