I am setting up monitoring and log aggregation on my AWS and Digital Ocean servers, and I want to be able to include a Droplet ID in the meta-data for my log messages from Digital Ocean.
On AWS there is a way to get the Instance ID from inside the instance: How to get the instance id from within an ec2 instance?
I am trying to find some similar in Digital Ocean so I can have a unique ID in my logs to identify a droplet.
I might have multiple web servers behind a load balancer, all answering to the same hostname and not looking for something like the hostname, since hostname can be set to anything in /etc/hostname.
I want a unique ID to help me find my Droplet in the API or web console, and I want to be able to get it from a shell script running on the Droplet.