GithubHelp home page GithubHelp logo

sjtuchp / prometheus-monitoring-stack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danguita/prometheus-monitoring-stack

0.0 1.0 0.0 10 KB

๐Ÿ“ˆ A simple, single-node, Docker-based Prometheus monitoring stack

prometheus-monitoring-stack's Introduction

Prometheus monitoring stack

๐Ÿ“ˆ A simple, single-node, Docker-based Prometheus monitoring stack

Stack overview

Features

  • Well known monitoring stack.
  • Almost no configuration.
  • Minimal requirements.
  • High portability.

Requisites

Only Docker and Docker compose are required to build the entire stack. Check out the installation instructions.

Configuration

After cloning the repo on your Docker host, copy the example environment file to set your own values:

$ cp .env.example .env

Here are the environment variables and a short description for each:

GF_SECURITY_ADMIN_PASSWORD=secret                                 # Password for the "admin" user in Grafana
[email protected]                                           # Email address to register with `letsencrypt`
DOMAIN=my-little-monitor.facebook.com                             # Domain name to be used by the Nginx proxy
ALERT_SLACK_USERNAME=Prometheus                                   # Slack username in Prometheus server alerts
ALERT_SLACK_CHANNEL="#notifications"                              # Slack channel for Prometheus server alerts
ALERT_SLACK_INCOMING_WEBHOOK_URL=https://hooks.slack.com/whatever # Slack's incoming webhook URL to deliver Prometheus server alerts

Add your own checks (optional)

All rules defined in config/alert.rules will be loaded by Alertmanager. A couple of pretty basic alerts are provided as part of the stack, but feel free to add yours. Check out the alerting rules docs.

Installation and usage

From the root directory of this repo, run the command below:

$ docker-compose up -d

If everything goes well, the Grafana UI should be avilable at the https:// DOMAIN you specified:

e.g. https://my-little-monitor.facebook.com

Grafana Data Source set up

In order to reach the Prometheus container, it is needed to create a Prometheus Data Source with the proper URL in Grafana:

  • URL: http://prometheus:9090
  • Access: proxy

screen shot 2017-02-14 at 12 15 49 pm

After doing so, you are ready to start querying data.

This is how the Grafana UI with a custom dashboard looks like:

screen shot 2017-02-14 at 12 14 35 pm

Disclaimer and final words

This is just a bunch of scripts and stuff that I use to get some visibility on single-node server configurations, so please take them as a starting point. For complex architectures and custom instrumentation, extra configuration might be needed.

Also, please note that the node_exporter is being deployed as a Docker container, so it might not be exposing metrics from the actual host system.

Having said that, any feedback is very welcomed ๐Ÿ’ช

prometheus-monitoring-stack's People

Contributors

danguita avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.