1 Reply Latest reply on Apr 10, 2014 3:37 PM by Jan Pelousek

    Insert directly to AlertLog or Events Log

    c.gura

      Is there a way to insert either into the Orion AlertLog?  I have a need to insert Alerts directly into Orion without causing problems.  The way SolarWinds handles Traps does not give us the ability to send traps from system that is not polled from SolarWinds. 

       

       

      If I were to insert an Alert into the AlertLog table, what are the ramifications of doing that?  Would I break anything?

      What about doing the same thing into the Events table as well?

       

      Thank You,

      Charles

        • Re: Insert directly to AlertLog or Events Log
          Jan Pelousek

          Hello, regarding the alerts - depends on how you are using the SDK, but in PowerShell it will look like :

          $target="10.140.2.182"
          $swis = Connect-Swis -host $target -UserName admin -Password ""
          
          $NewAlert = New-SwisObject $swis "Orion.AlertStatus" @{
            AlertDefID = '37c5b4fe-6b89-4b1d-8a9c-13d2c867d772'; ##Replace here with the Guid of the alert definition you are using. Random GUIDs won't work
            ActiveObject=3;
            ObjectType='Node';
            State=2;
            WorkingState=0;
            ObjectName='Object of interrest';
            AlertMessage='AlertMessage blahblah';
            Acknowledged=0;
            }
          

           

          Per look into the schema for events, creation of the event should work analogically. I'd not say it should break something. After quick check, at least the most obvious places work as usual. Also the alert will be possibly reset per the Alert reset condition (alert definition identified per the AlertDefID).