-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix metric creation when node is offline in jenkins input #6627
Conversation
@ctNb Would you be able to test out this fix with your offline node? My Jenkins setup only has a single node right now. Here are some builds, let me know if you need a different one: |
i just tested the telegraf client on ubuntu and it seems not to work as expected. The offline node still doesn't show up. |
This is true, metrics without any fields are completely removed as they pass through Telegraf. I was expecting that the |
i am also setting up a clean test environment. I've installed the latest jenkins docker image and just added a node, which is not even existing. Jenkins shows this node in the GUI and API also as offline. When running now telegraf, the node is also not shown. |
Here is my output from an offline slave, so it seems that the response time monitor doesn't stick around for long, or maybe it stays only after some failures. {
"_class": "hudson.slaves.SlaveComputer",
"absoluteRemotePath": null,
"actions": [
{}
],
"assignedLabels": [
{
"name": "slave"
}
],
"description": "",
"displayName": "slave",
"executors": [
{}
],
"icon": "computer-x.png",
"iconClassName": "icon-computer-x",
"idle": true,
"jnlpAgent": false,
"launchSupported": true,
"loadStatistics": {
"_class": "hudson.model.Label$1"
},
"manualLaunchAllowed": true,
"monitorData": {
"hudson.node_monitors.ArchitectureMonitor": null,
"hudson.node_monitors.ClockMonitor": null,
"hudson.node_monitors.DiskSpaceMonitor": null,
"hudson.node_monitors.ResponseTimeMonitor": null,
"hudson.node_monitors.SwapSpaceMonitor": null,
"hudson.node_monitors.TemporarySpaceMonitor": null
},
"numExecutors": 1,
"offline": true,
"offlineCause": {
"_class": "hudson.slaves.OfflineCause$LaunchFailed"
},
"offlineCauseReason": "This agent is offline because Jenkins failed to launch the agent process on it.",
"oneOffExecutors": [],
"temporarilyOffline": true
} Adding another field will do the trick. I think for now the safest change, just to address the issue, is to add the |
Example output:
Updated builds: |
(cherry picked from commit bcf1bcf)
closes #6578
Required for all PRs: