Cortex: a multi-tenant, horizontally scalable Prometheus-as-a-Service
cncf.io
cncf.io
Also, the article says Cortex "completes" Prometheus. While it does fill many of the gaps, there is still a big one: First-class support for pushing metrics. This seems especially important if you want to offer Prometheus as SaaS. Your customers won't want to run their own Prometheus installs (that's what they pay you for, after all), and asking customers to open their firewalls so that your Prometheus can discover and scrape their infrastructure is probably a non-starter.
I think that if it had gone with a push-based model it would have been just as successful.
Push vs Pull is unrelated to integrating service discovery. Right now I push metrics to Datadog. It can tell if my metrics are operating or not, because it's aware of the state of the Datadog agent and of what the EC2 API reports.
Re having downtime indicator that's really a few lines of code, if no event received in the last X seconds then the host is down or busy enough to need attention. With websocket connection you can react to such downtime pretty much immediately instead of waiting for the next poll.
I know there are workarounds but I really wish Prometheus would support some push based system out of the box. It also helps with tracking simple scripts that only run occasionally etc. And yes, I know, they provide workarounds, the docs are really good.
It seems to me that having a realtime system with push based metrics is cheap enough that we should have it already. Imagine ideal monitoring system of the future. Does it poll and refresh data every so often or are you able to see everything as it's happening?
I played with Cortex for a bit, built my own gateway to match & assign user IDs for incoming Prometheus push requests but from operational perspective running Cortex can be very expensive (if you want it just as a side project) :) GCP Bigtable seems like the best way to store & query data but even the dev instance is prohibitively expensive (last time I checked it was ~1k USD)
It's flexible for some architectures, but not others. If your potential customer runs their own servers or something like k8s that they can deploy Prometheus to, sure. But what if your potential customer runs on a PaaS like Heroku? Or a FaaS like lambda? Or what if what they primarily care about getting metrics from are jobs on some managed data processing service, like cloud dataflow? Etc.
In the end, to offer Prometheus/Cortex as a SaaS and be competitive with existing players like Datadog, SignalFX, etc I'd expect you'd have to run an API that your customers can code against to push data to you.
maybe it would be beneficial to replace it or strip it down to ensure your customer never has
to worry about storage performance, for example.
The way the user runs it means that they don't store any metrics locally. The Prometheus agent on the cluster does scraping and then sends the data immediately up to the central SaaS instance (Cortex). what if your potential customer runs on a PaaS like Heroku
The range of exporters is very extensive (https://prometheus.io/docs/instrumenting/exporters/). And, as K8s has become so important lots of other people are publishing Prometheus metrics. In the end, to offer Prometheus/Cortex as a SaaS and be competitive with existing players
like Datadog, SignalFX, etc I'd expect you'd have to run an API that your customers can code
against to push data to you.
Cortex provides a scalable backend storage for Prometheus metrics, it's designed as one component that someone running at large scale or a SaaS vendors needs. Your comparison isn't apples to apples.In Weaveworks case we've build integrations into our product that help connect and pull data from other systems. Overall I think Prometheus metrics have a strong future, and there will be lots of SaaS options for sending and consuming the data.
Ah, that's great! I was mistakenly assuming that Prometheus would still have to write the data to disk; I didn't realize you could disable local storage.
> The range of exporters is very extensive
Sure, but that doesn't solve the problem that your heroku dyno, or lambda function, etc cannot expose metrics for Prometheus to pull, but it could easily push metrics somewhere.
> it's designed as one component that someone running at large scale or a SaaS vendors needs. Your comparison isn't apples to apples.
That's fair; I was thinking of Cortex as something to adopt off the shelf, instead of something to integrate with. However, as a SaaS provider you can always build more custom functionality alongside Cortex instead of making it a direct part of the open-source project.
You are correct: there is no option to disable so we set to discard after 2 hours. Prometheus doesn’t write continuously to disk so the io is not noticeable.
To your original question, yes we could produce another agent from the Prometheus code which did discovery, scraping and sending but not disk storage. We choose not to as it’s another thing to maintain.
Also we want an option to queue on disk when the network link to push is down.
(I am a Cortex maintainer)
Thats a good point; Cortex does accept pushes of metrics but its not that simple, and its definitely not easy right now. We're going to be working with the OpenMetrics project to have a better story about push and serverless - I expect we'll have this pretty soon, ie a matter of months.
If you want a sneak peak, checkout grafana/loki; its based on Cortex and has all theses features - buts it for logs, not metrics.
It is my understanding that Prometheus's storage engine is LSM based, and uses a compression scheme inspired by gorilla.
Boltdb is basically a btree which causes more write amplification.
Maybe you should try badgerdb.
After compressing timeseries they are stored and indexed using a database-like thing, typically DynamoDB or Bigtable, but soon BoltDB will be an option.
(I am a Cortex maintainer)
Also, if you really, really want push, there's always the push gateway in the Prometheus tool kit. Also, you can use Telegraf from InfluxDB with Prometheus.
I wrote something up two years about this that was pretty well received. https://www.circonus.com/2016/06/pully-mcpushface/
This seems especially important if you want to offer Prometheus as SaaS.
Your customers won't want to run their own Prometheus installs (that's what they pay you for, after all),
and asking customers to open their firewalls so that your Prometheus can discover and scrape their
infrastructure is probably a non-starter.
At Weaveworks we provide Prometheus as a SaaS using Cortex, which is how the project was started. For our service we have an agent that installs a Prometheus agent (and some other ones) on the customers K8s cluster.The upsides of running the agent on their side is that they benefit from Prometheus' automatic service discovery. They can also use standard Prometheus configuration and scrapers to get the full capabilities for their environment.
There are also situations where the user wants to continue to run their own Prometheus, but down sample and send a limited number of metrics for long-term storage in the Weave Cloud SaaS. This can be done with one line in a standard Prometheus.
It's true that running the agent takes resources, I think the benefits are worth it. For most people the key question is getting the full value from their metrics data to enable better development and operations.
[NOTE]: Full Disclosure I work at Weaveworks where we provide Prometheus-as-a-Service (https://www.weave.works/features/prometheus-monitoring/)
NB I'm the main author of Cortex...
There is already an amazingly popular tech usage of Cortex, you almost certainly have one either on your person or feet from you night now.
For SEO reasons alone it makes no sense to call your new service by a well known name belonging to someone else.
PromHouse looks very promising: https://github.com/Percona-Lab/PromHouse
I would be wary of PromHouse since at a glance it seems to be storing each timestamp in a separate row, which will not be as space efficient as either of the above options.
Full disclosure, I am a maintainer of the Cortex project.
Can house multi-tenant-safe prometheus long-tail storage as well as others (graphite, opentsdb, influx, etc.). Put it all in one place, scale it up, radically storage efficient and has strong non-stop HA guarantees. It is state of the art, it isn't free.
Disclaimer: I'm the CEO of Circonus (IRONdb's home).