# good-influxdb-test

> An InfluxDB good reporter.

Latest version **3.0.9** (published 2016-09-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install good-influxdb-test
pnpm add good-influxdb-test
yarn add good-influxdb-test
bun add good-influxdb-test
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.9 |
| Published | 2016-09-12 |
| First published | 2016-09-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Erik Toth |
| Maintainers | shaunwarman |
| Keywords | hapijs, good, influxdb, reporter |

## Links

- npm: https://www.npmjs.com/package/good-influxdb-test
- Repository: https://github.com/totherik/good-influxdb
- Issues: https://github.com/totherik/good-influxdb/issues
- npm.io page: https://npm.io/package/good-influxdb-test

## Dependencies (5)

- [hoek](https://npm.io/package/hoek.md) ^2.5.1
- [wreck](https://npm.io/package/wreck.md) ^5.0.1
- [fastpath](https://npm.io/package/fastpath.md) ^0.1.0
- [good-reporter](https://npm.io/package/good-reporter.md) ^2.0.0
- [json-stringify-safe](https://npm.io/package/json-stringify-safe.md) ^5.0.0

## Recent versions

- 3.0.9 (latest) — 2016-09-12
- 3.0.8 — 2016-09-09
- 3.0.7 — 2016-09-09
- 3.0.6 — 2016-09-09
- 3.0.5 — 2016-09-09
- 3.0.4 — 2016-09-09
- 3.0.3 — 2016-09-09
- 3.0.2 — 2016-09-09
- 3.0.1 — 2016-09-09
- 3.0.0 — 2016-09-09
- 2.1.19 — 2016-09-08
- 2.1.18 — 2016-09-08
- 2.1.17 — 2016-09-08
- 2.1.16 — 2016-09-08
- 2.1.15 — 2016-09-08
- … 14 more at https://npm.io/package/good-influxdb-test/versions

## README

# good-influxdb

[![Build Status](https://travis-ci.org/krakenjs/good-influxdb.svg)](https://travis-ci.org/krakenjs/good-influxdb)

A [`good-reporter`](https://github.com/hapijs/good-reporter) for use with [InfluxDB](http://influxdb.com/).

### GoodInflux

#### new GoodInflux(host, [options])
- `host` - The host, including protocol, port, and optional credentials, where InfluxDB is running
- `options`
 - `database` - The name of the database data will be written to. Defaults to `good`.
 - `events` - The [`events` configuration property](https://github.com/hapijs/good-reporter#new-goodreporter-options) as supported by `good-reporter`.
 - `threshold` - The number of events to queue before flushing to the database. Defaults to 25.
 - `username` - The username for the InfluxDB user. This value is overridden by host credentials, if available. (Requires `password`.)
 - `password`- The password for the InfluxDB user. This value is overridden by host credentials, if available. (Requires `username`.)
 - `precision` - The precision specified for InfluxDB timestamp. Defaults to `ms` (milliseconds).
    - `n` - nanoseconds
    - `u` - microseconds
    - `ms` - milliseconds (default)
    - `s` - seconds
    - `m` - minutes
    - `h` - hours


### Series

## request

 time | id | method | status | duration | path | labels | host | pid
------|----|--------|--------|----------|------|--------|------|-----

Each request is recorded as a point in the `request` data series. The request series can then be broken down into sub-series via [continuous queries](http://influxdb.com/docs/v0.8/api/continuous_queries.html). For example, to get requests per process per host you can run
```
select * from "request" into request.[host].[pid]
```

Once that query is complete, InfluxDB will dynamically create series for each new `host` and `pid` combination recorded.


## error


 time | url | method | message | stack | host | pid
------|-----|--------|---------|-------|------|-----

Responses that result in 500 status code are logged as errors. Each error contains the error message and stacktrace, in addition to the url and HTTP method pertaiing to the failed request.


## os
 time | cpu1m | cpu5m | cpu15m | totalmem | freemem | uptime | host | pid
------|-------|-------|--------|----------|---------|--------|------|-----

OS-level details are also recorded, including the columns above.
NOTE: Currently there is no deduping of data, therefore if multiple processes are running on the same host, duplicate OS data will be recorded to Influx.


## process
 time | memory | rss | heapTotal | heapUsed | delay | uptime | host | pid
------|--------|-----|-----------|----------|-------|--------|------|-----

process-leve details, including the event loop delay, are recorded into a `process` series.


## log

 time | data | tags | host | pid
------|------|------|------|-----

Server logs, including tags are also recorded as points in the `log` series.


### Custom Events
When logging a custom event a series will be created using that event name. Additionally, custom events wil automatically get logged with `time`, `host`, and `pid` columns. Additionally, any other fields/properties are logged as columns into InfluxDB. Some types are handled specially, however: primitives (string, boolean, number) are logged as-is, dates are converted to date strings, arrays are logged as comma-separated values, and objects are JSON stringified prior to logging.

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