Anyone tried to use "Component Monitor Wizard" to monitor Azure Application Gateway before?

Hello,

Did anyone ever try to use "Component Monitor Wizard" function to monitor Azure Application Gateway? 

I've been told from support as this is out of boundary support as there's no such template could be used for monitoring Azure Application Gateway, so that's why I tried my luck in there to see if any folks did something similar before. Slight smile

After I click "Next, I see below.  It requires me to input the server IP address in here but Azure application gateway doesn't own it at all.  On this occasion, how can I achieve the goal to monitor it or it's not something we can do in terms of monitoring it from Solarwinds SAM?  Please advise, thank you Slight smile

Parents
  • What are you trying to monitor about that gateway?
    I'm doing some Azure monitoring currently, everything's doable but i've found azure stuff pretty hard

  • Hi there - I try to monitor the https status, throughput or total request something like that just below.

    But I am really scratching my head where to start on.  I even wonder if we can send over the application gateway logs to solarwinds SAM.

    and YES - this is quite hard to configure it as it's lack of documentation ( or I don't know how to search them well in here..) Slight smile

  • I meant pass the Backend server IP as a parameter if you were checking an App Gateway with multiple hosts at the back. My test site just has a single one so it's not important for now. Annoyingly, the script runs fine on my laptop and on the primary poller in PSv7, but I suspect the actual script engine running for the SAM template is stuck on PSv2 as it says on the template page. In which case I'm doomed.

    The other thing is you have to run the template against a host, so I'm using my dummy node that I have all the API calls registered against, and I don't know if that is breaking things. Debugging code in the actual template is nigh-on impossible so I need to find out if/where such things are logged so I can see what's failing.

  • There's a set of logs on the polling engine, I forget the path at the moment, but they're under APM and are then in folders named the ID of each application.

    I do find troubleshooting within the component script sections very hard to work with.

    If you had like 5 backend server IPs you wanted to pass into the script from SLW you could still use the args, else one API call to GET the ips and a loop to do the other stuff. You might run into the "where do I put dynamic data" problem though.

    If your problem is around the -ignorecertificate thing there's a nice block code to dodge that issue.

  • This particular issue seem to be that the script either isn't running or is running on the wrong version of powershell and the invoke-restmethod calls are failing because the parameters I'm using only came in in PSv6. I'll have a look under APM though, cheers!

    I do have the -ignorecertificate thing too, my Veeam monitoring is broken because SW is ignoring its own global settings to ignore certificate errors. SW support haven't been able to fix that one for me

  • Put this in at the top


    if (-not ([System.Management.Automation.PSTypeName]’ServerCertificateValidationCallback’).Type)
    {
    $certCallback = @"
    using System;
    using System.Net;
    using System.Net.Security;
    using System.Security.Cryptography.X509Certificates;
    public class ServerCertificateValidationCallback
    {
    public static void Ignore()
    {
    if(ServicePointManager.ServerCertificateValidationCallback ==null)
    {
    ServicePointManager.ServerCertificateValidationCallback +=
    delegate
    (
    Object obj,
    X509Certificate certificate,
    X509Chain chain,
    SslPolicyErrors errors
    )
    {
    return true;
    };
    }
    }
    }
    "@
    Add-Type $certCallback
    }
    [ServerCertificateValidationCallback]::Ignore()




  • Morning Adam,

    Thanks for that, but the issue I'm having is that SW can't execute a remote PS script because of the certificate error. It's given me an idea though, the outcome of which will be dictated by how well I understand the way SW handles PS scripts - does it just run them using the default PS engine on the poller or does it have its own more obscure, twisted method...

  • Hi Fop, yeah that block dodges the certificate error


    It uses PSv2 and you can select 32 or 64 bit mode per script

    Needs to be updated to PSv5/v7 soon imo

  • On a whim I created a SAM powershell template assigned to a dummy node that just does this:

    [int]$foo=$PSVersionTable.PSVersion.major
    Write-Host "Message.Health: Health: Version";
    Write-Host "Statistic.Health: $foo";

    On my poller it returns V5 so that's what it's using to execute scripts. I've got PS7 installed but haven't enabled it as default. That will fix this issue I think.

  • Interesting! I must've been going off way outdated knowledge there

  • ...and the bad news is I've just had official clarification from Solarwinds that SAM uses 5.1 only and changing to v7 isn't even on their roadmap for future development so I've requested it as a feature.

    This doesn't help me right now of course. The invoke-restmethod parameters my script needs only came in in v6 so I need to see if it's possible to get the response headers out of the 5.1 version of that cmdlet. Trouble is, MS's own docs vary from awful to terrible on this sort of subject.

    A

Reply
  • ...and the bad news is I've just had official clarification from Solarwinds that SAM uses 5.1 only and changing to v7 isn't even on their roadmap for future development so I've requested it as a feature.

    This doesn't help me right now of course. The invoke-restmethod parameters my script needs only came in in v6 so I need to see if it's possible to get the response headers out of the 5.1 version of that cmdlet. Trouble is, MS's own docs vary from awful to terrible on this sort of subject.

    A

Children