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.

Ubiquiti Switch Backup

Hi All,

I'm trying to get NCM to back up a switch but I'm getting this error:- -sh: show: not found

We've created a new device profile which allows NCM to logon, we just cant seem to work out how to backup the the config from here, any pointers would be great, I've tried showing the running config but as you can see show is not a recognised command.

<Configuration-Management Device="Cisco Devices" SystemOID="1.3.6.1.4.1.9.1.2404" AutoDetectType="BySystemOid">
<Commands>
<Command Name="EnableCommand" Value="system support diagnostic-cli" />
<Command Name="RESET" Value="" />
<Command Name="MenuBased" Value="false" />
<Command Name="UseVirtualPromptForCommands" Value="true" />
<Command Name="Startup" Value="" />
<Command Name="Running" Value="" />
<Command Name="DownloadConfig" Value="show" />
<Command Name="Version" Value="telnet localhost ${CRLF}enable ${CRLF}" />
<Command Name="CCTV SW Backup" Value="" />
</Commands>
</Configuration-Management>

Thanks

Martyn

  • First off, i'd check this link for how to use the Device command templates. I think you have a fundamental misunderstanding of what is going on. 

    Create and manage device templates (solarwinds.com)

    I don't have a Ubiquiti switch to test with, but I can see plenty of issues with your config above.  

    #1 you need to change the System OID to affect Ubiquiti devices if you want it to automatically use this profile.

    <Configuration-Management Device="Cisco Devices" SystemOID="1.3.6.1.4.1.9.1.2404"  --modify this line for the SystemOID of a Ubiquiti Switch

    #2 The error shows that your user isn't logged into the proper privilege level when it ran the "show" command. 

    I would either modify this line:

    <Command Name="EnableCommand" Value="system support diagnostic-cli" />

    to

    <Command Name="EnableCommand" Value="telnet localhost ${CRLF}enable ${CRLF}" />

    Unless you need the "system support..." part then

    <Command Name="EnableCommand" Value="system support diagnostic-cli${CRLF}telnet localhost ${CRLF}enable ${CRLF}" />

    Or I would make 

    <Command Name="DownloadConfig" Value="show" />

    modified to

    <Command Name="DownloadConfig" Value="telnet localhost ${CRLF}enable ${CRLF}show" />

    Also, just a guess but I don't think the following line should be in your xml config:

    <Command Name="CCTV SW Backup" Value="" />

     

    Either way, you have to make sure NCM is running all the commands necessary to show a config.