Jenkins Plugin Setup
Hi,
I am trying to ingest information from one of our on-prem Jenkins instances into Sumologic as part of a POC looking at SumoLogic to provide a DevOps Dashboarding capability for our organisation.
On the Jenkins instance I have installed the plugin from - https://wiki.jenkins.io/display/JENKINS/Sumologic+Publisher+Plugin
However I am not sure of how to get this working end-to-end and didn't see any instructions in the documentation for this integration.
1. Will there not need to be some configuration details passed to the plugin? Otherwise how does the plugin know where to send the data it collects?
2. Do I need to create a collector within Sumologic that points at this jenkins instance?
Any pointers to the key steps required to get this set-up would be appreciated.
Thanks,
Mark
-
Official comment
Hi Mark,
I haven't used the open source Jenkins plugin before, but I did some information on how to set it up:
1.) Create an HTTP Source in Sumo Logic; note the URL (it should look something like: https://sumologic_url/receiver/v1/http/SECRET_STRING )
2.) Install the plugin (which you've done) - a restart of Jenkins may be required for it to show up
3.) Go to Manage Jenkins -> Configure System
4.) Search for the "Sumologic Jenkins plugin"
5.) Input the HTTP Source URL from step 1
Please let me know if this helps.
Thanks,
Nick
Customer Success Manager, Sumo LogicComment actions -
Thanks Nick!
Setting the URL now means I can see some data coming in - as per the below. This comes in as log data - does this need to be metric data to enable us to graph this over time? For example we might want a graph of the AvgWaitingTime but not sure how to get this from my log data query.
I also understood we should get some metrics/details on the individual builds as they run but I don't see this data. Do you know if there is anything else we need to configure on our Jenkins instance for this to work? For example, Do I need to install another plugin or add a built step to redirect console output to SumoLogic?
{
-
"queue":
▼{
- "NumItemsInQueue":0,
- "NumBlockedItemsInQueue":0,
- "MaxWaitingTime":0,
- "AverageWaitingTime":0
-
"slaves":
▼{
- "numberOfSlaves":4,
- "numberOfExecutors":5,
- "numberOfFreeExecutors":34
}
Cheers,
Mark -
"queue":
-
I think I have actually worked this out. If you create a new Freestyle project you can add a Post Build Action. (Configure Build -> Post Build Actions -> Sumologic Build Logger). This then sends the data into SumoLogic and I can see this.
{
- "name":"Test4",
- "hudsonVersion":"2.27",
- "result":"SUCCESS",
- "number":1,
- "start_time":1508163843703,
- "duration":678
}
The other jobs I had were Pipeline jobs which I presume are not supported as they didn't have the 'Post Build Steps' option in Jenkins.
Now I have all the data coming in and can query this in the Log Search all I need to work out now is how to present this data nicely on a dashboard. Can you create dashboards/graph data from log searches?
Cheers,
Mark -
Hi Mark,
Thanks so much for updating us on your progress here - hopefully this will help people in the future in getting this plugin set up.
In regards to your question, absolutely! You can create dashboards/visualizations from any query that produces an aggregate result. It's as simple as clicking a button. Here are a couple of links from help.sumologic.com to help you get started:
https://help.sumologic.com/Dashboards-and-Alerts/Dashboards/Get-Started-with-Dashboards-and-Panels/01Create-a-Dashboard
https://help.sumologic.com/Search/Search-Query-Language/aaGroup
I hope this helps, but please post back here if you have any other questions.Thanks,
Nick
Customer Success Manager, Sumo Logic -
I am curious, do you have a Jenkins Pipeline capability to ingest logs? I use JenkinsFile and github pipelines and not freestyle projects. I have not been able to find any documentation saying it can use JenkinsFile
Why do you not provide instructions on either of these pages like almost all other plugin publishers do?
https://wiki.jenkins.io/display/JENKINS/Sumologic+Publisher+Plugin
Please sign in to leave a comment.
Comments
5 comments