6 Replies Latest reply on Jul 25, 2018 3:01 PM by bcorgey

    NCM - backup F5 devices (UCS) - file saved in two places

    stuarta

      Hi all,

       

      NCM 7.6.

       

      I am attempting to use NCM to back-up configuration of our F5 devices, specifically the *.UCS backups, and have followed the instructions at

       

      Back up the F5 UCS file in NCM 7.5 and other binary files such as .tgz and .tar - SolarWinds Worldwide, LLC. Help and Su…

       

      The running config (SCF – single configuration text file) and startup config (UCS file) are being backed up successfully to <network share>\<devicename>\<date>\<device name>-Running.Config and <network share>\<device name>\<date>\<device name>-Startup.Config respectively.

       

      This corresponds with the settings at Settings > All Settings > NCM Settings > Config Archive Folder Locations:

       

      Enter a path for the archive directory on this main or additional polling engine NCM server: configured with <network share>

      Specify a template that should be used for naming config files: configured with ${NodeGroup}\${Caption}\${Date}\${Caption}-${ConfigType}.Config.

       

      However, I am also getting a copy of the UCS file (i.e. a file identical to <devicename>-Startup.Config referenced above) at the root of the network share, named <apparently random string>.config (note lower case 'c' in config), for example 93cf1641-7bc3-4fa0-acf2-6b5e421e9a13.config.

       

      The same network share specified under Config Archive Folder Locations is also configured in the Binary Config Storage Settings under Settings > All Settings > NCM Settings.

       

      The F5 device template I’m using is as follows:

      <Configuration-Management Device="F5 Big IP VPR-C2400" SystemOID="1.3.6.1.4.1.3375.2.1.3.4.48">

                      <Commands>

                                      <Command Name="RESET" Value=""/>

                                      <Command Name="Reboot" Value=""/>

                                      <Command Name="EnterConfigMode" Value=""/>

                                      <Command Name="ExitConfigMode" Value=""/>

                                      <Command Name="Startup" Value="ucs" IsBinary="true"/>

                                      <Command Name="Running" Value="config file"/>           

                                      <Command Name="DownloadConfig" Value="tmsh -q show running-config"/>

                                      <Command Name="UploadConfig" Value=""/>

                                      <Command Name="DownloadConfigIndirect" Value=""/>

                                      <Command Name="UploadConfigIndirect" Value=""/>

                                      <Command Name="DownloadConfigIndirectSCP" Value="tmsh save /sys ${ConfigType} /var/local/NCM.ucs${CRLF}${TransferProtocol} /var/local/NCM.ucs ${SCPServerUserName}@${SCPStorageAddress}:${StorageFilename}${CRLF}yes${CRLF}${SCPServerPassword}"/>

                                      <Command Name="UploadConfigIndirectSCP" Value="${TransferProtocol} ${SCPServerUserName}@${SCPStorageAddress}:${StorageFilename} /var/local/NCM.ucs${CRLF}${SCPServerPassword}${CRLF}tmsh load /sys ${ConfigType} /var/local/NCM.ucs"/>

                                      <Command Name="EraseConfig" Value=""/>

                                      <Command Name="SaveConfig" Value=""/>

                                      <Command Name="Version" Value="tmsh show /sys version"/>

                                      <Command Name="Disconnect" Value=""/>

                      </Commands>

      </Configuration-Management>

       

      The F5 node has the following connection profile:

       

      Global Connection Profile: <No Profile>  
      Login Credentials:  Device
      Username:   admin
      Password:   ••••••••••••
      Enable Level:   <No Enable Login>
      Enable Password:  •••••••••••••••••••••••
      Execute Scripts Using:  SSH2
      Request Configs Using:  SSH2
      Transfer Configs Using:  SCP
      Telnet Port:   ${GlobalTelnetPort}
      SSH Port:   ${GlobalSSHPort}



        I would like to not have the <apparently random string>.config file generated (as it is not obvious which of our multiple F5 devices it comes from, and it is a duplicate anyway and so uses up disk space unnecessarily) but I can’t find what part of the NCM configuration is causing it to be generated and copied to that location.

       

      Any thoughts/advice much appreciated.

       

      Stuart

        • Re: NCM - backup F5 devices (UCS) - file saved in two places
          xtraspecialj

          Apparently you aren't the first to have this question, as I just read this post here: Why does the ${StorageFilename} variable cause a F5 .ucs file to get a garbled.config file name?

           

          Did you ever figure it out or get an answer?

          • Re: NCM - backup F5 devices (UCS) - file saved in two places
            joelgarnick

            I don't know about you guys, but here's what i'm actually seeing...

            When a binary file is successfully backed up I see it drop into my SFTP root folder as one "garbled" name <11 characters>.config.  As soon as it's completely done downloading there, it gets moved to the storage location defined in Product Specific Settings --> NCM --> Binary backup files config and is renamed to a new "garbled" name <32 characters + some dashes>.config.  My current theory is that the files only stay in the SFTP folder if they don't complete or the process otherwise gets interrupted...I'm seeing a bunch of OutOfMemory errors in my NcmBusinessLayerPlugin.log that may be contributing to that issue.

             

            As for why the names are random characters...i'm guessing these are uniquely linked to the node and job and then referenced by the database and presented in a "human readable form" in the front end web gui...which is why their process for exporting the config involves initiating a job from the GUI where they pull back one of these .config files and regenerate the .ucs file in a "human readable form" which you can then upload to your device or whatever...but that's all speculation...

            • Re: NCM - backup F5 devices (UCS) - file saved in two places
              bcorgey

              NCM has to name the file to track it it in the various steps in the process.  It only names the file in the random format for transport, just like it would a standard text file, but a little differerent.

              The file in the Binary Storage location is also has a long GUID,   The Binary Storage is not the intended location for one to retrieve the files from.  The Binary Storage acts as the Database for the binary files as the Database table, NCM_Config Archive, and is just a reference point for what one sees in the Orion Web console.

               

              When one needs to retrieve the actual file, it would be retrieved from the Config Archive Folder. by default is c:\programdata\solarwinds\orion\NCM\Configarchive

              The file by default will be the Startup config.

               

              It is encouraged the config archive folder to be on a share or at least out of the Programdata.

              For the actual location of your config archive folder (not the database), in the Web Console, go to settings>NCM Settings>Configs.  There will be a setting for each poller. and the devices on the corresponding poller will be stored according to the path listed there, provided it is set up and accessible.

               

              The Binary file in the config Archive folder will me named in the same manner a text file is and will recognizable  with the device name-statup.Config

              Yes the the ext for the binary file is .config and not .ucs, so one would need to rename it to a .ucs before trying to upload it back to a device.

               

              I hope this helps clear up the garbled file name and the purpose of the Binary Storage.

               

              There is a KB: Back up the F5 UCS file in NCM 7.5 and other binary files such as .tgz and .tar - SolarWinds Worldwide, LLC. Help and Su…