agent
get information
get all
or
Computer and Node
Computer and Nodeexample for Computer Object
get description
get all info
result
example for Node Object
result
node->computeror get log
get projects tied to agent
[!NOTE|label:reference:]
result

or
get running job from label
[!TIP] solution:
hudson.model.Executor->hudson.model.queue.WorkUnit->org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTaskhudson.model.Executor->hudson.model.queue.WorkUnit->hudson.model.queue.WorkUnitContext->org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask
might helps: Label Linked Jobs
get number of executor of agents
or
get agent credentialsId
[!NOTE|label:references:]
or simple output
or
or
get agent environment variable
get agent labels
function
or
cloud agents
check how many cloud agent running
KubernetesComputer
[!NOTE] references:
result
executor
reference:
[!NOTE|label:getParentExecutable]
basic usage
result
features
result
stop all running builds via WorkflowRun
[!NOTE]
using
WorkflowRun.finishmight cause issue : https://stackoverflow.com/q/75651552/2940319
force interrupt executors
to WorkflowRun
WorkflowRun[!NOTE|label:basic concept]
Computer->Executor->ExecutorStepExecution$PlaceholderTask$PlaceholderExecutable->WorkflowRun
to WorkUnit and SubTask ( ExecutorStepExecution.PlaceholderTask )
WorkUnit and SubTask ( ExecutorStepExecution.PlaceholderTask )result
to Computer
Computerresult
[!NOTE|label:references:]
update agent label
[!NOTE|label:references:]
update agent credentialsId
[!NOTE|label:references:]
or simply
by
Jenkins.instance.addNode
universal agent update
disconnect agent
legacy version
temporarily offline agent
[!NOTE|label:references:]
legacy version
restart agent
[!NOTE|label:references:]
delete agent
references:
for jenkins master
execute gc
display http sessions
display a simple threads dump
display deadlocked threads
display some memory data
display some jvm data
display heap histogram (object instances per class)
take a heap dump
display some MBean attribute value
send alerts
[!TIP|label:references:]
suppose that you want to check:
every 15 minutes on the Jenkins master,
if the system load average is above 50
if the active HTTP threads count is above 100
if there are deadlocked threads
if there are less than 10 Gb free disk space left:
by:
create a freestyle job in jenkins by clicking "New Item".
check "build periodically" and write a schedule, "*/15 * * * *" for example.
add a build step "execute system groovy script" and write a script
- or any script with monitoring values in this page - add a post-build action "E-mail Notification" and write your email in "Recipients". - you can also configure "Discard old builds" and write a description. - save. - click "Build now" to test it.
for jenkins agents
display jvm data, memory data, deadlocked threads by node
display some mbean attributes values by node
Last updated
Was this helpful?