npm package: @mimik/systeminfo
Description: systeminfo and healthCheckInfo response and path for mimik microservices
Author: mimik technology inc
Latest version: 4.1.2

<a name="module_systeminfo"></a>

## systeminfo
**Example**  
```js
// default import
import systemInfo from '@mimik/systeminfo';
// or named imports
import { getSystemInfo, getHealthCheckInfo, filterConfig, healthInfo } from '@mimik/systeminfo';
```

* [systeminfo](#module_systeminfo)
    * [~filterConfig(config)](#module_systeminfo..filterConfig) ⇒ <code>object</code>
    * [~healthInfo()](#module_systeminfo..healthInfo) ⇒ <code>object</code>
    * [~getHealthCheckInfo(con, req, res)](#module_systeminfo..getHealthCheckInfo) ⇒ <code>void</code>
    * [~getSystemInfo(con, req, res, config)](#module_systeminfo..getSystemInfo) ⇒ <code>void</code>

<a name="module_systeminfo..filterConfig"></a>

### systeminfo~filterConfig(config) ⇒ <code>object</code>
Retrieving the filter config of the service in prod or the config in other environments.

**Kind**: inner method of [<code>systeminfo</code>](#module_systeminfo)  
**Returns**: <code>object</code> - config: The filtered config.  
**Category**: sync  

| Param | Type | Description |
| --- | --- | --- |
| config | <code>object</code> | The server configuration. |

<a name="module_systeminfo..healthInfo"></a>

### systeminfo~healthInfo() ⇒ <code>object</code>
Retrieving the healthInfo of the service.

**Kind**: inner method of [<code>systeminfo</code>](#module_systeminfo)  
**Returns**: <code>object</code> - 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  
<a name="module_systeminfo..getHealthCheckInfo"></a>

### systeminfo~getHealthCheckInfo(con, req, res) ⇒ <code>void</code>
Get healthCheck info.

**Kind**: inner method of [<code>systeminfo</code>](#module_systeminfo)  
**Category**: sync  
**Requires**: <code>module:@mimik/response-helper</code>, <code>module:@mimik/swagger-helper</code>  

| Param | Type | Description |
| --- | --- | --- |
| con | <code>object</code> | The context of the call. |
| req | <code>object</code> | The HTTP request. |
| res | <code>object</code> | The HTTP response. |

<a name="module_systeminfo..getSystemInfo"></a>

### systeminfo~getSystemInfo(con, req, res, config) ⇒ <code>void</code>
Get system info.

**Kind**: inner method of [<code>systeminfo</code>](#module_systeminfo)  
**Category**: sync  
**Requires**: <code>module:@mimik/response-helper</code>, <code>module:@mimik/swagger-helper</code>, <code>module:@mimik/lib-filters</code>, <code>module:@mimik/systeminfo-filters</code>  

| Param | Type | Description |
| --- | --- | --- |
| con | <code>object</code> | The context of the call. |
| req | <code>object</code> | The HTTP request. |
| res | <code>object</code> | The HTTP response. |
| config | <code>object</code> | The server configuration. |