10 Replies Latest reply on May 5, 2016 12:40 PM by mdecima

    Execute external program not working

    mdecima

      Hi.

       

      I'm working into integrating the solarwinds suite with our Service Desk, the method for this integration is that every time an alert is triggered, it should invoke a Jar that will create the interface to the Service Desk Software and generate the ticket based on the information the Jar is providing.

       

      The command that i'm trying to get working is something like this: (quotes included)

       

      "C:\Program Files (x86)\Java\jre1.8.0_73\bin\java.exe" -jar C:\sarasa\sarasa2\sarasa3\Integracion_sarasa.jar login ${N=SwisEntity;M=CustomProperties.CLIENTE} ${N=Alerting;M=AlertMessage} Solar_winds ${N=Alerting;M=AlertMessage}

       

      Basically we can divide this command in three, first the java path, second the parameters, including the -jar parameter and the path to the jar, and third the parameters the jar will try to load into the SD

       

      If i paste this code in command line, it works like a charm, it connects to the SD app and load the information, but whe in try to execute this as an alert action nothing happens, if i test it i get the green all good message, but still nothing happens.

       

      ¿Any clue how i can troubleshoot this? ¿Or how its suppposed to be configured?

       

      Thanks in advance.

       

      Regards

        • Re: Execute external program not working
          mike1843

          Is your service desk software on a different server?  If so, check to see what user your Alerting Engine service is executing as.  If it's running as LocalService, change it to a domain account.  This should correct the issue.

            • Re: Execute external program not working
              mdecima

              Yes, our SD software is in another  server, but the problem is that i'm not trying to connect directly using the alert engine so this shouldn't be a problem.

               

              I'm trying to execute a local program, a JAR that will send through webservices the data i want. I did some testing and in the command line the command works succesfully, but at the moment to put it in the "execute external program" doesnt work.

            • Re: Execute external program not working
              cjfranca

              Searching on such integration should occur by sending e-mail to open an incident.
              To try to standardize the type of incident will depend on how they are opened in servce Desk and addim adiconados are subject of the alert.
              I think it can solve. Among the options that appear in this alert is the most viable.

                • Re: Execute external program not working
                  mdecima

                  Yes, i understand that the alert integration through email is possible, but the method preferred by CA is webservices

                    • Re: Execute external program not working
                      mike1843

                      mdecima

                       

                      If you are running an external program using the alert engine, or any other service, you need to check the account configuration.  I had a similar problem trying to update a SQL database using an external program and the alerting engine.  More than likely, this is caused by the service running as Local System.  Local System does not have any rights on other servers.  To correct the issue, complete the following:

                      Open Service Manger. (Start-->Run. Type services.msc)

                      Double-click the service called Solarwinds Alerting Service V2.

                      Click Log On.

                      Change the account to a domain account that has local admin rights on your Orion Server.  Ensure that this account also has the needed rights on your other server.  Restart the service.

                       

                      A couple of things to note: Even though this program is separate from the alerting engine, the account must be changed to work as the external program uses whatever account is used by the alerting service.  Also, it appears that if you re-run the configuration wizard, you have to change the account logon again.

                        • Re: Execute external program not working
                          mdecima

                          Thanks for the tip, i tried that with no difference in the result.

                           

                          I had to open a support ticket regarding this issue, the first problem was the syntax. apparently NPM doesn't recognizes the regular path, "C:\etcetc" support had to put the Network Path "\\Orionapp\etcetcetc"

                           

                          The second and more F&AS%D&AS$%D was that even if i had configured the Alerting service to run using the local admin account, the change wasn't reflected and even a simple bat couldn't run.

                          Switched to Local admin account and now i can run other external programs, but still have the problem with invoking a Jar and adding Variables.

                           

                          If i create a script to run the Jar i can execute it, but the question is. ¿How can i add dynamic variables to feed that jar? Normally the jar would take any text following a keyword.

                           

                          For example:

                           

                          java -jar myjar.jar login ${N=SwisEntity;M=CustomProperties.CLIENTE} ${N=Alerting;M=AlertMessage}

                           

                          Being the keyword login and the dynamic data some custom properties and the alert message.

                           

                          If i use a script to invoke the jar, ¿how can i send that dynamic thata?

                           

                          Regards

                           

                          ps: Support kindly waved me off after he proved that the function from Execute external program was working, So i can't go further with them.

                    • Re: Execute external program not working
                      mdecima

                      Well.

                       

                      I dont know what it was, i reinstalled the app and upgraded to v11.5.3, after that i could run the java with the above command without problems, i did all the configuration using local admin account, before i was using domain admin account.

                       

                      The jar reads a config file, and it wasn't searching for that config file where it should, i made a copy to C:\Windows\Syswow64 (where all 32bit apps runs) and now the integration works like a charm.