Open buep opened 8 years ago
ELK learnings - if someone want to try it...
Configure Jenkins server:
This job have been configured for post-build action, pushing the logs: http://code.praqma.net/ci/job/experimental-logstash-pretested-integration-plugin_verify-from-Github-Praqma_master/
It can also push each and every log console line, one by one. Checkbox above build steps.
Installed this plugin: https://wiki.jenkins-ci.org/display/JENKINS/Logstash+Plugin
Notes on getting the elastic cloud instance up and running
Open https://www.elastic.co/cloud, chose free trial and within minutes get access with your email.
In the Elastic cloud instance one get access to, create a minimal cluster. Enable Shield, and then enable Kibana. Then create a user under Security/Shield, but clicking "New user" and copy paste the password from plain-text in the first edit box. As soon as you click save, it is encrypted. Change the username, and save the password.
jenkins:6xll6fewadfafrfvol
In the second box, add the user to a role, eg. the admin role: admin: admin, jenkins Then the cluster is good, and you can log onto to Kibana, using the jenkins-user.
Examples of interesting data to collect (from my colleagues)
Any recommendations on plugins for collection of metrics exposed by the build and graphing them? Currently stuff like #testcases, #buildtime, #sizeofbinary
@MadsBaggesen @MadsNielsen @hoeghh @meekrosoft - you were involved in this on our slack. I persisted my old Fogbugz internal case 15165 publicly here now.
We need to figure out a good solution take take things out of our build systems.
Just a note, our approach could be general so that we just push json data to the receiver, for Jenkins we could have a setup like this to push data to ELK: I think I would rather build a library of small groovy snippet or notification snippets to use in the jobs, that post json to a graphing service, like ELK or graphana or likewise.
https://wiki.jenkins-ci.org/display/JENKINS/Notification+Plugin https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin https://github.com/cloudnative/jenkins-notify-plugin
@Andrey9kin is doing the same, their project lives in https://github.com/Praqma/quticon_visualization
Jenkins and other build systems generate a lot of data that should be persisted. Not so much the build results, which is handled as artifact management system, but rather all the extra data that are worth trending.
So assume we store artifact somewhere, and we also store all relevant traceability information, then I still would like to keep data for trending and data analysis like number of failed builds, number of tests, failing tests, skipped test etc. For specifically Jenkins it could be any number of line in the console that would be analysed and converted to number that could be trended or analysed.
An ELK is one way to do it and I successfully tried that on a demo ELK stack in elastic cloud that isn't present anymore. See these used references:
Running it locally next time?
To save some work next time, I will add some learnings as a comment below.
Alternatives to an ELK stack could be Humio, or Datadog or Prometheus + Graphana based on some internal discussions we have.
This issue is a briefing and I propose we spend it on deciding on some user-stories we see as important related to persisting scratch data from our build systems.