1.1.14 • Published 3 years ago

kth-node-monitor v1.1.14

Weekly downloads
66
License
MIT
Repository
-
Last release
3 years ago

kth-node-monitor Build Status

Helper utilities for KTH/node-projects

Some use cases to consider:

  • no answer from _monitor
  • slow response times
  • circular dependencies
  • service down

Circular dependecies

  • on start up and REQUIRED dep is down we add subsystems from ../init/api and a dependecy won't be checked until the apiClient has been correctly initiated so we will be staged by Netscaler

  • running and REQUIRED dep goes down we will report fail and be unstaged by Netscaler, when dep is started and staged again we will report OK and we will be staged by Netscaler again

  • running and REQUIRED dep goes up again

  • if circular deps and roundtrip takes more than 1s there will be an infinite call loop and the original caller will time out and if REQUIRED will cause unstaging by Netscaler. Then all deps will be unstaged. Services will need to be restarted in order to return OK and be staged by Netscaler

HealthCheck

Now, there is a health check controller which works without depending on NPM package component-registry.

Look at HealthCheckPOC.md for more details.

Development Notes

If we have issues with recursive rependencies that resolve slowly we will need to implement one or both of the following:

LIFECYCLE JSON CALLS

PENDING -- starting shows pending for 30secs regardless of state of REQUIRED dependecies to allow consuming services to start up, OR if REQUIRED dependencies have status pending PENDING resolves to OK as text to please Netscaler OK -- all REQUIRED dependencies are OK ERROR -- at least one (1) REQUIRED dep is down

pass formData on requests

{ resolved: 'uri/to/service' }

To handle recursive references we need:

Starting service:

  • if required are OK OK | OK
  • if required are PENDING OK | PENDING
  • if required are ERROR or down OK | PENDING After 30s:
  • if required are OK OK | OK
  • if required are PENDING OK | PENDING
  • if required are ERROR ERROR | ERROR Required goes down ERROR | ERROR Required goes up again
  • if required PENDING OK | PENDING
  • if required OK OK | OK
  HTTP Response
    ✓ Every status code should be readable, like '503 Service Unavailable'
    ✓ 200 OK is defined.
    ✓ 400 Bad Request is defined.
    ✓ 404 Not Found is defined.
    ✓ 501 Internal Server Error is defined.
    ✓ 503 Service Unavailable is defined.
    ✓ Test to see if a request status code is 200 OK.
    ✓ Get the time passed since a timestame
    ✓ Get a 501 Internal Server Error when a check is not configuration properly.
    ✓ Get information if a service is required to work for the application to work.
    ✓ Get a 503 Service Unavailable message when check faild, and the service is required.
    ✓ Get a 503 Service Unavailable message when check faild, and the service is not required.

  System Response
    ✓ Get a 501 Internal Server Error when a check is not configuration properly.
    ✓ Get a 200 Ok message when OK, and required.
    ✓ Get a 200 Ok message when OK, and not required.
    ✓ Get a 503 Service Unavailable message when check faild, and required.
    ✓ Get a 503 Service Unavailable message when check faild, and not required.
    ✓ Get information if a service is required to work for the application to work.

  Utilities
    ✓ All 7 types of checks can be found.

  Utilities / Status check (kth-node-system-check).
    ✓ The monitor response writes APPLICATION_STATUS: OK when local systems are working
    ✓ The monitor response writes APPLICATION_STATUS: ERROR when one of the local systems are in faild state.
    ✓ The monitor response contains the local systems status message.
    ✓ The monitor response contains host name.
1.1.14

3 years ago

1.1.13

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.9

3 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.27

4 years ago

1.0.26

5 years ago

1.0.25

5 years ago

1.0.24

5 years ago

1.0.23

5 years ago

1.0.22

5 years ago

1.0.21

5 years ago

1.0.20

5 years ago

1.0.19

5 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

5 years ago

0.1.16

5 years ago

0.1.15

5 years ago

0.1.14

5 years ago

0.1.13

5 years ago

0.1.12

5 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

7 years ago

0.1.5

7 years ago