Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Display monitors status

Revision as of 21:17, 10 December 2012 by Scott.fisher.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Hudson uses monitors to validate various behaviors. If you dismiss one, Hudson will never propose you to reactivate it. This script allows you to check the status of all monitors and to reactive them.

About Monitors

A monitor is activated if it has detected something, so it would show on the /manage page, unless it is not enabled.

hudson.model.Hudson.instance.administrativeMonitors.each{ 
    println "* Monitor : "+it.id
    println "** Enabled : "+it.enabled
    println "** Activated : "+it.activated
    println "========="
}

It gives a result similar to the following example:

* Monitor : hudsonHomeIsFull
** Enabled : true
** Activated : false
=========
* Monitor : OldData
** Enabled : true
** Activated : false
=========
* Monitor : hudson.triggers.SCMTrigger$AdministrativeMonitorImpl
** Enabled : true
** Activated : false
=========
* Monitor : hudson.node_monitors.MonitorMarkedNodeOffline
** Enabled : true
** Activated : false
=========
* Monitor : hudson.diagnosis.ReverseProxySetupMonitor
** Enabled : true
** Activated : true
=========
* Monitor : hudson.diagnosis.TooManyJobsButNoView
** Enabled : true
** Activated : false
=========
* Monitor : hudson.model.UpdateCenter$CoreUpdateMonitor
** Enabled : true
** Activated : false
=========
* Monitor : hudson.plugins.scis_ad.ScisSupportOffer
** Enabled : true
** Activated : false
=========

If one monitor is disabled and you want to enable it just launch this command :

hudson.model.Hudson.instance.getAdministrativeMonitor('OldData').disable(false)

OldData is the monitor name returned in the list.

Back to the top