Search code examples
timestamppointprometheus

Prometheus feed one data


I feed one data, the value is 121695000128 byte, it is not a point, it is a line, keep for 9 min more.

This is the query:

spark_history_apps_total_input_bytes{app_id="application_1477490087146_186839"}

Start: Thu, 08 Jun 2017 09:55:51 GMT

End:

graph1

If i change the value from byte to MB:

spark_history_apps_total_input_bytes{app_id="application_1477490087146_186839"}/1024/1024

The result’s time is changed.

Start: Thu, 08 Jun 2017 09:55:31 GMT End:

graph2

Questions:

  1. Why the result's time is changed? i don't understand.
  2. How can i get a point, not a line?

Please help me. thx.


Solution

  • Prometheus is a time based monitoring application, collecting and processing metrics.

    Q1: Why the result's time is changed?

    The x-axis of you graph is time, and Prometheus is showing you the evolution of the metric spark_history_apps_total_input_bytes for application application_1477490087146_186839 in time.

    If you point the mouse on the last dot available in the graph, you'll have the last metric pulled by Prometheus.

    Q2: How can i get a point, not a line?

    You can't have a point in a time based graph, if you use the Console tab, then you can have latest result pulled by Prometheus.