Skip to content

Sets up Prometheus, Alert Manager, Node Exporter, Grafana, and Nginx reverse proxy

License

Notifications You must be signed in to change notification settings

CapstoneLabs/prometheus-server

Repository files navigation

prometheus-server

We found there's no working Prometheus cookbooks out there so we wrote our own. You will need to write your own prometheus.yml.

Testing

Tested on Ubuntu 16.04 and CentOS 7.3+

Attributes

  • Versions are established in the default attributes file. You only need to edit the version numbers and everything else will be done for you.
  • There's an expected attribute called ['prometheus']['alertmanager']['slack_api_url'] which serves as a global in alertmanager.yml for your Slack hook. You can either override /etc/alertmanager/alertmanager.yml or provide it.
  • If you want users autogenerated for nginx basic auth then use a Chef Vault called users and list the users in the mentioned attributes.
  • Grafana can be entirely configured via attributes

Recipes

default

Installs all the other recipes.

prometheus

Installs and runs Prometheus server as a systemd service.

security

Sets up Nginx to proxy requests to Prometheus with basic auth that loops through a users attribute and corresponding Chef Vault named 'users'.

alertmanager

Installs and runs AlertManager server as a systemd service.

node_exporter

Installs and runs NodeExporter as a systemd service.

grafana

Note: auth.github utilizes the ['server']['domain'] attribute. Make sure you set it correctly or the redirect_uri for GitHub will not be set correctly and logins will fail.

Installs and runs Grafana as a systemd service.

To Do

  • Convert Cookbook files to Templates and use attributes
  • Clean up downloaded compressed files and folders

Development

  • If you plan to work on the cookbook don't forget to set environment variables SLACK_API_URL, CLIENT_ID and CLIENT_SECRET. Check out .kitchen.yml for more info.

PR's welcome :)

About

Sets up Prometheus, Alert Manager, Node Exporter, Grafana, and Nginx reverse proxy

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published