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.

Config Change Templates Interfaces not listing

Hi All,

I created a Config Change Template a couple of years back and was working up until recently.  The script was intended to have a user select a switch from a dropdown menu then select a port on that switch when they go to DEFINE VARIABLES & RUN.  The user is still able to see the dropdown with all the switches and select a switch but regardless of which switch they select they get no interfaces when they click on the SELECT INTERFACES LIST button.  All they get is "No Entities" listed under the switch they selected.  I tried this with my account and I get the same results they do even though I have higher rights than they do.  I can also see the interfaces when I go to Settings...  Manage Nodes... Select the switch... then click on the List Resources link which tells me I have the proper rights to view the interfaces.  For some reason they are just not populating when we click on the SELECT INTERFACES LIST button.  I went through every single Cisco switch in our environment and get "No Entities" listed under each of them.  Has anyone experienced this in their environment?

Here is the code for the template...

/*
.CHANGE_TEMPLATE_DESCRIPTION
        This template by XXXXXXXX is used to shut then no shut ports on Cisco switches using Solarwinds Config Change Templates.
.CHANGE_TEMPLATE_TAGS
        Cisco, IOS
.PLATFORM_DESCRIPTION
        Cisco IOS
.PARAMETER_LABEL @ContextNode
        NCM Node
.PARAMETER_DESCRIPTION @ContextNode
        The node the template will operate on.  All templates require this by default. The target node is selected during the first part of the wizard so it will not be available for selection when defining values of variables.
.PARAMETER_LABEL @TargetPorts
        Select Port(s)
.PARAMETER_DESCRIPTION @TargetPorts
        Select the port to shut then no shut.
*/



script ShutNoShutPorts (    
                        NCM.Nodes @ContextNode,
                        NCM.Interfaces[] @TargetPorts
                        )

{
  // DEFINE THE PIPE SYMBOL FOR LATER USE AS THE PIPE SYMBOL ADDED DIRECTLY IN THE SCRIPT WON'T WORK
  string @PipeSymbol='|'
 
  // DEFINE 2 PAUSES. ONE FOR 2 SECONDS AND ONE FOR 20 SECONDS TO ALLOW FOR THE SCRIPT TIME TO DO IT'S THING.
  string @PausePlease2='${Delay:2}'
  string @PausePlease20='${Delay:20}'
 
  // Enter configuration mode
  CLI
  {
   configure terminal
  }
 
  // Loop through selected ports
  foreach (@portItem in @TargetPorts)
  {
CLI
{
interface @portItem.InterfaceDescription
shut
@PausePlease2
no shut
end
@PausePlease20
!
!
sh ip int brief @PipeSymbol incl @portItem.InterfaceDescription
}
  }

}

Parents
  • Interesting template. I just tried it in one of our environments and like you it doesn't show any of the interfaces.

    This environment is running 2023.2.1. The only thing I'm thinking is this might be down to some of the enhanced security that SolarWInds have introduced in more recent builds. As an example, I discovered the other day that I couldn't simulate an alert trigger because it hadn't been authorised yet. That's all new to 2023.2.1 - see here for deets.

    Might be worth opening a ticket and asking. 

    If you get an answer then please come back and update here.

  • Also, looking at some of the SolarWinds default supplied templates (e.g. Change Interface Description - Cisco IOS) shows me they don't allow interface selection either. Clearly something broken IMO.

  • Hey stuartd!  Thanks for confirming this is an issue somewhere other than our environment.  I too, went ahead and tried the stock default template in "Config Change Templates" named "Change Interface Description - Cisco IOS" and it does not display any interfaces either. 

    I've opened a ticket with Solarwinds Technical Support and will point them to this post in hopes they see it's not just one person experiencing this issue.

    I will be back to post any results.  Stay tuned...

  • Has anyone found a solution for this? I don't use the wizard to select ports, but essentially have just found the same issue. A config change template that I know was working previously that operated on interfaces based on the interface description ("InterfaceAlias") has stopped working. It seems it's not looking at the interfaces at all which is basically the same symptom above. Here is a snippet of my code:

      foreach (@interfaceItem in @ContextNode.Interfaces)
      {
        if (@interfaceItem.InterfaceDescription contains 'VLAN') 
        {
           // Do nothing if it's not a physical interface
        }
        else if (@interfaceItem.InterfaceAlias contains 'AccessPoint')
        {
           // Set command
           CLI
           {
              interface @interfaceItem.InterfaceDescription
              switchport trunk allowed vlan add

  • My team member who is responsible for our SolarWinds deployment opened a ticket and we found in our case it was because our inventory job was disabled. I think this was from an issue where the job had an end date which caused it to disable itself.

Reply Children
No Data