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.

Application discovery for nodes in SAM can be scheduled ?

Hi All, AS we have a way to schedule network discovery option available to scan the nodes in given frequency, do we have any option to scan applications on certain devices by dynamic query periodically? So that whenever new device added into SolarWinds monitoring and that meets my query condition, it should automatically scan for application templates and assign if applies. please help.

Parents
  • Yes, but, you probably want to assign applications to "all X devices" groups, and define those with a query, then they auto-assign without picking up a load of noise

  • But i do not see any option as such anywhere.  The actual requirement is like this.. I want to monitor all kind of certificates expiry status on all windows & Linux servers. So i want check if any new device added under windows/linux vendor, that servers should automatically gets scanned for certificates and add them. is this can be achievable?

  • Make a all servers Group, then go to SAM and apply a cert monitor to the all servers group
    There's an OOTB one and one i've posted on here before that'll work ok for most purposes
    Certs can exist in weird places, best not to assume a single monitor will cover all possible cases of engineers putting stuff in live and forgetting about it

  • Hi Adam, thank you. i wil try creating group and assign this monitor. And you mean to say that if i monitor certain applicaitons, that doesn't suffice our requirement?

Reply Children
  • Hi Adam, i tried to create dynamic groups as per the requirement and assigned them to the template but it is not working as expected. I am trying to use below power shell script for application discovery and then planning it to schedule on  windows task scheduler as per the requirement. But when i try to use below script, it is saying incorrect $swisUrl. Can someone help me in getting correct endpoint for this please?

    # Define variables
    $swisUrl = "https://SolarWinds server hostname/SolarWinds/InformationService/v3/Json/Invoke/SAM.CustomApplicationDiscovery"
    $username = "admin"
    $password = "password"
    $vendorFilter = "Windows,Linux"
    $appName = "Certificate Monitor"
    # Build the JSON payload for the discovery job
    $payload = @{
        Target = @{
            Filter = "Vendor IN ('" + $vendorFilter.Replace(",", "','") + "')"
            Query = "SELECT n.NodeID, n.IPAddress FROM Orion.Nodes n WHERE n.Vendor IN ('" + $vendorFilter.Replace(",", "','") + "')"
        }
        MaxDuration = 60
        JobTimeoutSeconds = 600
        Applications = @(
            @{
                Name = $appName
                Type = "Certificate"
                Settings = @{
                    CertPaths = "C:\"
                }
            }
        )
    } | ConvertTo-Json
    # Invoke the SAM discovery job
    Invoke-RestMethod -Uri $swisUrl -Method Post -Body $payload -ContentType "application/json" -Credential (New-Object System.Management.Automation.PSCredential($username, $(ConvertTo-SecureString $password -AsPlainText -Force)))