Jenkins Build Stability/Statisitics Report plugin - jenkins

I have a jenkins instance running around 200 jobs. What I need is a plugin to show the build statistics for all the jobs.
Total Builds for each project
Failures
Success
Average time per build.
Searched a lot, but couldn't find a proper report plugin. Please help

These are few which you can look depending on how much customization/features you want to do/display:
https://wiki.jenkins-ci.org/display/JENKINS/Global+Build+Stats+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/build-metrics-plugin
https://wiki.jenkins-ci.org/display/JENKINS/Project+Statistics+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/eXtreme+Feedback+Panel+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/InfluxDB+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/CouchDB+Statistics+Plugin
And there is Dashboard-View too.

For collecting nodes machine metrics (CPU Time/ Used Memory / Build Time per node etc.), I found the monitoring plugin to be the best.
https://wiki.jenkins.io/display/JENKINS/Monitoring
When it comes to aggregates build times group by job, I couldn't find anything good within Jenkins UI, but if you have a datadog license, you can just enable the datadog Jenkins plugin, configure the datadog api key and hostname in Jenkins Config, and you are good to go.
https://www.datadoghq.com/blog/monitor-jenkins-datadog/

Related

Alerting for jenkin jobs stuck with no executors

We have multiple Jenkin masters and have enabled Jenkins Prometheus plugin and connected these masters as data sources to Grafana. I am currently interested in finding jobs which are waiting for executors for more than a certain time and create an alert based on this. I looked at Jenkins metrics but did not find any suitable metric to have monitoring for this use case. How can I achieve this?
You can access the Jenkins build queue via Groovy and check for entries waiting for too long.
It is possible to run Groovy scripts via the Jenkins REST API, which then will be your interface for polling for such "blocked" jobs.

Jenkins: How to choose an agent under a same label

Assume that Jenkins has three agents (Agent_1,Agent_2,Agent_3)
Both of them are labeled Linux_Server
Question:
When I select Linux_server to run a job, by default which agent will Jenkins
choose to actually run the job for me?
Jenkins will do it totally randomly ? Or choose a different agent ? Or choose a agent with least number of job? Or anything else ...
This is what their wiki says:
Some agents are faster, while others are slow. Some agents are closer
(network wise) to a master, others are far away. So doing a good build
distribution is a challenge. Currently, Jenkins employs the following
strategy:
If a project is configured to stick to one computer, that's always
honored.
Jenkins tries to build a project on the same computer that
it was previously built.
See this question for a few more sophisticated approaches. Especially the Least Load Plugin might sound interesting.

Query about jenkins in linux

I am having problem with the executor in jenkins.
Can anyone please tell me about executor in jenkins?
Also, explain it's practical implementation.
from : Jenkins User Documentation Home - Glossary
Executor: A slot for execution of work defined by a Pipeline or Project on a Node. A Node may have zero or more Executors configured which corresponds to how many concurrent Projects or Pipelines are able to execute on that Node.
An Executor does "the work" of executing the job steps. In our configuration, we have many nodes, each one corresponding to a VM host / server. We have each node configured with one executor per core. That let's us run one job per core, which is a generally good performance balance. That gives use the ability to run n jobs in parallel on an n-core VM. There are no rules regarding the ratios, depends really on what your jobs do and where the performance issues may be.

Tool for Job scheduling with logs instead of Jenkins (Rails project)

I have more than 30 rake tasks added to Jenkins for scheduling jobs. (Rails project)
But the jenkins server goes down frequently and uses 100% of CPU at most of the time.
Please suggest me a better job scheduler instead of Jenkins, which is also capable of
doing steps like
Notify an email when jobs fail
Log the jobs terminal output
Add dependency to jobs
Your question seems to come out as "recommend me a CI server".
But - why does Jenkins fall over and/or use 100% CPU most of the time? I'd be looking at why this is. My experience of Jenkins is that it is pretty stable and low overhead. If your hardware / OS / something else is flaky or just under provisioned for the task then swapping Jenkins out isn't going to fix that.

Is any Jenkins plugin which could check jobs configuration against recommandation ?

We manage a large Jenkins instance(< 1000 jobs). We made some recommendations about job configuration like number of artifacts to keep, number of jobs to keep etc.
Is there a plugin which could check for jobs that do not respect this recommendation, and report them?
I've used the Groovy Script Console or the Configuration Slicing Plugin to accomplish these tasks.

Resources