Skip to content

[JENKINS-75530] Dedicated and pluggable health-check endpoint #16702

@jenkins-infra-bot

Description

@jenkins-infra-bot

When running Jenkins in a managed environment, it is important to know (like all web application) whether it is healthy or not.

Jenkins doesn't offer any dedicated endpoint for that, and most users currently rely on an arbitrary URL like $JENKINS_URL/login or $JENKINS_URL/whoAmI/api/json?tree=authenticated.

The login endpoint is problematic for several reasons:

  • It creates a throw-away session which causes memory waste
  • In some security realms, this endpoint is actually unused as it doesn't used password-based authentication. But as many people use it for healthcheck, it makes it impossible to removed.

Having a normalized endpoint would allow core or plugin implementations to contribute their own healthchecks. In CloudBees CI for example, we need a clustering subsystem to be online to consider the Jenkins instance as healthy. If it crashes for any reason, we want a probe to fail so that it would automatically reschedule the instance.


Originally reported by vlatombe, imported from: Dedicated and pluggable health-check endpoint
  • assignee: vlatombe
  • status: Closed
  • priority: Major
  • component(s): core
  • resolution: Fixed
  • resolved: 2025-04-15T08:04:07+00:00
  • votes: 0
  • watchers: 2
  • imported: 2025-11-24
Raw content of original issue

When running Jenkins in a managed environment, it is important to know (like all web application) whether it is healthy or not.

Jenkins doesn't offer any dedicated endpoint for that, and most users currently rely on an arbitrary URL like $JENKINS_URL/login or $JENKINS_URL/whoAmI/api/json?tree=authenticated.

The login endpoint is problematic for several reasons:

  • It creates a throw-away session which causes memory waste
  • In some security realms, this endpoint is actually unused as it doesn't used password-based authentication. But as many people use it for healthcheck, it makes it impossible to removed.

Having a normalized endpoint would allow core or plugin implementations to contribute their own healthchecks. In CloudBees CI for example, we need a clustering subsystem to be online to consider the Jenkins instance as healthy. If it crashes for any reason, we want a probe to fail so that it would automatically reschedule the instance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions