Jenkins Plugin Setup

Comments

5 comments

  • Official comment
    Avatar
    Nick Wilson

    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 Logic

  • Avatar
    Mark Rennie

    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

  • Avatar
    Mark Rennie

    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

  • Avatar
    Nick Wilson

    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

  • Avatar
    Shaun Martin

    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

    https://plugins.jenkins.io/sumologic-publisher

Please sign in to leave a comment.