Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-69785

monitoring jenkins agents "build queue length" inconsistent with server dashboard

      The jenkins monitoring "agent" would display the following (relative url: /monitoring/nodes?period=jour):

      While the server dashboard (releative url /) would display something like:

      We would like to have the Build Queue size tracked by monitoring.  Currently, jenkins monitoring "agents" "build queue length" does not reflect the build queue size.  The dashboard is verifiably correct because the jobs on the queue are listed.

          [JENKINS-69785] monitoring jenkins agents "build queue length" inconsistent with server dashboard

          evernat added a comment -

          In the monitoring plugin, the NodesCollector class uses Jenkins.getInstance().getQueue().getBuildableItems().size(), including buildable and pending items. The monitoring plugin currently counts the items in queue like the Load Statistics in the /manage/load-statistics page.

          While the UI probably uses Jenkins.getInstance().getQueue().getItems().length including blocked and waiting items.

          The difference you see is probably the blocked items count.

          evernat added a comment - In the monitoring plugin, the NodesCollector class uses Jenkins.getInstance().getQueue().getBuildableItems().size() , including buildable and pending items. The monitoring plugin currently counts the items in queue like the Load Statistics in the /manage/load-statistics page. While the UI probably uses Jenkins.getInstance().getQueue().getItems().length including blocked and waiting items. The difference you see is probably the blocked items count.

          evernat added a comment -

          fixed by https://github.com/jenkinsci/monitoring-plugin/commit/b5e1a9732681e1b694ad891db4993494b3f7e00e

          The monitoring plugin will now use Jenkins.getInstance().getQueue().getItems().length instead of Jenkins.getInstance().getQueue().getBuildableItems().size().

          evernat added a comment - fixed by https://github.com/jenkinsci/monitoring-plugin/commit/b5e1a9732681e1b694ad891db4993494b3f7e00e The monitoring plugin will now use Jenkins.getInstance().getQueue().getItems().length instead of Jenkins.getInstance().getQueue().getBuildableItems().size() .

            evernat evernat
            wu105 peng wu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: