Defining Network Profiles for NCP Logging

Page last updated:

This topic describes how to define network profiles for logging NCP configurations.

About Logging for NCP Configurations

Enterprise Pivotal Container Service (Enterprise PKS) provides network profile parameters for logging ncp.ini configurations.

Parameters for NCP Logging

The parameter cni_configurations is a map with two keys: type and parameters. The following table shows the parameters for configuring NCP:






Parameter Type Description
name String User-defined name of the network profile.
description String User-defined description for the network profile.
parameters Map One or more name-value pairs.
cni_configurations Map Map containing two key-value pairs: type and parameters.
type Constant String Only nsxt is accepted.
parameters Map Map containing one or more key-value pairs for NCP settings.
log_settings Map Holds parameters for configuring NCP logging.
log_level String Enumeration “INFO”, “WARNING”, “DEBUG”, “ERROR”, “CRITICAL”

Example Network Profile for NCP Logging

The following network profile is an example that illustrates the parameters exposed for NCP logging.

{
  "name": "ncp_network_profile",
  "description": "Example network profile for NCP logging and error handling",
  "parameters" : {
     "cni_configurations": {
         "type": "nsxt",
         "parameters": {
           "log_settings": {           
             "log_level": "WARNING",
              }
            }
          }
      }
}

Log Settings

The parameter log_settings is a map that supports one key: log_level.

Log Level

The log_level parameter type is a string. The log_level value is an enumeration that supports the following values:

  • “INFO”
  • “WARNING”
  • “DEBUG”
  • “ERROR”
  • “CRITICAL”

Any other value results in an error.

The value is set for three ncp.ini keys: coe.nsxlib_loglevel, coe.loglevel, and k8s.loglevel. The default log levels for these keys are as follows:

ncp.ini key Default log level
coe.nsxlib_loglevel INFO
coe.loglevel NONE
k8s.loglevel NONE

Please send any feedback you have to pks-feedback@pivotal.io.