Vagrantfile to launch prometheus and grafana with nginx and fluentd
Prometheus is easy to deploy because of single binary written in golang. I created a Vagrantfile so that we can more easily try prometheus running with Grafana, nginx and fluentd on our machine locally.
tmtk75/vagrant-prometheus-sample
It takes about 15 minutes to launch all VMs without time to download the box. It's useful if you're new to try Prometheus and Grafana.
What you can do
- Try Prometheus to see metrics from the below exporters
- node_expoter
- fluent-plugin-prometheus behaves an expoter which is configured to export metrics of nginx access logs
- You can see the above metrics Grafana
Layout
server
192.168.100.50
- prometheus:9090
- alertmanager:9093
- grafana:3000
- td-agent:24224
|
+------------+------------+
| |
v v
client1 client2
192.168.100.51 192.168.100.52
- node_exporter:9100 - node_exporter:9100
- nginx:80,9999 - nginx:80,9999
- td-agent:24231 - td-agent:24231
How to provision
It uses ansible_local provisioner with ansible roles.
- https://github.com/tmtk75/ansible-prometheus (I patched a little to parameterize template path)
- https://github.com/picotrading/ansible-grafana
Hopeing this repository is helpful for you.