netbox-config-diff icon indicating copy to clipboard operation
netbox-config-diff copied to clipboard

Command in platform settings

Open bep6vaku opened this issue 4 months ago • 10 comments

NetBox version What version of NetBox are you currently running? ver. 4.3.5 on Docker

Describe the bug A clear and concise description of what the bug is. No matter what command I put in the command field on platform settings, only the show running-config is ran on the desired router

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. I want to run the command "show access-lists" to compare the access-lists on the router with the access-list template I have for the config template assigned to the router

Image

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

bep6vaku avatar Sep 09 '25 00:09 bep6vaku

Even when I specify the command "show access-lists" in the platform settings page when I run the config-diffs, the output will not be limited to just the output of the command but rather the entire show running-config.

Image Image

bep6vaku avatar Sep 09 '25 14:09 bep6vaku

Hi @bep6vaku thanks for opening the issue,

How do you run config diffs? From custom scripts or configuration requests?

miaow2 avatar Sep 16 '25 14:09 miaow2

Here is some more information. I am using the configuration requests. I am running the netbox-config-diff v2.11.0 on Netbox 4.3.7. I want to compare a particular extended access control list on a router against what I have in a configuration template so I can see the differences. Unfortunately, when I run the config diff on the router I will get the entire running config on the left side of the diff screen and the access-list from the configuration template on the right. Within the platform settings, there are a series of commands available, even if I choose "show access-lists" I get the entire running configuration.

Image

This is what the configuration compliance looks like after running. I would expect to see on the left side of the screen the configuration snippet from the router to compare with the template on the right. Instead, I get the entire running config

Image

bep6vaku avatar Sep 28 '25 12:09 bep6vaku

Closed by mistake.

bep6vaku avatar Sep 28 '25 21:09 bep6vaku

config diffs in configuration requests always get the full running config from devices.

You should use custom script, do you have script ConfigDiffScript under Customization > Scripts?

miaow2 avatar Sep 29 '25 14:09 miaow2

In Netbox 4.3.7, I have the following under Customization/Scripts. Is it possible to edit the custom script so that the plugin only returns the part of the configuration that you want to compare to and not the entire configuration? In the platform settings Commands I have the ability to define a "show command" but no matter what command I choose, the entire config is returned

Image

bep6vaku avatar Sep 29 '25 16:09 bep6vaku

The image is not attached to the comment

miaow2 avatar Sep 30 '25 07:09 miaow2

@bep6vaku yes, this custom script uses the command that you defined in platform settings

Just press ConfigDiffScript, in the form, choose your device, and run the script

miaow2 avatar Oct 04 '25 09:10 miaow2

Thanks. I have two questions. In the platform settings under commands, where did those commands come from and can I add additional ones or edit existing ones? In the show access-list command I tried to add | include "named access-list" but the output doesn't show up on the diff display on the router

David James

Sent from my Gmail account @.***

On Sat, Oct 4, 2025, 5:51 AM Artem Kotik @.***> wrote:

miaow2 left a comment (miaow2/netbox-config-diff#105) https://github.com/miaow2/netbox-config-diff/issues/105#issuecomment-3368079325

@bep6vaku https://github.com/bep6vaku yes, this custom script uses the command that you defined in platform settings

Just press ConfigDiffScript, in the form, choose your device, and run the script

— Reply to this email directly, view it on GitHub https://github.com/miaow2/netbox-config-diff/issues/105#issuecomment-3368079325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVPHGHVCF6VJ3PHYUKBT6L33V6KALAVCNFSM6AAAAACF7CTFGKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRYGA3TSMZSGU . You are receiving this because you were mentioned.Message ID: @.***>

bep6vaku avatar Oct 04 '25 13:10 bep6vaku

@bep6vaku, sorry, but I don't fully understand your questions. Could you please repeat them with screenshots?

miaow2 avatar Oct 05 '25 11:10 miaow2