Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skellla/fastify-status
Returns common info about fastify server. Could be used for healthchecks and status monitoring.
https://github.com/skellla/fastify-status
fastify fastifyjs-plugin healthchecks monitoring
Last synced: about 2 months ago
JSON representation
Returns common info about fastify server. Could be used for healthchecks and status monitoring.
- Host: GitHub
- URL: https://github.com/skellla/fastify-status
- Owner: SkeLLLa
- License: mit
- Created: 2018-08-16T14:55:58.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T22:05:55.000Z (over 1 year ago)
- Last Synced: 2024-11-16T06:11:49.542Z (about 2 months ago)
- Topics: fastify, fastifyjs-plugin, healthchecks, monitoring
- Language: JavaScript
- Homepage: https://gitlab.com/m03geek/fastify-status/
- Size: 1.65 MB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# fastify-status
[![NPM Version](https://img.shields.io/npm/v/fastify-status.svg)](https://www.npmjs.com/package/fastify-status)
[![Downloads Count](https://img.shields.io/npm/dm/fastify-status.svg)](https://www.npmjs.com/package/fastify-status)
[![Vunerabilities Count](https://snyk.io/test/npm/fastify-status/badge.svg)](https://www.npmjs.com/package/fastify-status)
[![Build Status](https://github.com/SkeLLLa/fastify-status/workflows/build/badge.svg)](https://github.com/SkeLLLa/fastify-metrics/actions)
[![License](https://img.shields.io/npm/l/fastify-status.svg)](https://gitlab.com/m03geek/fastify-status/blob/master/LICENSE)
[![Codecov](https://img.shields.io/codecov/c/gh/SkeLLLa/fastify-status.svg)](https://codecov.io/gh/SkeLLLa/fastify-status)
[![LGTM Alerts](https://img.shields.io/lgtm/alerts/github/SkeLLLa/fastify-status.svg)](https://lgtm.com/projects/g/SkeLLLa/fastify-status/)
[![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/github/SkeLLLa/fastify-status.svg)](https://lgtm.com/projects/g/SkeLLLa/fastify-status/)Returns common info about fastify server. Could be used for healthchecks and status monitoring.
## ToC
- [fastify-status](#fastify-status)
- [ToC](#toc)
- [Installation](#installation)
- [Usage](#usage)
- [Format](#format)## Installation
```sh
npm i fastify-status --save
```[Back to top](#toc)
## Usage
Example with default plugin options.
```js
const fastify = require('fastify');
const statusPlugin = require('fastify-status');const app = fastify();
app.register(statusPlugin, {
info: '/__info__',
alive: '/__alive__',
});
```Use `alive` for healthchecks and `info` to get information and some stats of your server.
If `info` or `alive` is not present in config, then apropriate route will not be added.
[Back to top](#toc)
## Format
```js
{
uptime: '0d 0h 0m 10s',
memory: {
rss: '50Mb',
external: '40Mb',
heapTotal: '30Mb',
heapUsed: '20Mb',
},
start: '2020-05-10T07:41:20.389Z',
env: 'test',
name: 'my-server',
version: '1.0.0',
node: 'v14.0.0'
}
```[Back to top](#toc)
## Changelog
See [changelog](CHANGELOG.md).
[Back to top](#toc)
## See also
- [under-pressure](https://github.com/fastify/under-pressure) - more advanced healthcheck.
## License
Licensed under [MIT](./LICENSE).
[Back to top](#toc)