1.0.0 • Published 3 years ago

alert-chart v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
3 years ago

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 });
  }
})();