Network Management

Back up the F5 UCS file in NCM and other binary files such as .tgz and .tar

NCM may back up the UCS file for F5 devices as well as other vendors or machines that have binary files and not text. These files are stored in a shared drive and not the database, they do not participate in Real-Time Change Detection, Config Change Reporting or Compliance Reporting in NCM. The primary objective was to allow NCM to get the backup of the devices and move them to the config archive folder on the server or wherever it was customized to be.

First published date

11/29/2018 10:39 PM

Last published date

9/8/2023 11:56 AM

Overview

NCM can back up the UCS file for F5 devices as well as other vendors or machines that have binary files and not text. These files are written to a shared drive and not to the database, so they do not participate in Real-Time Change Detection, Config Change Reporting, or Compliance Reporting in NCM.

The primary objective was to allow NCM to get the backup of the devices and move them from the SCP or TFTP Root folder to the config archive folder on the server or wherever it was customized to be.

NOTE:

This is a process for binary files in general, so by default, a particular extension cannot be placed on the file.

The Network share where the files are written by NCM is not where one should go to get the file. 

What happens is since the accumulation of some binary files can grow large and that NCM cannot parse the Binary files to store in the NCM Database, The Network share that is created is made specifically for NCM use as a repository of the files. (NCM leaves the files in this random format to avoid files overwriting and guarantees to store each of the downloaded configs. Binary configs storage network share is for internal NCM storage and it is not intended for use or other operations outside that scope.)

Once the file is in the Binary Config Storage Share:

  • NCM will add a pointer in the Database to that file instead of the actual config
  • The File is written to the Config Archive folder as set up in the NCM settings

Product section

Network Configuration Manager

Resolution

Note:  F5 files will require SCP, but the transfer of binary files will work with both SCP and TFTP
 

For this article, I am demonstrating with the UCS file as an example and assume the F5 has already been added to NCM.

For a brief on F5 template behavior, Click Here  

For other information on Setting up NCM for downloading Binary Files, Click Here  

***** NOTE****

This is the process for all binary files to be downloaded from devices. This is a good example of the process.  One would still need to create a device template for other devices. For details on NCM device templates see Creating a new NCM Device Template explained.

  1. Edit the Node via Orion Node Management (from the Web Console go to Settings > Manage Nodes).
  2. Manually assign the F5 Big IP device template to the device in the Communication Section in the NCM properties (as shown below). Manually assigning a template to a device means that when downloading the "Startup" config, NCM will issue the command to save the config locally to the device then using SCP will upload it to the NCM SCP server.



    We can see here that the template has been set up by default to be ready for the UCS file.
<Command Name="Startup" Value="ucs" IsBinary="true"/>
<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}"/>

Note: For F5 12.1.X and newer on at least NCM 8.0 and newer use the following:

<Command Name="DownloadConfigIndirectSCP" Value="${ConfigType}"/>
 
<Command Name="Running" Value="tmsh save /sys config file /var/local/scf/NCM.config no-passphrase${CRLF} ${TransferProtocol} /var/local/NCM.config ${SCPServerUserName}@${SCPStorageAddress}:${StorageFilename}${CRLF}yes${SendConditionRegEx:Are you sure}${CRLF}${SCPServerPassword}"/>
 
<Command Name="Startup" Value="tmsh save /sys ucs /var/local/NCM.ucs${CRLF}${TransferProtocol} /var/local/NCM.ucs ${SCPServerUserName}@${SCPStorageAddress}:${StorageFilename}${CRLF}yes${SendConditionRegEx:Are you sure}${CRLF}${SCPServerPassword}" IsBinary="true"/>

 

There are some issues regarding F5 getting stuck sending files, review this article.

    4. Once NCM has determined the UCS file download has been completed, it will then move the file off to a shared drive, so there are some settings in NCM needing to be made.

   5. Configure the Network Share Config Storage at Settings > All Settings > NCM Settings > Binary ConfigStorage Settings.

image.png

As noted in the screenshot, you need to define the config network share storage and set user credentials that have permissions to read and write. The Network Share should be in the same domain.

 

Reasons for a share instead of locally:

  • Space, some of these can get large and then accumulate.
  • Common area in the event of Multiple Orion Pollers

 

6. Make sure your SCP settings in NCM match the SCP server on the Orion Server(s).

  • Once all of the steps above are in place, NCM should be able to download the UCS files and put them in a network share
  • NCM will use the network share as it would the Database for the other type of configs to a degree.  
  • In order to retrieve the files, one would need to access them via the NCM config Archive folder:
    • by default: C:\ProgramData\SolarWinds\NCM\Config-Archive 
    • Actual paths can be found in Settings>NCM settings>Config Archive Locations
  • One may use the Export Configs Job to export the configs to a different location and have a different name if needed