From 642df4fb6653bd67f398a08412e77fda9b2dfe03 Mon Sep 17 00:00:00 2001 From: binary Date: Fri, 22 Jan 2021 11:46:52 +0100 Subject: Add grafana to OpenBSD cloud server --- roles/grafana/templates/grafana.conf.nginx.j2 | 9 +++++++++ roles/grafana/templates/grafana.ini.j2 | 6 +++--- roles/grafana/templates/grafana_reverse.conf.j2 | 9 --------- 3 files changed, 12 insertions(+), 12 deletions(-) create mode 100644 roles/grafana/templates/grafana.conf.nginx.j2 delete mode 100644 roles/grafana/templates/grafana_reverse.conf.j2 (limited to 'roles/grafana/templates') diff --git a/roles/grafana/templates/grafana.conf.nginx.j2 b/roles/grafana/templates/grafana.conf.nginx.j2 new file mode 100644 index 0000000..c0f926c --- /dev/null +++ b/roles/grafana/templates/grafana.conf.nginx.j2 @@ -0,0 +1,9 @@ +server { + listen {{ grafana_port_out }}; + root /usr/share/nginx/html; + index index.html index.htm; + + location / { + proxy_pass http://127.0.0.1:{{ grafana_port }}/; + } +} diff --git a/roles/grafana/templates/grafana.ini.j2 b/roles/grafana/templates/grafana.ini.j2 index 16453b8..75de264 100644 --- a/roles/grafana/templates/grafana.ini.j2 +++ b/roles/grafana/templates/grafana.ini.j2 @@ -15,7 +15,7 @@ instance_name = #################################### Paths #################################### [paths] # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) -;data = /var/lib/grafana +data = {{ grafana_dir }} # Temporary files in `data` directory older than given duration will be removed ;temp_data_lifetime = 24h @@ -24,7 +24,7 @@ instance_name = ;logs = /var/log/grafana # Directory where grafana will automatically scan and look for plugins -;plugins = /var/lib/grafana/plugins +;plugins = {{ grafana_dir }}/plugins # folder that contains provisioning config files that grafana will apply on startup and while running. ;provisioning = conf/provisioning @@ -35,7 +35,7 @@ instance_name = ;protocol = http # The ip address to bind to, empty will bind to all interfaces -;http_addr = 192.168.5.1 +http_addr = # The http port to use http_port = {{ grafana_port }} diff --git a/roles/grafana/templates/grafana_reverse.conf.j2 b/roles/grafana/templates/grafana_reverse.conf.j2 deleted file mode 100644 index c0f926c..0000000 --- a/roles/grafana/templates/grafana_reverse.conf.j2 +++ /dev/null @@ -1,9 +0,0 @@ -server { - listen {{ grafana_port_out }}; - root /usr/share/nginx/html; - index index.html index.htm; - - location / { - proxy_pass http://127.0.0.1:{{ grafana_port }}/; - } -} -- cgit v1.2.3