Serverless / Lambda / FaaS Apps + Prometheus

1,035 views
Skip to first unread message

Dave Cadwallader

unread,
Feb 20, 2018, 5:51:37 PM2/20/18
to Prometheus Users
We're looking into replacing parts of our infrastructure with serverless functions.  Obviously we can't expose pull metrics for short-lived functions like this.  I was wondering if PushGateway is an appropriate choice for capturing metrics for these short-lived functions.

From the Prometheus docs and Robust Perception blog posts I know that PushGateway is generally considered to be an antipattern, and that the only valid use case is "collecting metrics from service-level batch jobs."

For a serverless architecture, would you recommend PushGateway, or a different solution altogether?  

One solution we considered since we're mostly an AWS shop at the moment was to have the functions push metrics to CloudWatch and then have Prometheus scrape cloudwatch.   But the problems with that are:

1) not vendor-agnostic
2) incurs cost

Thanks!
Dave

Matt Palmer

unread,
Feb 20, 2018, 11:11:49 PM2/20/18
to Prometheus Users
On Tue, Feb 20, 2018 at 02:51:36PM -0800, Dave Cadwallader wrote:
> From the Prometheus docs and Robust Perception blog posts I know that
> PushGateway is generally considered to be an antipattern, and that the only
> valid use case is "collecting metrics from service-level batch jobs."

Well, "serverless" is just batch jobs as a service...

- Matt

Ben Kochie

unread,
Feb 21, 2018, 1:32:49 AM2/21/18
to Dave Cadwallader, Prometheus Users
Without direct FaaS Prometheus support, you will have to hack something together yourself.  That's part of how they get you with costs and lock-in.  Sure the functions are cheap, but now you're stuck with CloudWatch.

One option would be to use an event aggregation gateway, for example:


Hopefully as function systems mature, we'll see better support for monitoring them as part of the various platforms.

--
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 prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/fe437026-f9ef-4322-b285-74796464dc85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages