# Clone Debian Buster template, set up IPs, hostname, ssh keys
apt update
apt -y dist-upgrade

# Set up network interfaces, /etc/network/interfaces
auto lo
iface lo inet loopback
auto ens18 ens19 ens20 ens21 ens22 ens22:0 ens22:1
iface ens18 inet static
        address 10.22.22.117/24
        gateway 10.22.22.254
        dns-nameservers 10.22.22.254
        dns-search forksand.com
iface ens19 inet static
        address 10.68.68.117/24
iface ens20 inet static
        address 10.3.1.117/24
iface ens21 inet static
        address 10.3.2.117/24
iface ens22 inet static
        address 10.99.99.117/24
iface ens22:0 inet static
        address 10.99.1.117/24
iface ens22:1 inet static
        address 10.99.2.117/24

# Install telegraf
# Disable apt cache /etc/apt/apt.conf
curl -sL https://repos.influxdata.com/influxdb.key | apt-key add -
echo 'deb https://repos.influxdata.com/debian stretch stable' > /etc/apt/sources.list.d/telegraf.list
apt update
apt install telegraf

# Set config:
vim /etc/telegraf/telegraf.conf

# Under:
[[outputs.influxdb]]
  urls = ["http://10.22.22.116:8086"]

# Enable:
[[outputs.elasticsearch]]
   urls = [ "http://10.22.22.118:9200" ] 
   index_name = "telegraf-%Y.%m.%d"


# Enable:
[[outputs.graylog]]
   servers = ["10.22.22.109:9000"]

# XXX ?
# # Configuration for the Prometheus client to spawn
# [[outputs.prometheus_client]]


#
### XXX Backups
### XXX Prometheus :)

