This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Acknowledge Events Log Table via API

I would like to acknowledge events in the events log table via the invoke command.   Is this possible?  If not?

How do a get a list of Alerts for a specific node,  I then would like to use that information to pass into a ticketing system.

I already have the form interface, I just need to either know how the Acknowledge the Events in the Events log using the swis or SWQL or get the list of Alerts associated with a node and then Acknowledge them.

Thank you for your help.

Charles

Parents Reply Children
  • The third parameter to swis->Invoke is a an array of the parameters for the verb. In your original example, this array has one element (an integer), so you are passing one argument (an integer) to the verb. In your second example, this array has two elements (two integers), so you are passing two arguments (two integers) to the verb. The verb expects one argument (an array of integers), so neither of these works. Hope that makes it more clear.

  • I am specifying an array. In Perl here is how the call is done.  $swql->swis->Invoke( 'Orion.Events', 'Acknowledge', [@event_ids] );

    When I make the call as stated, the above response is what I get from doing the Invoke as called.

    I am using the InformationService.pm module provided by SolarWinds in the sample perl code. 

    When I specify it strictly as an array and not an array reference, $swql->swis->Invoke( 'Orion.Events', 'Acknowledge', @event_ids );

    I get the following error.

    Can't use string ("582311") as an ARRAY ref while "strict refs" in use at InformationService.pm line 126.


    The code parameters in the Perl module are specified as follows:

    Invoke => {

        endpoint => '',

        soapaction => 'http://schemas.solarwinds.com/2007/08/informationservice/InformationService/Invoke',

        namespace => 'http://schemas.solarwinds.com/2007/08/informationservice',

        parameters => [

            SOAP::Data->name('entity')->prefix('swis')->type('string'),

            SOAP::Data->name('verb')->prefix('swis')->type('string'),

            SOAP::Data->name('parameters')->prefix('swis')

        ], # end parameters

      }, # end Invoke

    Thanks for your responses.

  • Hey tdanner,   any ideas on this?  can you give me an example of how the array should look?

    I am specifying an array. In Perl here is how the call is done.  $swql->swis->Invoke( 'Orion.Events', 'Acknowledge', [@event_ids] );

    When I make the call as stated, the above response is what I get from doing the Invoke as called.

    I am using the InformationService.pm module provided by SolarWinds in the sample perl code.

    When I specify it strictly as an array and not an array reference, $swql->swis->Invoke( 'Orion.Events', 'Acknowledge', @event_ids );

    I get the following error.

    Can't use string ("582311") as an ARRAY ref while "strict refs" in use at InformationService.pm line 126.


    The code parameters in the Perl module are specified as follows:

    Invoke => {

        endpoint => '',

        soapaction => 'http://schemas.solarwinds.com/2007/08/informationservice/InformationService/Invoke',

        namespace => 'http://schemas.solarwinds.com/2007/08/informationservice',

        parameters => [

            SOAP::Data->name('entity')->prefix('swis')->type('string'),

            SOAP::Data->name('verb')->prefix('swis')->type('string'),

            SOAP::Data->name('parameters')->prefix('swis')

        ], # end parameters

      }, # end Invoke

    Thanks for your responses.

  • I have a reply to this composed, but I have thus far been unable to post it due to errors with thwack. Let me see if this simple message will post.

  • Since thwack is not accepting my post with XML and code snippets, I'm just going to save it as a text file and attach it. Let's see if that works.