How to enable Multitenancy in Prometheus in Cloud foundry

47 views
Skip to first unread message

Animesh Kumar

unread,
Dec 9, 2020, 8:10:13 AM12/9/20
to Prometheus Users
Hi Team,

I am trying to check if we can make Prometheus tenant aware in such a way that there is a data separation.

Is there a way for this in Cloud foundry ?

Thanks,
Animesh

Stuart Clark

unread,
Dec 9, 2020, 8:54:05 AM12/9/20
to Animesh Kumar, Prometheus Users
On 09/12/2020 13:10, Animesh Kumar wrote:
> Hi Team,
>
> I am trying to check if we can make Prometheus tenant aware in such a
> way that there is a data separation.
>
Prometheus has no native support for multi-tenancy. All data within a
single Prometheus server is stored together. It would be possible to
have a label to indicate the tenant for every metric, but you'd need to
ensure that was applied everywhere (for queries you could use the query
proxy). Having all data within a single Prometheus could have problems.
You might find that the overall usage of the Prometheus server (number
of metrics and queries) could become bigger than you can accommodate
(e.g. memory needed). Also as everything is shared you wouldn't be able
to have different retention periods or other settings (like query
limits) and you would find that one tenant could easily impact on others
(e.g. more scrapes or running large queries).

Having said that several of the Prometheus scaling & remote read/write
solutions such as Thanos do support different levels of multi-tenancy,
usually allowing you to segment storage or run queries in a way that
prevents cross-tenant impact. Alternatively you could just run a
separate Prometheus server for each tenant. The overhead for running
multiple instances isn't all that high, so you shouldn't really see many
downsides compared to a single shared instance, while getting the
advantages of separate storage, independent settings and lack of
cross-tenant impacts.

Animesh Kumar

unread,
Dec 9, 2020, 10:22:35 AM12/9/20
to Prometheus Users
Hi Team,

Thank you for the response,

Is there a document to deploy Thanos as a cloud foundry application?

Thanks,
Animesh

Stuart Clark

unread,
Dec 9, 2020, 11:30:10 AM12/9/20
to Animesh Kumar, Prometheus Users
On 09/12/2020 15:22, Animesh Kumar wrote:
> Hi Team,
>
> Thank you for the response,
>
> Is there a document to deploy Thanos as a cloud foundry application?

Unfortunately I'm not an expert in either Thanos or Cloud Foundary. Ben
& co does such a thing exist that you know of?

Animesh Kumar

unread,
Dec 9, 2020, 11:33:01 PM12/9/20
to Prometheus Users
Hi Ben and Co, 

Can you please assist here?

Thanks,
Animesh

Reply all
Reply to author
Forward
0 new messages