8

I'm planning to supervise services by periodically checking if they are up and running, Jenkins is our central orchestration tool and must be running with near zero downtime.

How can I check health status of a Jenkins server - By health status I mean service is up and web app application is operational ?

Does Jenkins provide a native health check URL ? Or does I need to make additional scripts? if so what factors should be included in beside checking jenkins.service and curl web app home page.

6

The complication reside in the definition of the health status (and its usefulness).

You mentioned the definition being service is up and web app application is operational and for that indeed checking the homepage should suffice.

However that doesn't mean the service is properly configured for and correctly performing all the jobs that it's supposed to be doing. Without a consistent, universally acceptable definition of a health status there is no point of providing such information as a single, one-stop location to check.

But Jenkins offers via its Remote access API various checking points that users can combine to derive their interpretation of the overall service health status. For example maybe checking the status of all the configured jobs or at least that of the critical ones would be more useful, which could be done using the .../job_id/lastSuccessfulBuild/api/ or .../job_id/api/ checkpoints.

The JenkinsAPI could also be of interest (better docs at least), found via Where can I find jenkins restful api reference?

0

Check the login page, e.g. http://localhost:8080/login

Most pages are password protected but not this one (or you couldn't log in).

New contributor
Thorbjørn Ravn Andersen is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.