Merge branch 'collect-grafana-metrics' of kazu634/itamae into master

This commit is contained in:
Kazuhiro MUSASHI 2020-09-27 00:27:01 +09:00 committed by Gitea
commit c9fcead1ec
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,6 @@
{
"service": {
"name": "grafana",
"port": 3000
}
}

View File

@ -3,6 +3,15 @@ service 'grafana-server' do
action [ :enable, :start ]
end
# Deploy `consul` config for `grafana`:
remote_file '/etc/consul.d/service-grafana.json' do
owner 'root'
group 'root'
mode '644'
notifies :restart, 'service[supervisor]'
end
# Firewall settings here:
%w( 3000/tcp ).each do |p|
execute "ufw allow #{p}" do

View File

@ -51,6 +51,12 @@ scrape_configs:
services:
- 'node_exporter'
- job_name: 'grafana'
consul_sd_configs:
- server: 'localhost:8500'
services:
- 'grafana'
alerting:
alertmanagers:
- static_configs: