Code Monkey home page Code Monkey logo

aws-couchwatch's Introduction

NOTE: This is unmaintained, unsupported code.

  • It worked the last time we ran it.
  • PRs welcome, but we may not fix issues anytime soon.

aws-couchwatch

Feeds metrics from a CouchDB cluster to AWS CloudWatch.

Install

git clone [email protected]:neighbourhoodie/aws-couchwatch.git
cd aws-couchwatch
npm i
npm link

Now you can run aws-couchwatch to begin posting metrics to AWS CloudWatch, provided you have credentials already specified.

For usage information, run aws-couchwatch -h.

NOTE: Remember to do aws configure before using AWS-CouchWatch! Otherwise it will not work.

Usage

# set the AWS_REGION env var to your target region

aws-couchwatch

Periodically scan a CouchDB instance and upload the results to AWS CloudWatch.

Commands:
  aws-couchwatch start  Periodically scan a CouchDB instance and upload the
                        results to AWS CloudWatch.                     [default]
  aws-couchwatch scan   Scan a CouchDB instance once and upload the results to
                        AWS CloudWatch.

Options:
  --help, -h      Show help                                            [boolean]
  --version       Show version number                                  [boolean]
  --url, -u       URL for the CouchDB cluster to scan. Defaults to the COUCH_URL
                  environment variable.
                               [default: "http://admin:password@localhost:5984"]
  --scanDb, -s    Scan each database in addition to each node.  [default: false]
  --interval, -i  Interval between scanning for metrics in milliseconds.
                                                                [default: 60000]

License

Apache 2.0

(c) Neighbourhoodie Software.

aws-couchwatch's People

Contributors

garbados avatar janl avatar jcoglan avatar wohali avatar

Stargazers

Martin McKeaveney avatar Gabriel de Oliveira Barbosa avatar

Watchers

Robin Mehner avatar Julia Krüger avatar James Cloos avatar  avatar  avatar

Forkers

fielded

aws-couchwatch's Issues

Cronify

The tool should optionally run once rather than at intervals, so that repeating behavior can be implemented by other software like cron.

first run

ubuntu@ip-172-31-17-162:~/couch-aws-logs-master$ DEBUG=1 AWS_REGION=eu-central-1 couch-aws-logs start 
[couch-aws-logs] Starting...
[couch-aws-logs] Polling for metrics...
{ InvalidParameterCombination: At least one of the parameters MetricData.member.1.Value and MetricData.member.1.StatisticValues must be specified.
    at Request.extractError (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/protocol/query.js:47:29)
    at Request.callListeners (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/sequential_executor.js:105:20)
    at Request.emit (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/sequential_executor.js:77:10)
    at Request.emit (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/home/ubuntu/couch-aws-logs-master/node_modules/aws-sdk/lib/sequential_executor.js:115:18)
  message: 'At least one of the parameters MetricData.member.1.Value and MetricData.member.1.StatisticValues must be specified.',
  code: 'InvalidParameterCombination',
  time: 2018-01-19T13:47:17.028Z,
  requestId: '431a73f9-fd1f-11e7-8e30-619861353e34',
  statusCode: 400,
  retryable: false,
  retryDelay: 90.48603312694368 }

add example systemd config

[Unit]
Description=AWS CloudWatch CouchDB Metrics Collector

[Service]

Environment=COUCH_URL=http://user:[email protected]:5984
Environment=DEBUG=1
Environment=AWS_REGION=eu-west-1
ExecStart=/usr/bin/couch-aws-logs start

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.