powerlog

    2.0.2 • Public • Published

    Powerlog

    Powerful log querying for everyone.

    Usage

    const AWS = require('aws-sdk');
     
    (async () => {
      
      // Authenticate AWS instance.
      AWS.config.credentials = new AWS.Credentials('some access key', 'some secret access key');
      AWS.config.credentials = await new powerlog.AWSCredentialHelper().getRoleCredentials(AWS, 'some ARN');
     
    AWS.config.credentials = new AWS.Credentials("some access key", "some secret access key");
      AWS.config.credentials = await (powerlog.AWS.AWSCredentialHelper).getRoleCredentials(AWS, "some arn");
     
      let fields = ['count(*) as name'];
      let filters = ['@message like "test"'];
      let sortingOrder = powerlog.AWS.CloudWatch.CloudWatchSortingOrder.DESCENDING;
      let sort = new powerlog.AWS.CloudWatch.CloudWatchSortingStatement('@timestamp', sortingOrder);
     
      let queryString = new powerlog.AWS.CloudWatch.CloudWatchStatsQueryStringParameters(fields, filters, sort)
      let queryOptions = new powerlog.AWS.CloudWatch.CloudWatchQueryOptions(
        'some-log-name',
        queryString,
        moment.utc('2019-06-09T00:00:00.000Z').subtract(1, 'day').unix(),
        moment.utc('2019-06-09T00:00:00.000Z').unix(),
        10000,
        'eu-west-1'
      );
     
    })();

    Keywords

    none

    Install

    npm i powerlog

    DownloadsWeekly Downloads

    0

    Version

    2.0.2

    License

    SEE LICENSE IN LICENSE

    Unpacked Size

    66.8 kB

    Total Files

    28

    Last publish

    Collaborators

    • artusvranken