cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

NCM Script Management

We're currently in the process of implementing a new syslog server which means we have to go into all of our switches and change the logging host. I'm trying to create a script I can just execute instead of going into each and every switch.

I go to My Dashboards -> Network Configurations -> Configuration Management -> Script Management

I added a new script:

configure terminal
no logging host X.X.X.X
no logging host X.X.X.X
logging host X.X.X.X session-id string access-switch
end
write memory

I check on it in Transfer Status and see

config terminal
Command authorization failed.
no logging host X.X.X.X
^
% Invalid input detected at '^' marker.
no logging host X.X.X.X
^
% Invalid input detected at '^' marker.
logging host X.X.X.X session-id string access-switch
^
% Invalid input detected at '^' marker.
end
^
% Invalid input detected at '^' marker.
write memory
Command authorization failed.

I've tested it without the configure terminal command and checked the Execute Script in Config Mode to see if that would make a difference, same error. I tried only doing one line at a time, same error. I tested it with a simple show command and that works. 

Anyone have any advice or experience working with the scripts?

Tags (2)
0 Kudos
4 Replies

Did you get it into enable mode in the script?

I find the compliance portion of NCM to be easier to do things like this overall.   Here is a link to a similar task, making sure invalid NTP servers aren't used by removing those and setting the correct ones.

 

https://thwack.solarwinds.com/t5/NCM-Discussions/Automated-Config-clean-up/m-p/312578#M15517

 

 

Thank you, I think I like this way better, this looks like it might run a lot smoother than my way.

0 Kudos

When you tested were you using the same account that ncm uses to access your devices?
- Marc Netterfield, Github

I did not think of that, thank you! I will give that a try.

0 Kudos