alert-chart
v1.0.0
Published
Generate charts server-side for AWS Cloudwatch alarms and metrics.
Downloads
1
Readme
alert-chart
Generate charts server-side for AWS Cloudwatch alarms and metrics.
Install
$ yarn add alert-chart
Example
import fs from 'fs';
import { getAWSCloudWatchAlarmGraphOptions, generateGraph } from './alert-chart';
(async () => {
const options = await getAWSCloudWatchAlarmGraphOptions('us-east-1', 'MyTestAlarm');
const { stream } = await generateGraph(options);
if (stream) {
const outStream = fs.createWriteStream('test-alarm-chart.png');
stream.pipe(outStream, { end: true });
}
})();