This is a collection of the scripts that I'm using to install the Prometheus node exporter, Windows exporter and promtail in my hoem lab environments. There are certainly more battle-tested solutions (i.e., the Ansible Prometheus collection is 🤌🤌🤌), but these work well enough to use in small environments. Feel free to use and abuse.
NOTE: Rather than reinventing the wheel on Linux, I'm using https://github.com/carlocorradini/node_exporter_installer to install the node exporter.
NOTE: While yes, Windows does have the ability to create a service natively, I've found that starting the Promtail binary via the natively supported method isn't possible. I'm using WinSW to create a service that will start the Promtail binary.