Getting Started with Prometheus – Part 2

As you’ve probably guessed by Docker posts, I’m a huge fan of containerisation. Therefore instead of installing Prometheus on a host, let’s instead spin it up in a container. As described on the Prometheus website, we can accomplish this by issuing only a single command:

Let’s break down each component of this command to make sure we fully understand what it is doing:

  • docker run: Spin up a container
  • -p 9090:9090: Bind a port on our Docker host to a container port. This enables devices outside of the Docker host to reach the container on port 9090
  • -v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml: Binds the /tmp/prometheus.yml file stored on the Docker host to  /etc/prometheus/prometheus.yml inside of the container
  • prom/prometheus: The <user_account>/<container_name> that we want to use

Continue reading

Getting Started with Prometheus – Part 1

If you’ve used Grafana, or even heard of it, chances are you’ve also heard of InfluxDB and Prometheus too. As I haven’t touched on the latter yet, I figured now is a good time to start. In case you haven’t heard of some, or all of these applications, let’s start off with a quick description on what they can do for us.

Note: You might also want to have a read of the My Monitoring Journey: Cacti, Graphite, Grafana & Chronograf post too.

Grafana is a frontend web app that is used to create beautiful dashboards. It does this by retrieving metrics which are stored on backend database servers such as InfluxDB, Prometheus MySQL, PostgreSQL and Graphite (to name just a few). It then uses metrics to create graphs which are displayed on the aforementioned dashboards.

Continue reading