Skip to content
This repository was archived by the owner on Jan 23, 2020. It is now read-only.

add more metrics#180

Merged
gzussa merged 3 commits into
masterfrom
gzu/more_metrics
Dec 4, 2019
Merged

add more metrics#180
gzussa merged 3 commits into
masterfrom
gzu/more_metrics

Conversation

@gzussa

@gzussa gzussa commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

Added the following metrics:

  • jenkins.project.count
  • jenkins.plugin.count
  • jenkins.executor.count
  • jenkins.executor.in-use
  • jenkins.executor.free
  • jenkins.node.count
  • jenkins.node.offline
  • jenkins.node.online
  • jenkins.queue.buildable
  • jenkins.queue.pending
  • jenkins.queue.stuck
  • jenkins.queue.blocked

@gzussa
gzussa requested a review from a team as a code owner December 4, 2019 09:17
@Override
protected void doRun() throws Exception {
try {
logger.fine("doRun called: Computing Node metrics");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not the node metrics

nodeName = computer.getName();
}
JSONArray tags = new JSONArray();
tags.add("node-name:" + nodeName);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags.add("node-name:" + nodeName);
tags.add("node_name:" + nodeName);

}
if(labels != null){
for (LabelAtom label: labels){
tags.add("node-label:" + label.getName());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags.add("node-label:" + label.getName());
tags.add("node_label:" + label.getName());

JSONArray tags = new JSONArray();
tags.add("node-name:" + nodeName);
if(nodeHostname != null){
tags.add("node-hostname:" + nodeHostname);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tags.add("node-hostname:" + nodeHostname);
tags.add("node_hostname:" + nodeHostname);

}
}
client.gauge("jenkins.executor.count", executorCount, hostname, tags);
client.gauge("jenkins.executor.in-use", inUse, hostname, tags);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
client.gauge("jenkins.executor.in-use", inUse, hostname, tags);
client.gauge("jenkins.executor.in_use", inUse, hostname, tags);

Comment thread README.md Outdated
|--------------------------|---------------------------------------------------------------|
| jenkins.executor.count | Executor count |
| jenkins.executor.free | Number of unused executor |
| jenkins.executor.in-use | Number of idle executor |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| jenkins.executor.in-use | Number of idle executor |
| jenkins.executor.in_use | Number of idle executor |

Comment thread README.md Outdated
* `node`

`jenkins.executor.*` metrics have the following additional tags:
* `node-hostname`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `node-hostname`
* `node_hostname`

Comment thread README.md Outdated

`jenkins.executor.*` metrics have the following additional tags:
* `node-hostname`
* `node-name`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `node-name`
* `node_name`

Comment thread README.md Outdated
`jenkins.executor.*` metrics have the following additional tags:
* `node-hostname`
* `node-name`
* `node-label`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* `node-label`
* `node_label`

@gzussa
gzussa merged commit 0c74a63 into master Dec 4, 2019
@gzussa
gzussa deleted the gzu/more_metrics branch December 4, 2019 09:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Capture total number of jobs Add master statistics Add cluster statistics

2 participants