Overview

NextGen gateway facilitates the new feature called Zero-touch onboarding. This feature helps customers with easy onboarding. Zero-touch onboarding reduces the customer efforts like creating credentials, discovery profiles, and integrations. Using the simple YAML configuration files these are created automatically and onboard the customer.

Please refer OpsRamp’s Collector Bootstrap Tool for general guidelines on how to install and register NextGen gateway.

YAML Discovery Configuration

Following is the sample YAML configuration that we need to prepare before registering the gateway to the OpsRamp cloud.

discovery-config.yaml

Sample YAML definition file (Version 01)

This V1 YAML configuration will work for Classic apps.

---
gatewayprofile:
  name: Gateway Profile
  description: Management Profile for Gateway
  type: Gateway
discovery:
- type: snmp
  credential:
    credentialType: SNMP
    name: SNMP Credentials
    description: SNMP Device Credentials
    transportType: HTTP
    timeoutMs: 15000
    spSecure: false
    port: 161
    snmpVersion: V2
    community: public
  discoveryProfile:
    name: SNMP Discovery Profile
    discoveryType: gateway
    discoveryProfileType: SNMP
    deviceType: ''
    credentialSet: SNMP Credentials
    ipDetails:
      discoveryType: IPRANGE
      ipRange: 172.26.1.18,172.26.1.19
    gatewayScheduleFlag: 'true'
    discoverySchedule:
      patternType: DAILY
      pattern: '1'
      startTime: '02'
    customParams:
      discUsingCdpFdpLldpEtc: 'true'
- type: VMWare
  credential:
    credentialType: VMWARE
    description: VMWare Device Credentials
    name: VMWare Credentials
    timeoutMs: 15000
    secure: true
    port: 443
    userName: admin@user
    password: admin@1234
  integration:
    displayName: VMWare-172.25.0.13
    ipAddress: 172.25.0.13
    credentialSet: VMWare Credentials
    discoveryProfiles:
    - policy:
        actions:
        - action: MANAGE DEVICE
        entityType: ALL
        matchType: ANY
        rules:
        - filterType: ANY_CLOUD_RESOURCE
      scanNow: true
      schedule:
        pattern: '1'
        patternType: DAILY
        startTime: 18
- type: VMWare
  credential:
    credentialType: VMWARE
    description: VMWare Device Credentials
    name: VMWare Credentials
    timeoutMs: 15000
    secure: true
    port: 443
    userName: admin@user
    password: admin@1234
  integration:
    displayName: VMWare-172.25.0.12
    ipAddress: 172.25.0.12
    credentialSet: VMWare Credentials
    discoveryProfiles:
    - policy:
        actions:
        - action: MANAGE DEVICE
        entityType: ALL
        matchType: ANY
        rules:
        - filterType: ANY_CLOUD_RESOURCE
      scanNow: true
      schedule:
        pattern: '1'
        patternType: DAILY
        startTime: 18

Sample YAML definition file (Version 02)

This V2 YAML configuration will work for Classic apps and SDK 2.0 Apps.

With the enhanced zero-touch onboarding discovery configuration, users can directly provide the API JSON payload which is available in OpsRamp public API documentation and no need to convert JSON payload to YAML. Also, users will notify the error message when there is an issue with the given discovery configuration.

This improved feature supports SDK 2.0 apps and with this improvement, the installation process for SDK2.0 apps will be automated.

---
apiVersion: v2
discovery:
  - classicApp:
      - app: VMWare
        config:
          {
            "credential":
              {
                "credentialType": "VMWARE",
                "description": "VMWare Device Credentials",
                "name": "VMWare Credentials",
                "timeoutMs": 15000,
                "secure": true,
                "port": 443,
                "userName": "test"",
                "password": "Pass@1234",
              },
            "integration":
              {
                "displayName": "172.25.0.16",
                "ipAddress": "172.25.0.16",
                "credentialSet": "VMWare Credentials",
                "discoveryProfiles": [
                    {
                    "name": "VMWare 172.25.0.16 Profile",
                    "scanNow": true,
                    "schedule": {
                        "patternType": "HOURLY",
                        "pattern": "1",
                        "startTime": "1:00:00"
                    },
                    "policy": {
                        "actions": [
                            {
                              "action": "MANAGE DEVICE"
                            }
                        ],
                        "entityType": "any",
                        "matchType": "ANY",
                        "rules": [
                          {
                            "resourceType": []
                          },
                        ],
                      },
                    }
                 ],
              },
          }
      - app: SNMP
        config:
          {
            "credential":
              {
                "credentialType": "SNMP",
                "name": "SNMP Credentials",
                "description": "SNMP Device Credentials",
                "transportType": "HTTP",
                "timeoutMs": 15000,
                "spSecure": false,
                "port": 161,
                "snmpVersion": "V2",
                "community": "public",
              },
            "discoveryProfile":
              {
                "name": "TEST-SNMP-16-18-19",
                "schedule": {
                "patternType": "HOURLY",
                "pattern": "1",
                "startTime": "1:00:00"
                },
                "config": {
                "deviceType": "SNMP Network Device",
                "networkDepth": "1",
                "discoveryType": "Iprange",
                "credentials": [
                  "dfvTjvaZEkuxavqEmeZuxVz6"
                ],
                "ipRange": "172.26.1.18, 172.26.1.19",
                "snmpEnabledDevice": true,
                "cdp": true,
                "ospf": true,
                "bgp": true,
                "bridge": true,
                "loadBalancer": false,
                "revDnsLookUp": false,
                "discoverVoipPhones": false,
                "advOpt": false,
                "tcpPort": "443",
                "nmapResult": true,
                "policy": {
                  "action": "MANAGE DEVICE"
                }
                },
                  "scheduleNone": false
                }
              }
  - sdkApp:
      - app: vmware-nsx-t
        version: 10.0.0
        configs:
          - config: {
                "credential":
                {
                  "credentialType": "APPLICATION",
                  "userName": "test",
                  "password": "Pass@1234",
                  "name": "test-nsx-t",
                  "description": "test",
                },
                "name": "vmware_nsx_t_config1",
                "schedule":
                  {
                    "patternType": "MINUTES",
                    "pattern": "20",
                    "startTime": "00:20:00",
                  },
                "config": {
                  "port": "9092",
                  "isSecure": false,
                  "apiTimeOuts": false,
                  "alertSeverity": "[\"CRITICAL\",\"HIGH\",\"MEDIUM\",\"LOW\"]",
                  "socketTimeout": 10,
                  "connectionTimeout": 60,
                  "alertClearedStatus": "[\"ACKNOWLEDGED\",\"SUPPRESSED\",\"RESOLVED\"]",
                  "alertConfiguration": false,
                  "notificationAlerts": false,
                  "alertOnRootResource": true,
                  "alertSeverityMapping": "{\"CRITICAL\":\"Critical\",\"HIGH\":\"Warning\",\"MEDIUM\":\"Warning\",\"LOW\":\"Info\"}",
                  "connectionRequestTimeout": 10,
                  "ipAddress": "172.25.252.63",
                  "credential": "test-nsx-t",
                },
                "allResources": true,
              }
      - app: hpe-3par
        version: 4.0.1
        configs:
          - config: {
                "credential":
                {
                  "credentialType": "APPLICATION",
                  "userName": "test",
                  "password": "Pass@1234",
                  "name": "hpe-3par",
                  "description": "test",
                },
                "name": "HPE 3PAR",
                "schedule": {
                  "patternType": "HOURLY",
                  "pattern": "1",
                  "startTime": "1:00:00"
                },
                "config": {
                  "category": "[\"1\",\"2\"]",
                  "isSecure": false,
                  "alertSeverity": "[\"FATAL\",\"CRITICAL\",\"MAJOR\",\"MINOR\"]",
                  "notificationAlert": true,
                  "alertConfiguration": false,
                  "alertSeverityMapping": "{\"FATAL\":\"Critical\",\"CRITICAL\":\"Critical\",\"MAJOR\":\"Warning\",\"MINOR\":\"Warning\",\"DEGRADED\":\"Warning\",\"INFORMATIONAL\":\"Info\",\"DEBUG\":\"Info\",\"UNKNOWN\":\"Info\"}",
                  "IP Address": "172.25.252.63",
                  "Port": "9097",
                  "sshPort": "443",
                  "Credential": "hpe-3par"
                },
                "allResources": true
              }

How to Specify Discovery Configuration ?

opsramp-collector-start tool is required for Zero-touch onboarding.
You can download the opsramp-collector-start tool from here, and how to use this tool can be found here.

Once the YAML configuration is completed, use the opsramp-collector-start tool to register the gateway to the OpsRamp cloud by providing the configuration file as input.

Syntax

Register through a direct connection:

opsramp-collector-start install --environment {Environment} –-url {OpsRamp Server URL} –-key {Gateway unique authentication token} --config {YAML Discovery Configuration File Path}

Register through the proxy without credentials:

opsramp-collector-start install --environment {Environment} –-url {OpsRamp Server URL} –-key {Gateway unique authentication token} --proxy-protocol {Proxy Protocol http/https} --proxy-ip {Proxy IP Address} --proxy-port {Proxy Port} --config {YAML Discovery Configuration File Path}

Register through proxy with credentials:

opsramp-collector-start install --environment {Environment} –-url {OpsRamp Server URL} –-key {Gateway unique authentication token} --proxy-protocol {Proxy Protocol http/https} --proxy-ip {Proxy IP Address} --proxy-port {Proxy Port} --proxy-username {Proxy Username} --proxy-password {Proxy Password}  --config {YAML Discovery Configuration File Path}

Example

opsramp-collector-start install --environment k8s --url gatewaytest.api.opsramp.net --key 06d49ab5-a589-44f2-a68b-ee35405d5701 --config discovery-config.yml