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.

NCM Compliance Remediation

I am having trouble getting a compliance remediation to complete. I am trying to change a VLAN, based on a match on a current VLAN. What I need is expressed in the answer to this thread Create Config Change Script based on vlan membership

The problem is that after my policy finds the interfaces, remediation gives me a syntax error. I see what the error is, but I dont know how to fix it. I could be performing this entire process wrong as this is my first time trying Compliance manager.

1. Made a rule based off of the previous article

pastedImage_1.png

2. Tested Int 0/1 - /04 are no listed, but they are the ones that should match, the ones listed say "no matches"

pastedImage_2.png

3. Make a Policy. Added the Rule and set the Node to only my test switch.

pastedImage_3.png

4. Create a Report. My test policy is applied

pastedImage_4.png

5. Run Policy and get results.

pastedImage_5.png

6. Execute Remediation. Here is where the failure happens

pastedImage_6.png

I get that it doesnt like the ${ConfigBlockStartLine}, but what else can I do to only change the specific interfaces that are triggered? Any help is much appreciated.

  • That's a good challenge.  If NCM can't handle the $ in your script, you may need to open a ticket with SW Support to find a work around.

    They'll want to know the brand & model of network equipment the script is supposed to modify.  In fact, including that information with your ticket might tickle someone else who has your same brand and model of gear, who has already figured this one out.

    It doesn't look like Cisco equipment I'm familiar with--what is it you're trying to modify with your compliance policy?

  • Below what you show here there should be a checkbox that says "Run script on each config block in violation".  Do you have that checked?  Sample below...

    pastedImage_0.png

  • This fixed it. I was running it as Config Change Template because of the other guide, but I guess that wasn't exactly what I needed to do. Thanks for the timely response.

  • This is a Cisco 3560CX, but it turns out my problem was fixed with other solution. Thank you for looking into it.

  • No problem!  You got a bit lucky, I was looking at your screen shots and was about to tell you the same as rschroeder​ told you.  But I pulled up my own environment and looked at it and realized that the error message was in line with what you might expect should it not be expecting to work with a config block.

    Glad it was an easy fix for you!!