How to: Create and Use Custom Fields in ZPE Cloud

How to: Create and Use Custom Fields in ZPE Cloud

Custom fields is a way to make your profiles/templates more dynamic.  A custom field is similar to a variable in that it can have different values depending on the scope of the field.  You can create a custom field under "Profiles::Custom Fields".  Select NEW to create a new custom field



Provide a name, value, and scope.  The name does not have to be unique.  Using a fields with same name allows for variability based on the scope.  For example, you can have a field named 'primary_dns' with different scopes and depending on the context of the target device, the value will be determined by the closest matching scope. Below is a table describing the scopes and what they apply to and the precedence in the cased the custom field name is the same.

Context

Applies To

Precedence

Global

Everything: all groups, all sites, all devices

Last

Group

Any device in the specified group

Third

Site

Any device in the specified site

Second

Device

Only to the specified device

First


In the following scenario:



NYC-BSR-01 and NYC-BSR-02 are in Site: NYC

NYC-GSR-01 is not in any site


Value of primary_dns when used in a profile and applied to NYC-BSR-01: 1.1.1.1

Value of primary_dns when used in a profile and applied to NYC-GSR-01: 8.8.8.8

Value of primary_dns when used in a profile and applied to NYC-BSR-02: 10.1.0.10


To use the custom variable in your templates/profiles, you create a "Dynamic Template" by setting the "Dynamic Template" checkbox for the template, and then enclose the variable names with double curly braces: {{primary_dns}}.

Below is sample dynamic template that uses custom fields.

  1. set /settings/date_and_time server={{mt_ntp_server}}
    set /settings/network_settings hostname={{mt_hostname}}
    set /settings/network_connections/ETH1 ipv4_mode=static
    set /settings/network_connections/ETH1 ipv4_address={{mt_eth1_address}}
    set /settings/network_connections/ETH1 ipv4_bitmask={{mt_eth1_bitmask}}


    • Related Articles

    • Adding Custom Field for Access view

      Introduction:       Having the defined custom fields in the "Access" page allows the user to isolate the target device and using the search option to find the unit in the UI quicker. For an example of the "Device-Loc" to indicate the device location ...
    • How to: Create and Use Dynamic Templates in ZPE Cloud

      ZPE Cloud Dynamic Template can be used to apply a dynamic configuration/script to one or more devices. It can contain variables which have different values depending on the device it is applied to. Variables are defined under "Custom Fields" tab in ...
    • How to: Create and apply configurations to your device using ZPE Cloud

      Overview ZPE Cloud profiles enable to perform operations to your Nodegrid devices, such as: configurations, custom scripts, backups, software upgrades, and cellular modem firmware upgrades. In this document, we are focusing on the configuration ...
    • How to: Create a ZPE Cloud account and add ZPE Cloud users 

      To create ZPE Cloud users, you must have a ZPE Cloud account. ZPE Cloud accounts are bonded to your company. Company is the denomination of your tenant in ZPE Cloud. The ZPE Cloud account manages the ZPE Cloud company. 1. Access zpecloud.com or ...
    • How to: Set up ZPE Cloud event notifications

      This document describes the process to set up ZPE Cloud event notifications. Define events you want to receive notifications 1. Login to ZPE Cloud as admin. 2. Go to Settings :: Notification :: Events You can select enable notifications based on ...