# stack-status

> A Node app to check up on your AWS Stack.

Latest version **0.0.3** (published 2017-05-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install stack-status
pnpm add stack-status
yarn add stack-status
bun add stack-status
```

## 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.3 |
| Published | 2017-05-15 |
| First published | 2017-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Daniel Morrison |
| Maintainers | danm |
| Keywords | AWS, cloudwatch, ec2 |

## Links

- npm: https://www.npmjs.com/package/stack-status
- Repository: https://github.com/danm/stack-status
- Homepage: https://github.com/danm/stack-status#readme
- Issues: https://github.com/danm/stack-status/issues
- npm.io page: https://npm.io/package/stack-status

## Dependencies (1)

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

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2017-05-15
- 0.0.2 — 2017-05-15
- 0.0.1 — 2017-05-15

## README

# Stack-Status
A NodeJS app for gathering data from ELB, EC2 and CloudWatch to aggregate them to show the status of a stack.

This is used for a specific cloud setup where custom tags are used in the naming of EC2 instances which are consistant.

Will be adding other API's for Redshift, ElasticSearch and other servcies soon.

## Install

```
npm i stack-status --S
```

## Config

```javascript
const config = {
  region: '', // aws region
  secretAccessKey: '', // aws secretAccessKey
  accessKeyId: '', // aws accessKeyId
  name: '', // aws tag for instance name
  env: '', // aws tag for enviroment
};
```

## Construct the class

```javascript
const stack = new Stack(config);
```

## Get stack status

```javascript
stack.status((err, res) => {
  if (err) throw err;
  console.log(res);
});
```

## Stack Status Response

```json
{
    "name": "serviceName",
    "instances": [
        {
            "name": "instanceName",
            "env": "live",
            "instanceID": "instanceID",
            "state": "running",
            "type": "t2.micro",
            "boot": "2017-04-27T00:44:31.000Z",
            "zone": "eu-west-1b",
            "ip": "10.38.162.125",
            "cpu": 0.33,
            "health": "InService"
        }
    ],
    "internal": {
        "dns": "internal.dns.address",
        "name": "internal.dns.name"
    },
    "external": {
        "dns": "external.dns.address",
        "name": "external.dns.name"
    }
}
```

## Get SQS status

```javascript
stack.getSQS('url.of.sqs.queue', (err, res) => {
  if (err) throw err;
  console.log(res);
});
```

## SQS status response

```json
{
  "name":"https://sqs.eu-west-1.amazonaws.com/522682236448/puddle-csv",
  "waiting":"0",
  "processing":"1"
}
```

## Other Public APIs

`stack.status()` combines the below methods and returns aggregated JSON, but the methods are available by themselves.

### Get EC2's

```javascript
stack.getEC2((err, res) => {
  if (err) throw err;
  console.log(res);
});
```

### Get ELBs

```javascript
stack.getELB((err, res) => {
  if (err) throw err;
  console.log(res);
});
```

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