Has anyone automated monthly base lines in SCM?

I know its not hard to manually do it.  We have multiple environments and I would much rather automate it so we know its done and not delayed because someone forgot (me).

  • Hi there, 

    This is a pretty cool idea so I made a quick proof of concept:

    In the alert trigger, you want a custom SWQL to return all devices with a baseline older than 1 month:

    SELECT Nodes.Uri, Nodes.DisplayName FROM Orion.Nodes AS Nodes
    left join Orion.SCM.Baseline scb on nodes.nodeid = scb.nodeid
    where scb.TimeStamp < ADDMONTH(-1,GetDate())

    Then the action would be running an external program:

    powershell.exe -file "C:\SolarWindsScripts\SCMbaselineautomation.ps1" ${N=SwisEntity;M=NodeID}

    And the PS script looks like this:

    $orionuser = 'XXXXX'
    $orionpass = 'XXXXX'
    $swis = Connect-Swis -Hostname 'localhost' -UserName $orionuser -Password $orionpass
    $date = Get-Date
    $nodeid = $args[0]
    Invoke-SwisVerb -EntityName Orion.scm.baseline -Verb setbaseline -SwisConnection $swis -Arguments @($nodeid, $date)

    I'm sure there's more that can be added but that works for now.

    Kind regards, 

    Marlie Fancourt - SolarWinds Pre-Sales Manager
    Prosperon Networks - SolarWinds Partner since 2006