General report with the following information:
- Master URL
- Master OS
- Jenkins instance ID
- Master version
- OS memory
- Master number of executors
- Slaves and number of executors
- CPU cores
- Java Version
- Heap size
- Number of Jobs
- % of pipeline jobs
- % of Maven jobs
- % of freestyle jobs
- Empty folders
- Jobs utilizing pooling and CRON
- Jobs to be updated (Always recomend to upgrade to latest after a week of release)
- Retention policy (folder size)
- timeout policies
Notes
- Schedule Regular Restarts During Quiet Hours (Restart every 2 weeks is always recomended)
- Monitor memory use
- Set bot initial and maximum heap size
- Add ‘%t’ to the GC log location (check this)
Hudson.instance.items.each { job ->
// Prints all the parameters from the object
job.metaClass.properties.each {println it.name}
// Prints all the methods from the object
println("Methods: " + job.metaClass.methods*.name.sort().unique())
}
// Prints all of jenkins internal configurations
def instance = Jenkins.getInstance()
instance.metaClass.properties.each {println it.name}
// Print lines to show values from properties
def items = Jenkins.instance.getAllItems()
items.each { item ->
println "\n================================================"
println item.name
println item.class
println ""
item.metaClass.properties.each {
println "println \"${it.name}: \${item.${it.name}}\""
}
println("\nMethods: " + item.metaClass.methods*.name.sort().unique())
}
println ''