@mimik/systeminfo
v4.1.2
Published
systeminfo and healthCheckInfo response and path for mimik microservices
Readme
systeminfo
Example
// default import
import systemInfo from '@mimik/systeminfo';
// or named imports
import { getSystemInfo, getHealthCheckInfo, filterConfig, healthInfo } from '@mimik/systeminfo';- systeminfo
- ~filterConfig(config) ⇒ object
- ~healthInfo() ⇒ object
- ~getHealthCheckInfo(con, req, res) ⇒ void
- ~getSystemInfo(con, req, res, config) ⇒ void
systeminfo~filterConfig(config) ⇒ object
Retrieving the filter config of the service in prod or the config in other environments.
Kind: inner method of systeminfo
Returns: object - config: The filtered config.
Category: sync
| Param | Type | Description | | --- | --- | --- | | config | object | The server configuration. |
systeminfo~healthInfo() ⇒ object
Retrieving the healthInfo of the service.
Kind: inner method of systeminfo
Returns: object - info: The health info.
The following environment variables are used:
| Env variable name | Description | Default | Comments |
| ----------------- | ----------- | ------- | -------- |
| SERVER_NAME | name of the server | | |
| SERVER_TYPE | type of the server | | |
| SERVER_ID | id of the server instance | | |
| SERVER_VERSION | version of the server | | |
| NODE_ENV | environment of the server instance | | |
| SWAGGER_FILE_VERSION | version of the Swagger file used for the API | | |
| SWAGGER_FILE_NAME | name of the Swagger file for the API | | |
| SWAGGER_FILE_ACCOUNT | account holding the Swagger file for the API | | |
| SWAGGER_FILE_PROVIDER | provider of the Swagger file for the API | | |
| REGISTRATION_STATUS | status of the registration to mIT | | |
| SERVER_LOCAL_IPV4 | local ipv4 address of the server instance | | |
| SERVER_PUBLIC_IPV4 | public ipv4 address of the instance | | |
| SERVER_LOCATION_LON | longitude of the location of the server instance | | |
| SERVER_LOCATION_LAT | latitude of the location of the server instance | | |
| SERVER_PORT | port of the server instance | | |
| DEPLOY_TIME | time when the deployment was done | | |
| DEPLOY_GIT_REPO_BRANCH | git branch used for deployment | | |
| DEPLOY_GIT_REPO_HASH_KEY | hash key of the git repo branch | | |
| CLUSTER_STATUS_SERVERS | number of servers in the cluster | | |
| CLUSTER_STATUS_UPDATED_AT | last update of the cluster information | | |
Category: sync
systeminfo~getHealthCheckInfo(con, req, res) ⇒ void
Get healthCheck info.
Kind: inner method of systeminfo
Category: sync
Requires: module:@mimik/response-helper, module:@mimik/swagger-helper
| Param | Type | Description | | --- | --- | --- | | con | object | The context of the call. | | req | object | The HTTP request. | | res | object | The HTTP response. |
systeminfo~getSystemInfo(con, req, res, config) ⇒ void
Get system info.
Kind: inner method of systeminfo
Category: sync
Requires: module:@mimik/response-helper, module:@mimik/swagger-helper, module:@mimik/lib-filters, module:@mimik/systeminfo-filters
| Param | Type | Description | | --- | --- | --- | | con | object | The context of the call. | | req | object | The HTTP request. | | res | object | The HTTP response. | | config | object | The server configuration. |
