monitoring #657
kranskydog
started this conversation in
Ideas
monitoring
#657
Replies: 2 comments
-
There's one built-in. Hit this endpoint:
Source code: https://github.com/jhuckaby/Cronicle/blob/master/lib/api.js#L31-L41 |
Beta Was this translation helpful? Give feedback.
0 replies
-
That'll work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
One of the requirements in my role is to be able to monitor infrastructure and services through a central tool. This includes simply checking if a service is alive or not. (see, for example https://docs.oracle.com/en/enterprise-manager/cloud-control/enterprise-manager-cloud-control/13.3.1/emadm/creating-service.html#GUID-226813C5-3754-4798-BA2E-542DACE732D1 - in this case the test is a 'HTTP Ping') . I couldn't see an obvious way to do it in Cronicle, so I added a simple URIHandler to the server.startup in main.js
server.startup( function() {
// server startup complete
process.title = server.__name + ' Server';
server.WebServer.addURIHandler( '/alive', 'Alive', function(args, callback) {
// custom request handler for our URI
callback(
"200 OK",
{ 'Content-Type': "text/html" },
"Cronicle is alive\n"
);
} );
} );
There may be a better way to do this, but this serves my purpose
Beta Was this translation helpful? Give feedback.
All reactions