22 Replies Latest reply on Dec 17, 2018 2:55 PM by frederik

    Orion JIRA integration

    derhally

      Many SolarWinds Orion users need to integrate the monitoring and alerting capabilities with task or ticket tracking systems. The recent addition of the integration to ServiceNow allowed many users to have an easy way to connect the two worlds without needing custom scripts. In a similar way, the research team at SolarWinds has written an integration with Atlassian JIRA.

       

      Note: This integration currently relies on the "Alert Integration" feature in Orion.  Ensure that is turned on for the alerts that you want to create JIRA issues for.

       

      To gauge interest and find early bugs, we are releasing an unofficial alpha level integration for our customers who use JIRA. This integration synchronizes Orion alerts with JIRA issues. This post will describe the configuration and usage of this integration for users to try out and let us know additional features, usability, and usefulness of the software.

       

      The integration is meant to link alerts in Orion with issues in JIRA. For example,

      • A triggered alert in Orion will create a new issue in JIRA.
      • Alert notes in Orion will add a comment to the JIRA issue.
      • Acknowledged alerts will transition a JIRA issue to a certain state
      • Alerts that reset will transition a JIRA issue to a certain state.

       

      Step 1: Installation

      Download the bits attached to this post.

      Set up the service - install the service on your main Orion server.

       

      Step 2: JIRA Integration Configuration

      Next open the file settings.json from the installation directory with a text editor like Notepad.

      Update the following fields with the correct information.

      Orion Settings

      SettingDescription
      OrionHost

      Hostname of your Orion server

      OrionUsername

      Username of the Orion user you wish to access the Orion Information Service with. This must be an admin account in order to configure the alert notifications.

      OrionPassword

      Password for the user above

      WebhookListenUrlThe url that JIRA will call back when an event occurs in JIRA. The port in this field will need to be accessible through the firewall so that the JIRA events will be able to communicate back to the Orion JIRA Integration service


      JIRA Settings

      Setting
      Description
      ServerHostHostname for your JIRA server
      ServerPortPort your JIRA server is listening on
      UseHttpsWhether the JIRA server is configured to for HTTPS
      ProjectKeyProject key in JIRA that you want the issues opened in.
      IssueTypeKey

      JIRA issue type you would like the Orion JIRA Integration to create issues as. This field is one of the predetermined list of options available in JIRA like "Story", "Task", etc.

      UsernameJIRA username you want to use to connect to the JIRA server
      PasswordPassword for the above username
      AcknowledgedTransitionAction

      Name of the transition to set the issue to when an alert is acknowledged in Orion.  Set to an empty string if not used.

      ResetTransitionActionName of the transition to set the issue to when the alert is reset. Set to an empty string if not used
      EventsToListenForThis field is mainly for development use so do not adjust this field
      FieldAssignment

      Specify the mapping of Orion user properties to Jira custom fields.

      The Orion properties must be added under the "Alert Integration" section of the Alert Summery page.

       

      A sample definition would be

       

      "FieldAssignment" : {

           "JiraField1" : "IP Address",

           "JiraField2" : "Caption"

      }

       

      Sample settings file

      {
       
          "OrionHost": "orion.foo.local",
          "OrionUsername": "Test",
          "OrionPassword": "test",
          "WebhookListenUrlRoot": "http://localhost:8080",
          "Jira" : {
              "ServerHost" : "jira-01.foo.local",
              "ServerPort" : "8080",
              "UseHttps": false,
              "ProjectKey" : "ITX",
              "IssueTypeKey": "Task",
              "Username": "JiraUser",
              "Password": "JiraPass",
              "AcknowledgedTransitionAction" :  "",
              "ResetTransitionAction" :  "Done",
              "EventsToListenFor": [],
              "FieldAssignment": {},
          }
      }

       

       

      Restart the Orion JIRA Integration windows service after updating the configuration file.

       

      Step 3: Orion Alert Configuration


      Currently, the integration relies on the "Alert Integration" feature in Orion.   Edit each alert you want to create JIRA tickets for and make sure the alert is enabled and the "Alert Integration" checkbox is checked.   To do so

      1. Navigate to the "Manage Alerts" from the admin area and edit the alert


      2. Ensure the the alert is "Enabled"


      3. Navigate to the summary page by clicking the "summary" tab

      4. Expand the "Alert Integration" section and ensure that "Integrate alert with other SolarWinds products and subscribers" is checked.

      5. Click the submit button.

       

      Step 4: Test the integration

       

      Trigger a test alert in Orion and confirm that the desired task is created in JIRA.

       

       

       

      See the issue in JIRA

       

       

      Update the alert notes. Confirm that alert notes you add in Orion get entered as a comment in the JIRA task.

       

       

      See the notes as comments in the JIRA task.

       

      Test complete! Congratulations, you have now just used the SolarWinds Orion JIRA Integration.

       

      Step 5: Enjoy and give feedback

       

      Thank you for using this alpha stage integration and please let us know by responding to this post any additional requests you have for this sort of alerting integration. Also, since this is not an official release, you can not call SolarWinds support and get support for this feature. Support will be provided through this post from the research team at SolarWinds. If things are not functioning well, please stop the Orion JIRA Integration windows service and set the service to be disabled so that it does not restart on reboot.

       

      Thanks

      SolarWinds Architecture Research and Innovation Team

       

      Message was edited by: Zeid Derhally Updated attachment to provide more logging.

       

      Message was edited by: Zeid Derhally Updated to include information about the Field Assignment functionality

        • Re: Orion JIRA integration
          sodafish

          i cannot restart or stop the Jira service. Alert is also not being sent. cannot understand what value to put in WebhookListenUrl?

            • Re: Orion JIRA integration
              derhally

              The image you posted is not showing up.

               

              WebhookListenUrlRoot is the url that JIRA will callback on with events.   It should be set to the address that is reachable by JIRA.   You can also change the port to something that is not currently being used.

            • Re: Orion JIRA integration
              steven77nl

              I like to do some testing with this, but I am not able to get this to work.

               

              I have the plugin installed on my Orion Server.

              I can see in Jira that the Integration Service is login into Jira so now and then, but no tickets are created.

              Firewall wise everything is fine, so I must be missing something in my configuration.

               

              Do I need to enable something in the general Orion configuration ?

              Do I need a specific module installed ?

               

              Do I need to add a Jira Webhook in the Jira configuration ?

              (I tried this already and can see a constant active connection with netstat to port 8787 from the Jira server on the Orion server, but still no tickets are being created in Jira)

              ** edit **

              The Webhook part I already got sorted out. I checked the OrionJiraIntegrationService log file and the Jira account needed administrator rights to get it automatically created

              ****

               

              And if I gets this to work, would I be able to fill fields in the Jira Issues with certain values recorded in Orion ?

               

              Some of my configuration:

               

              OrionJiraIntegrationService Log file shows it's executing the creation of the tickets, but no tickets shown in Jira.

               

              2017-08-31 19:47:36,504 [3] DEBUG SolarWinds.InformationService.Contract2.InfoServiceAsyncProxy - Creating channel factory for Information Service using endpoint configuration 'Orion' and remote address 'net.tcp://solarwinds.xxxxxx.xxx:17777/SolarWinds/InformationService/v3/Orion/ssl'

              2017-08-31 19:47:37,097 [15] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Query: SELECT AA.AlertObjectID, AA.AlertActiveID

              FROM Orion.AlertActive AA

              INNER JOIN  Orion.AlertStatus ON  AA.AlertObjectID = AlertStatus.AlertObjectID

              WHERE  AlertStatus.AlertDefId = @defId AND AlertStatus.ActiveObject = @objectId AND AlertStatus.ObjectType = @objectType

              RETURN XML RAW

              2017-08-31 19:47:37,097 [15] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Parameters:

              2017-08-31 19:47:37,097 [15] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - defId=97808111-9879-4961-b8a9-5face6a39b06

              2017-08-31 19:47:37,097 [15] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectId=130

              2017-08-31 19:47:37,097 [15] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectType=Node

              2017-08-31 19:47:37,113 [12] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Query: SELECT AA.AlertObjectID, AA.AlertActiveID

              FROM Orion.AlertActive AA

              INNER JOIN  Orion.AlertStatus ON  AA.AlertObjectID = AlertStatus.AlertObjectID

              WHERE  AlertStatus.AlertDefId = @defId AND AlertStatus.ActiveObject = @objectId AND AlertStatus.ObjectType = @objectType

              RETURN XML RAW

              2017-08-31 19:47:37,113 [12] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Parameters:

              2017-08-31 19:47:37,113 [12] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - defId=97808111-9879-4961-b8a9-5face6a39b06

              2017-08-31 19:47:37,113 [12] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectId=70

              2017-08-31 19:47:37,113 [12] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectType=Node

              2017-08-31 19:47:37,129 [15] DEBUG SolarWinds.Jira.OrionToJiraConnector - Creating JIRA issue for new alert '31:XXX - XXX-isp-b-srnet - Node is down'

              2017-08-31 19:47:37,129 [13] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Query: SELECT AA.AlertObjectID, AA.AlertActiveID

              FROM Orion.AlertActive AA

              INNER JOIN  Orion.AlertStatus ON  AA.AlertObjectID = AlertStatus.AlertObjectID

              WHERE  AlertStatus.AlertDefId = @defId AND AlertStatus.ActiveObject = @objectId AND AlertStatus.ObjectType = @objectType

              RETURN XML RAW

              2017-08-31 19:47:37,129 [13] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - Parameters:

              2017-08-31 19:47:37,129 [13] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - defId=97808111-9879-4961-b8a9-5face6a39b06

              2017-08-31 19:47:37,129 [13] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectId=195

              2017-08-31 19:47:37,129 [13] DEBUG SolarWinds.InformationService.Contract2.InfoServiceProxy - objectType=Node

              2017-08-31 19:47:37,144 [12] DEBUG SolarWinds.Jira.OrionToJiraConnector - Creating JIRA issue for new alert '153:XXX - XXX-xx0001 - Node is down'

              2017-08-31 19:47:37,160 [13] DEBUG SolarWinds.Jira.OrionToJiraConnector - Creating JIRA issue for new alert '156:XXX - XXX-xxxxx0001 - Node is down'

               

               

              Would be great if I get this to work and can start doing some testing.

               

              Regards

              Steven

                • Re: Orion JIRA integration
                  derhally

                  Looks like you have things almost working.  We were missing some logging of some errors returned by jira so I've updated the zip attached to the main post with a new build that provides more logging.  You can try that and see if it gives any clue.

                   

                  Either way, what kind of Jira project did you create.  Do you know if you have any mandatory fields other than the Summary, Type and description?   If you do that may be the issue.

                  • Re: Orion JIRA integration
                    prmansab

                    Hi

                     

                    To achieve this integration . SMTP Server setting is must ?  how Solarwinds will contact JIRA Server ? Can someone assist me on this

                     

                    Regards

                    Prasanna

                  • Re: Orion JIRA integration
                    steven77nl

                    I have installed the new version and can see more in the log files now.

                    You had a valid point regarding the required fields.

                     

                    2017-09-05 11:25:25,287 [24] ERROR SolarWinds.Jira.OrionToJiraConnector - Error creating JIRA issue for alert '153'

                    System.InvalidOperationException: Response Content: {"errorMessages":[],"errors":{"customfield_10702":"Customer reporter is required.","customfield_11300":"Solution group is required."}}

                       at Atlassian.Jira.Remote.JiraRestClient.GetValidJsonFromResponse(IRestRequest request, IRestResponse response)

                       at Atlassian.Jira.Remote.JiraRestClient.<ExecuteRequestAsync>d__11.MoveNext()

                     

                    Would it be possible to have a option in the settings.json to say which fields needs to be filled in Jira?

                     

                    Something like:

                     

                    FieldAssignment": {

                    "Customer reporter": "Monitoring",

                    "Solution group": "Infra backend team",

                    "Customer site": "$NodeLocation",

                    "Labels": "$NodeFunction"

                    }

                     

                    Where the ones without $ is a fixed Text and the ones with $ are the user properties fields received from the Notification Subscriber.

                     

                    Just an idea

                     

                     

                    Few other notes:

                     

                    When restarting the service another WebHook is being created in Jira next to the already existing one.

                     

                    When installing the plug-in, the created service is set as 'Log on as: Network Service account'. When started no log files are being created and the service is hanging when trying to stop. When set to 'Log on as: Local System Account' it starts fine and starts logging and connecting to the Orion server and Jira server.

                    • Re: Orion JIRA integration
                      kenglover

                      Thanks for providing this, I hope we can make use of it soon.

                      One useful enhancement would be a way to have different alerts (for different types of systems/assets for example) be able to go into different Jira projects.

                      Ken

                      • Re: Orion JIRA integration
                        azepeda

                        hanks for this. I am struggling to get this to work. I have SSO enabled in my environment, so not sure if that is causing issues with my setup. Also where is the log file located as I can not seem to find it to help troubleshoot?

                         

                        ***EDIT***

                        I found the log file and was able to get things semi-working. The issue I am having, is it is erroring out on my fields. I set the settings in the settings.json, but they seem to not be working. Below is the error I receive. Also it seems everytime the the service is restarted it creates a new WebHook as well.

                        • Re: Orion JIRA integration
                          azepeda

                          Looks like derhally has not logged in since September, so this may be obsolete at this point? Has any body else been able to get the field assignment to work?

                          • Re: Orion JIRA integration
                            imcguinness

                            Hi,

                            Reviving this old(ish) tread.

                            This sounds really interesting to me and my current environment.

                            What is the status of this project?  any updates to the code version?  any idea if/when an RC version could be ready?

                            Thanks

                            Ian

                            1 of 1 people found this helpful
                            • Re: Orion JIRA integration
                              xtraspecialj

                              This seems really cool.  I would love to see something like this but for ServiceNow Event Management.  We have the ServiceNow Incident Management but we can't use the SolarWinds Integration feature because we use SNOW Event Management in between our monitoring systems and our Incident Management system to help control the noise as well as to correlate events from multiple monitoring systems into a single related incident.  It would be even more awesome if the SolarWinds/ServiceNow integration included an option for users that also own the Event Management module, but I would honestly just like a way to subscribe our SNOW Event Management system to SolarWinds.

                               

                              Currently we are using a custom powershell script I wrote that is triggered by an alert.  The script forwards all of the alert and object details to SNOW Event Management, but this is cumbersome and hard to administer.  The normal way that ServiceNow Event Management integrates with SolarWinds is to query the SolarWinds events table every two minutes, but our events table is massive, so having that large SQL/SWQL query performed every 2 minutes wreaks havoc on our DB performance.  Plus, it means up to two minutes can pass before Event Management is aware of issues.  Lastly, it means that we can't control what kinds of events get sent to Event Management.  Using the PowerShell script through alert actions at least gives us control over what gets sent to Event Management, but like I said, it's a real pain as well.  I really wish we could just use the Alert Integration piece at the bottom of the Alerts configuration page to control what goes to Event Management.

                               

                              Is there any way that the SolarWinds research team could at least post the source code for this Jira module?  I wouldn't mind taking a crack at creating my own integration service, but I'm not really sure where to start.  Looking at the code for this Jira service would be super helpful.

                                • Re: Orion JIRA integration
                                  Andrew LaGrone

                                  Is your script vanilla enough to share? I'd like to take a look at it since we're going through the preliminary steps of SNow integration today.

                                    • Re: Orion JIRA integration
                                      xtraspecialj

                                      Unfortunately right now it's not, sorry.  Also it is overly complex making it a massive pain anytime we want to make changes to it and especially when needing to alert on a new object type.  I'm actually working on a much simpler script that will automatically send the proper variables based on the object type to ServiceNow so that whenever we want to alert on a new object type I don't have to create the massive list of argument names and Orion variables like I do right now.

                                       

                                      If I can pull this new method off it should be easily shareable and useful.  We'll see.

                                  • Re: Orion JIRA integration
                                    mislam9

                                    1. If I don’t have any jira admin access but as the user, I have access the creation ticket. So use that credentials technically it should be generated ticket right?

                                    2. I didn’t get how actually you define Orion “Alert“ with Jira “Key”. Can you please help me if I use Solarwinds default “Nodes Down” what should I set  "EventsToListenFor": [ ] Should I put the SolarWinds “Alert ID” or "Alet name"?

                                    3. And how do you check the log?

                                     

                                    Thank you for your time and help. Appreciate.

                                    • Re: Orion JIRA integration
                                      ejunkman

                                      Can someone share where the log file for this app is located? I believe I have my settings file configured correctly and the process has been restarted but I'm not seeing an attempt of the Orion server to send anything to the Jira Sever. In C:\ProgramData\SolarWinds\Logs I found ' OrionJiraIntegrationService' and older 'OrionJiraIntegrationService.log' files but each only contains a single line like the following

                                       

                                      *** Assembly SolarWinds.OrionJiraIntegration.Service, Version=1.0.3.0, Culture=neutral, PublicKeyToken=null, .NET version v4.0.30319 ***

                                      2018-08-30 15:10:27,189 [5] INFO  JiraApp.OrionJiraService - Writing out alert info

                                       

                                      Which seems to correspond to each time I started the app.

                                       

                                      Any help is greatly appreciated.

                                       

                                      Thanks!

                                      • Re: Orion JIRA integration
                                        frederik

                                        Hello,

                                         

                                        can someone help us with this integration ?

                                         

                                        greetings from germany