summaryrefslogtreecommitdiffstats
path: root/modules/tozt
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tozt')
-rw-r--r--modules/tozt/files/nginx/chronograf-tls.conf16
-rw-r--r--modules/tozt/files/nginx/chronograf.conf10
-rw-r--r--modules/tozt/files/nginx/influxdb-tls.conf16
-rw-r--r--modules/tozt/files/nginx/influxdb.conf10
-rw-r--r--modules/tozt/manifests/monitoring.pp22
-rw-r--r--modules/tozt/manifests/tick.pp25
6 files changed, 99 insertions, 0 deletions
diff --git a/modules/tozt/files/nginx/chronograf-tls.conf b/modules/tozt/files/nginx/chronograf-tls.conf
new file mode 100644
index 0000000..b6f838e
--- /dev/null
+++ b/modules/tozt/files/nginx/chronograf-tls.conf
@@ -0,0 +1,16 @@
+server {
+ listen 443;
+ server_name chronograf.tozt.net;
+
+ access_log /var/log/nginx/chronograf.access.log;
+ error_log /var/log/nginx/chronograf.error.log;
+
+ include ssl;
+
+ location / {
+ proxy_pass http://127.0.0.1:8888/;
+ auth_basic "chronograf";
+ auth_basic_user_file "/media/persistent/chronograf.htpasswd";
+ }
+}
+# vim:ft=nginx
diff --git a/modules/tozt/files/nginx/chronograf.conf b/modules/tozt/files/nginx/chronograf.conf
new file mode 100644
index 0000000..9011fd6
--- /dev/null
+++ b/modules/tozt/files/nginx/chronograf.conf
@@ -0,0 +1,10 @@
+server {
+ listen 80;
+ server_name chronograf.tozt.net;
+
+ access_log /var/log/nginx/chronograf.access.log;
+ error_log /var/log/nginx/chronograf.error.log;
+
+ rewrite ^(.*) https://$host$1 permanent;
+}
+# vim:ft=nginx
diff --git a/modules/tozt/files/nginx/influxdb-tls.conf b/modules/tozt/files/nginx/influxdb-tls.conf
new file mode 100644
index 0000000..5b06d34
--- /dev/null
+++ b/modules/tozt/files/nginx/influxdb-tls.conf
@@ -0,0 +1,16 @@
+server {
+ listen 443;
+ server_name influxdb.tozt.net;
+
+ access_log /var/log/nginx/influxdb.access.log;
+ error_log /var/log/nginx/influxdb.error.log;
+
+ include ssl;
+
+ location / {
+ proxy_pass http://127.0.0.1:8086/;
+ auth_basic "influxdb";
+ auth_basic_user_file "/media/persistent/influxdb.htpasswd";
+ }
+}
+# vim:ft=nginx
diff --git a/modules/tozt/files/nginx/influxdb.conf b/modules/tozt/files/nginx/influxdb.conf
new file mode 100644
index 0000000..744e2fd
--- /dev/null
+++ b/modules/tozt/files/nginx/influxdb.conf
@@ -0,0 +1,10 @@
+server {
+ listen 80;
+ server_name influxdb.tozt.net;
+
+ access_log /var/log/nginx/influxdb.access.log;
+ error_log /var/log/nginx/influxdb.error.log;
+
+ rewrite ^(.*) https://$host$1 permanent;
+}
+# vim:ft=nginx
diff --git a/modules/tozt/manifests/monitoring.pp b/modules/tozt/manifests/monitoring.pp
index d6a4af3..40a1e82 100644
--- a/modules/tozt/manifests/monitoring.pp
+++ b/modules/tozt/manifests/monitoring.pp
@@ -80,4 +80,26 @@ class tozt::monitoring {
'certbot',
]:
}
+
+ tick::client::plugin {
+ "cpu":
+ opts => {
+ percpu => true,
+ totalcpu => true,
+ collect_cpu_time => false,
+ report_active => false,
+ };
+ "disk":
+ opts => {
+ ignore_fs => ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"],
+ };
+ [
+ "diskio",
+ "kernel",
+ "mem",
+ "processes",
+ "swap",
+ "system",
+ ]:
+ }
}
diff --git a/modules/tozt/manifests/tick.pp b/modules/tozt/manifests/tick.pp
new file mode 100644
index 0000000..cc21c55
--- /dev/null
+++ b/modules/tozt/manifests/tick.pp
@@ -0,0 +1,25 @@
+class tozt::tick {
+ include tick::server
+
+ secret {
+ "/media/persistent/influxdb.htpasswd":
+ source => 'influxdb_htpasswd',
+ owner => 'http';
+ "/media/persistent/chronograf.htpasswd":
+ source => 'chronograf_htpasswd',
+ owner => 'http';
+ }
+
+ nginx::site {
+ "influxdb-tls":
+ source => 'puppet:///modules/tozt/nginx/influxdb-tls.conf',
+ require => Class['certbot'];
+ "influxdb":
+ source => 'puppet:///modules/tozt/nginx/influxdb.conf';
+ "chronograf-tls":
+ source => 'puppet:///modules/tozt/nginx/chronograf-tls.conf',
+ require => Class['certbot'];
+ "chronograf":
+ source => 'puppet:///modules/tozt/nginx/chronograf.conf';
+ }
+}