This is a script that listens on the metrics files and sends added metrics to AWS Cloudwatch.
And yes, it's Windows-compatible
- install nodejs
npm i -g aws-metrics-sender
aws-metrics-sender
command should be available now
I'm not a big fan of Windows OS and it's quite likely that the following steps can be further simplified, but I ended up with the following working procedure to have aws-metrics-sender running as a windows service
- install nodejs. There's an
.msi
available so the installation is fairly straightforward - create a directory
C:\aws-metrics-sender
or any other directory convenient for you cd dir
wheredir
is the the directory from step 2.npm i aws-metrics-sender
npm i -g node-windows
- put
agent-service.js
to . (example) - configure paths, aws creds etc
node agent-service.js install
If all went smoothly you'd see a new service aws-metrics-sender in the windows services:
It's also recommended to configure script restarts:
If something goes wrong you can check out log files in the node_modules\aws-metrics-sender\daemon
folder
To uninstall the service just run
node agent-service.js uninstall