ffeast / aws-metrics-sender

A script that listens on the metrics file and sends added metrics to AWS CloudWatch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aws-metrics-sender

This is a script that listens on the metrics files and sends added metrics to AWS Cloudwatch.

And yes, it's Windows-compatible

Installation on Linux/Mac

  1. install nodejs
  2. npm i -g aws-metrics-sender
  3. aws-metrics-sender command should be available now

Installation on Windows

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

  1. install nodejs. There's an .msi available so the installation is fairly straightforward
  2. create a directory C:\aws-metrics-sender or any other directory convenient for you
  3. cd dir where dir is the the directory from step 2.
  4. npm i aws-metrics-sender
  5. npm i -g node-windows
  6. put agent-service.js to . (example)
  7. configure paths, aws creds etc
  8. node agent-service.js install

If all went smoothly you'd see a new service aws-metrics-sender in the windows services:

Here it is:

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

About

A script that listens on the metrics file and sends added metrics to AWS CloudWatch


Languages

Language:JavaScript 100.0%