Understanding Prometheus

75 views
Skip to first unread message

Obyvante

unread,
Feb 23, 2021, 3:20:16 AM2/23/21
to Prometheus Users

I’ve been learning and understanding how Prometheus work for a while. Overall, Prometheus is what I want to use for my project for analyze and collect data. Obviously, there are some parts I couldn’t understand. Therefore, I wanted to ask here and learn more about Prometheus.

About project, it’s an online game for desktop users. Because of it’s online, I need to collect data as much as possible. I’m using Prometheus Java Client for this project.

  1. Is Prometheus Java Client stable for production?

  2. What is my limitations? I don’t want to face with “couldn’t write data due to limitation” error.

  3. Is Prometheus fit my using purpose? Overall, I'll use Prometheus for collect and analyze almost everything. Therefore, there'll be a lot of data like financal transcations, in-game stats(health, online time), user locations, user active hours(who is more active etc.) and more.

  4. Should I collect data per user? Like "%user%_active_seconds". If we think there'd be a lot of users, is it bad to collect data per user?

Thanks for your answers in advance!

Ben Kochie

unread,
Feb 23, 2021, 3:46:27 AM2/23/21
to Obyvante, Prometheus Users
1. Yes, the Java client is production stable.

2. This is too vague to answer.

3. Again "almost everything" is too broad a question.

4. Yes, per-user data is usually not something you would store in Prometheus.

Prometheus is meant as a service monitoring software. It's designed to monitor the health of your server-side applications. It is a metrics-based system, designed to be fed pre-aggregated data like "total number of requests". It's not a transaction system, or a database, or an event log.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/2f11664e-6eb5-4fc3-9e51-ae5eedd3acd3n%40googlegroups.com.

Obyvante

unread,
Feb 23, 2021, 4:09:49 AM2/23/21
to Prometheus Users
Thank you for answering my questions, you're really helping me out!

I'm sorry for beeing vague for both 2nd and 3rd questions. I'll explain more about my project and say what I want to collect and analyze. 

(I use "player" as an "user")  
  • Player count, location, their  transactions(buying something from store) 
  • Sever performance, general performance such as CPU, RAM etc.
  • Database performance, such as MySQL, Redis, RabbitMQ and MongoDB.
  • Systems performance, such as loaded player data, packets across the network, physical server usage.
  • Game specific metrics, such as in-game curreny earned/spent, game length, game actions(player join X game etc.) and more.
Overall, I'm planning to use Prometheus for above scenarios. Do you think Prometheus fit for those scenarios?
23 Şubat 2021 Salı tarihinde saat 11:46:27 UTC+3 itibarıyla sup...@gmail.com şunları yazdı:

Stuart Clark

unread,
Feb 23, 2021, 5:09:07 PM2/23/21
to Obyvante, Prometheus Users
On 23/02/2021 09:09, Obyvante wrote:
Thank you for answering my questions, you're really helping me out!

I'm sorry for beeing vague for both 2nd and 3rd questions. I'll explain more about my project and say what I want to collect and analyze. 

(I use "player" as an "user")  
  • Player count, location, their  transactions(buying something from store) 
  • Sever performance, general performance such as CPU, RAM etc.
  • Database performance, such as MySQL, Redis, RabbitMQ and MongoDB.
  • Systems performance, such as loaded player data, packets across the network, physical server usage.
  • Game specific metrics, such as in-game curreny earned/spent, game length, game actions(player join X game etc.) and more.

Some yes and some no.

From your list the server performance, packet counts, database metrics are all core things you'd use Prometheus for. Many pieces of software already support Prometheus directly or have exporters available to make scraping metrics very easy.

For you other two bullet points it really depends on what you are thinking. If you are looking for high level metrics (such as total numbers of users by country, total amount of currency spend, total game lengths, etc.) where you are producing data with relatively low cardinality dimensions (labels) then again yes this would be suitable for Prometheus.

However, if you are looking for per-user data, or the use of other high cardinality dimensions (such as IP address) then Prometheus wouldn't be suitable. Equally if you are wanting to store event data (e.g. transaction details about a store purchase) Prometheus wouldn't be suitable. For these you would generally use an event store/database (either relational or noSQL). You can still generate metrics from that data, so Prometheus could still have a place in the overall system, but as Ben says it is really about monitoring the overall state of the system, with alerts or dashboards showing number of online users, amounts of sales, CPU usage, database connections or network bandwidth.

-- 
Stuart Clark
Reply all
Reply to author
Forward
0 new messages