Enable HTTPS on influxdb for debian

To enable HTTPS on influxdb for debian do the following.

Get a certificate. Easy way is to let debian do it for you. The ssl-cert package will generate a self signed cert.

Now pipe the key and pem to somewhere influxdb can get to it. 

Then turn on https in your /etc/influxdb/influxdb.conf and point to your new pem.

Start up influxdb and you’re done.

 

Bash: Run command if exists, else echo blank

Useful if you want to only output something if a command exists.

For example, I use this on my Proxmox hypervisors with ZFS to get status. Not all my hypervisors have zfs arrays. Makes it easy to blanket ssh to all hypervisors and get zfs status if it exists. For a custom status page I wrote.