About Prometheus
Prometheus is an open source systems monitoring and alerting toolkit. It collects and stores metrics from a variety of sources. It has its own time-series database and time-series query language. You can use Prometheus directly to construct near real-time graphs of metrics or to create programmable alerts. For more information on Prometheus, see: https://prometheus.io/docs/introduction/overview/
Prometheus consists of a server that runs on your network. For information on downloading and installing Prometheus, see: https://prometheus.io/docs/introduction/first_steps/
You configure your Prometheus server to scrape (poll) some set of endpoints for metrics. Typically, Prometheus scrapes for metrics every 15 seconds by sending an HTTP
or an HTTPS
GET
request to each endpoint for the /metrics
document.
An endpoint provides an HTTP or HTTPS server that responds to a GET
on /metrics
with a plain text ASCII document containing the metrics. Endpoints identify each metric with a name, a descriptive label, and a double-precision floating point value.
- The first line of text begins with
#HELP
followed by the metric name and the metric description. - The second line of text begins with
#TYPE
followed by the metric name and the Prometheus metric type. (The metric type is discussed later.) - The third line of text begins with the metric name, followed by the optional label(s), and then the value of the metric.
-
counter: A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart. An example is the number of
SELECT
statements executed. Some counter values reset, such as when you unload and load a TimesTen database from and to memory. Prometheus handles such situations automatically. -
gauge: A gauge is a metric that represents a single numerical value that can arbitrarily go up and down. An example is the number of bytes allocated for permanent space for the TimesTen database.
-
histogram: A histogram samples observations and counts them in configurable buckets. It also provides a sum of all observed values.
-
summary: A summary samples observations and provides a total count of observations and a sum of all observed values. It calculates configurable quantiles over a sliding time window.