You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expose collected metrics on an endpoint (e.g /prometheus)
A Prometheus Server pulls metrics periodically from above exposed endpoints.
Service Discovery
You can hard-code the server hostnames into Prometheus config or use "service discovery" which dynamically discovers targets to scrape metrics from.
Prometheus Storage
Prometheus stores Time Series Data into "shards" on local storage.
π‘ A shard is an individual block or partition of a large database. Shards are usually stored in a distributed fashion to spread the load.
Each shard or block is of 2 hours worth of data.
β Note that a limitation of the local storage is that it is not clustered or replicated. Thus, it is not arbitrarily scalable or durable in the face of disk or node outages and should thus be treated as more of an ephemeral sliding window of recent data.
Prometheus local storage is not meant to be durable ( ref )
Prometheus + Remote Storage (e.g ElasticSearch) for more durability and scalability.
Prometheus has an inbuilt Time Series DB but Logstash does not (however, ElasticSearch can serve as the TS DB for LS).
Prometheus monitors services and gathers metrics.
Logstash gathers a lot of data including metrics, from various sources including Log Files.
Logstash gathers Metrics via the Beats framework.
Metricbeats module for Prometheus allows Prometheus metrics to be gathered by Logstash.
Whereas Prometheus is primarily used to gather data about the health of an application or a system, Logstash can be used for gathering a wider variety of data - from sources as disparate as Twitter feeds, arbitrary HTTP requests etc. There is also evidence that Logstash can store/transform data from IoT devices π²