# aws-stats

> an express router that exposes an api to get cloudmetrics stats from aws

Latest version **0.0.6** (published 2017-09-21) · SEE LICENCE IN LICENCE license · 0 weekly downloads

## Install

```sh
npm install aws-stats
pnpm add aws-stats
yarn add aws-stats
bun add aws-stats
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2017-09-21 |
| First published | 2017-07-25 |
| Weekly downloads | 0 |
| License | SEE LICENCE IN LICENCE |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | oliver.ross@hotmail.com |
| Maintainers | revilossor |

## Links

- npm: https://www.npmjs.com/package/aws-stats
- Repository: https://github.com/revilossor/aws-stats
- Homepage: https://github.com/revilossor/aws-stats#readme
- Issues: https://github.com/revilossor/aws-stats/issues
- npm.io page: https://npm.io/package/aws-stats

## Dependencies (2)

- [aws-sdk](https://npm.io/package/aws-sdk.md) ^2.83.0
- [express](https://npm.io/package/express.md) ^4.15.3

## Recent versions

- 0.0.6 (latest) — 2017-09-21
- 0.0.5 — 2017-09-19
- 0.0.4 — 2017-08-29
- 0.0.2 — 2017-07-25
- 0.0.1 — 2017-07-25

## README

# AWS-Stats

This module is an express router that exposes an api to get cloudmetrics stats from AWS.  

### Including in backend

The module just exposes an express router - so you just need to use it for a specific route. For example:  

```
const app = require('express')();

app.use('/foo', require('aws-stats'));

app.listen(8080);
```

**AWS Credentials**

You'll need to have some AWS credentials set up on the host machine for this to work. See [here](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html) for more details.

### The API

Route | Function | Parameters
--- | --- |  ---
**/list** | lists all valid regions and namespaces |
**/list/[NAMESPACE]** | lists all available metrics for NAMESPACE | *region*
**/stat/[NAMESPACE]/[METRIC]** | gets stats for metric in namespace | *region*, *age*, *regex*

**Querystrings**

All querystring parameters are optional.

Parameter | Function | Default
--- | --- | ---
**region** | a valid region | eu-west-2
**age** | how long ago (in ms) to gather stats from | 3600000 (1 hour)
**regex** | a regular expression for the resources to get stats for. The result will be the average for all matched resources | null (all resources)

---
_Source: https://npm.io/package/aws-stats · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
