This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Is there a log maintained by Advanced alert triggered actions?

I'm trying to figure out why my vbscript works from cmd line but when it gets triggered by advanced alerts it does not work.

The script outputs to %temp% environment variable but I am unable to find any such output when Orion runs the script. 

What user does Orion use for triggered actions?

Is there a log maintained some place that might show me what its trying to do?

When I run a "test" of the alert.. my assumption is that Orion will run vbscript and not just say its running it... is this correct?

Glenn.

  • Hello gbutler,
    testing alerts for APM is not working correctly because you can select only node or interface and not application. It is known issue. If you want to test alert, set it's trigger condition to some common value so it is triggered during normal operation and then check if alert did what it was meant to.

  • Thanks for the information. This helps. 

  • I set the alert with a threshold that fails... the alert tripped but the vbscript is not running.  Is there a log some place that I can look at? 

    It really appears the the script is not executing because my script writes to the acting user's %temp% and there is no such entry?

    Again, the script runs from cmd line... so its a puzzler why?  Permissions are fine... any ideas?

  • There is no log that stores alert activity. Instead, it's stored in the database, in the AlertLog table. You might be able discern the source of the problem by browsing that table.

    I'm guessing that it may be the account under which the SolarWinds Alerting Engine runs. Like all the other SolarWinds services, the SolarWinds Alerting Engine uses the Local System account by default to run. You could change it to run under an account that you know executes the script without error. Keep in mind that this is probably not going to be supported by SolarWinds.

  • The execute line from the alert table has a "//B" in it:

     

    Success: Executing - WScript.exe //B C:\Users\....

     

    Is this normal? 

  • I reran the command from cmd line using the //B and it works without issue.

  • works without issue on the command line... its still not working from Orion.

  • Try to change path for script to write to something like "C:\log.txt". I've just tried to run VB script with alert and it works. My script looks like this:

    ' Create the File System Object
    Set objFSO = CreateObject("Scripting.FileSystemObject")

    Set objFile = objFSO.CreateTextFile("e:\temp\out.txt")
    objFile.WriteLine("TEST")
    objFile.Close()

    WScript.Quit(0)

    After alert is triggered I can see file out.txt in my e:\temp directory and it contains TEST string.

  • This has help me some. My vbscript messages were going to no where.  I added a quick file open/write/close to the top and now at least that is working. Not having a log file for capturing errors and such really slows down the process.  Anyway I now able able to trace the script running.

    Orion dies on the following line:

    Set oWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strServerName & "\root\cimv2")

    From the command line the above works. I wrote the above to a file to try and see and differences:

    ORION:winmgmts:{impersonationLevel=impersonate}!\\10.10.40.25\root\cimv2
    CMDLN:winmgmts:{impersonationLevel=impersonate}!\\10.10.40.25\root\cimv2

    They are identical.

    Why would Orion die on the above GetObject? Thinking may be there is a problem resolving the IP I hardcoded the server name... still dies.

    Any suggestions? ideas?   

  • Orion runs this script under user that you specified in credentials for monitor. This user may be different than user you use to run from command line and so impersonation during object retrieval may fail. Try to specify same user in credentials or remove {impersonationLevel=impersonate} as script should be already impersonated.