diff --git a/bundles/influxdb2/items.py b/bundles/influxdb2/items.py new file mode 100644 index 0000000..666d06c --- /dev/null +++ b/bundles/influxdb2/items.py @@ -0,0 +1,22 @@ +repo.libs.tools.require_bundle(node, 'zfs') + +directories = { + '/var/lib/influxdb': { + 'owner': 'influxdb', + 'group': 'influxdb', + 'mode': '0750', + 'needs': { + 'pkg_apt:influxdb2', + }, + }, +} + + +svc_systemd = { + 'influxdb': { + 'needs': { + 'directory:/var/lib/influxdb', + 'pkg_apt:influxdb2', + }, + }, +} diff --git a/bundles/influxdb2/metadata.py b/bundles/influxdb2/metadata.py new file mode 100644 index 0000000..a56dcc7 --- /dev/null +++ b/bundles/influxdb2/metadata.py @@ -0,0 +1,34 @@ +defaults = { + 'apt': { + 'packages': { + 'influxdb2': { + 'needs': { + 'zfs_dataset:tank/influxdb2', + }, + }, + }, + 'repos': { + 'influxdb': { + 'items': { + 'deb https://repos.influxdata.com/{os} {os_release} stable', + }, + }, + }, + }, + 'icinga2_api': { + 'telegraf': { + 'services': { + 'INFLUXDB PROCESS': { + 'command_on_monitored_host': '/usr/lib/nagios/plugins/check_procs -C telegraf -c 1:', + }, + }, + }, + }, + 'zfs': { + 'datasets': { + 'tank/influxdb2': { + 'mountpoint': '/var/lib/influxdb', + }, + }, + }, +}