Templating Guide?

There is very limited information in the On Premises User Guide. 

For example the actual configurations that are allowed to be used,  their naming convention etc?  I assume they are taken from the SNMP MIBS? If so that should actually probably be added to the manual.  Also a method of acquiring this information or a link to your site that displays the mibs. 

I did discover you can pull the config from onboarded devices.  But it may not include ALL the configuration options there are available in a radio (via snmp)

For example - do I need to save and edit the entire config?  Or can I just take one configuration and push that specifically to one radio?

While already have access to this information some others may not.  So a guide as to how to get the information to configure (proper naming convention, maybe a list etc)  would be very helpful. 

If there is one posted somewhere else (other than the Cambium downloads section) please direct me to it!  Thanks!

1 Like

So I found a couple videos.  Oddly enough I've followed this formula by saving existing configs as templates and then just removing the information you don't want to update.  I figured this would be the way things would go.  I verified my json was correct and even tried it manually with the correct information.  Each time I get an error.  There is something to the process I am missing.  Anyone care to help?

The error on the AP I was trying to update showed this

ection in 5 seconds

11/29/2016 : 13:01:52 UTC : : Configuration file "cns_config.cfg", triggered from CNS-NG server, successfully imported.
12/01/2016 : 10:56:18 UTC : : JSON parse error: Could not find property "cfgFileString" in input
12/01/2016 : 10:56:18 UTC : : Aborting header file import
12/01/2016 : 10:56:18 UTC : : Config import failed
12/01/2016 : 12:17:34 UTC : : Config file: Could not find property "userParameters"
12/01/2016 : 12:17:34 UTC : : Configuration file "cns_config.cfg", triggered from CNS-NG server, failed to import.
12/01/2016 : 12:17:34 UTC : : Config import failed

Now it could be I am missing the userParameters section and there may be a need for a cgfilestring as well.  However none of that is mentioned in the docs either.  Nor was it shown in the demonstration video.

 

I took the liberty of downloading and looking at an actual config and it does show those parameters. 

So the question is this - when editing a config what are the bare minimum requirements for the config to work on a 450 and or an ePMP?

1 Like

PMP devices require "cfgFileString" and "cfgFileVersion".  There was an update made to automatically insert these parameters for the user before pushing to the device but I don't think it's been deployed yet.  Until then you should include them in your templates.  Give me a few minutes to check on when the issue was fixed.

{
	"userParameters": {
		...
	},
	"cfgFileString": "Canopy configuration file",
	"cfgFileVersion": "1.0"
}

I posted a basic guide for configuration templates here.  It sounds like you are doing something similar already.  The best way to see what is supported by template configuration is to edit a device and export its configuration first.  MIB to configuration template correlation depends on the device line.  ePMP is close to 1-to-1 in terms of naming and supported parameters but I think there are a couple parameters that are not supported.  A good example is action-based OIDs for things like triggering auto-population of the latitude/longitude.

You can take partial configurations out of a full configuration and just push the parameters you want to change.  That link above explains how to do that.

You may have seen these already but here are a list of links with information that may be useful to you or others:

There are also default templates available on the Templates view to provide examples of what can be done with templates.

I would like to see a document here too. How bout an example that shows how to set some common options that I'm sure many use:
NTP Server/Time Zone

DNS Servers

BootP Filter disable to prevent customers polluting dhcp

SNMP contact

Web-page Auto Update

SNMP read/write

SNMP Community

1 Like

I pushed a simple template without "cfgFileString" and "cfgFileVersion" on one of our test servers without issue.  Once we update the cloud servers "cfgFileString" and "cfgFileVersion" will no longer be requried in PMP templates.  Until then be sure to include those parameters.

We have already included some example templates for both ePMP and PMP platforms as well as wifi platforms under the Configure->Templates section . If you want to make some more specific templates please read the configuration from the device by going to configure->Devices after selecting the particular device and click on view device config.

This can be saved as template and then keep the parameters you need for the template and can remove the other not needed parameters.

Thanks for your replies and help in this matter.  I'll take another look at the docs to see if they are newer than what I've read already. 

I am on an earlier version of the software and as of the today there were no 450 templates in the system.  Only ePMP.  So its possible we are discussing things that will be resolved when you release the newer version (today I think?)

I'll give you a quick rundown of what I'm trying to do as simply as possible. 

Here is a really simple update to the syslog ip.  The JSON is valid but it doesn't actually work. 

{
	"userParameters": {
		"syslogServerAddr": "1.2.3.4",
		"cfgFileString": "Canopy configuration file",
		"cfgFileVersion": "1.0"
	}
}

This actually went through but it didn't push it to the system.  So I need the other subheading in there for this to work?

Try this instead and let us know if it works.

{
	"userParameters": {
		"syslogServerAddr": "1.2.3.4"
	},
	"cfgFileString": "Canopy configuration file",
	"cfgFileVersion": "1.0"
}

cfgFileString and cfgFileVersion are outside of userParameters.

Perfect you can tell I'm not a coder :) 

It makes sense.  Gave it a try without success again.  It does say it worked but it didn't actually send that information to the radio. 

I'll give it a try next week hopefully we'll be up on the new version by then.

I thought I was getting this down... but I'm struggling with the following.  I can't determine why this is failing, as my other variables work just fine for configuring SNMP, Site Name, Etc.

I simplifed it down to the following and still it fails.  It fails when I attempt to push it to the base station, saves just fine:

{
    "userParameters": {
      "apRadioConfig": {
            "radioColorCode": "${COLORCODE}",
            "radioControlSlots": 6,
            "ofdmSMRcvTargetLvl": -60,
            "radioMaxRange": 9,
            "radioDownlinkPercent": 65,
            "smIsolation": 2
        }
    },
    "cfgFileString": "Canopy configuration file",
    "cfgFileVersion": "1.0"
}

However, if I replace the variable and enter just a value of 77 it works just fine.

I'm running on premise, and my version is 1.4.0-r11

The device is failing due to radioColorCode.  When you use  the template with the replacement variable cnMaestro is sending

"radioColorCode": "77"

Note the quotes.  When you just use the number 77 without quotes it works fine.  This is because the device only accepts numbers.  With the quotes, a string is being used.

There is a known issue where cnMaestro doesn't allow saving templates with replacement variables outside of quotes.  This is fixed in 1.5.0.  The On-Premises version will be released soon.

Once you are using 1.5.0 update your template to use the replacement variable without quotation marks.

"radioColorCode": ${COLORCODE}

Will update my own question, see this is supposed to be fixed in 1.5.0.  WIll apply and see what happens.

1 Like