Update Log Elements

Details

API Details
NameUpdate Log Elements
Description

View log levels and log tracking status for the CCO, CCM, or Application VM servers. See Locate Log Files for additional context.

MethodPUT
URI
  • v1/logs (CCM must be up and running)
  • v1/logs?nodeType=CCO&regionId=CloudRegionId (CCO must be up and running)
  • v1/logs?nodeType=WORKER &regionId=CloudRegionId &nodeId=nodeId (the cloud must be in the RUNNING state and the Application VM must be configured and NodeReady)
CloudCenter ReleaseIntroduced in CloudCenter 4.4.
Notes
  • For additional context on <PORT> usage in the following example(s), see Base URI Format.
  • You can provide a varied combination of levels and status for each log package.
  • You cannot enable and update the level together for any package. However, you can issue them as separate requests as displayed in the examples below.
  • The following table provides additional details on permissions to issue this API.

    ServerAPI Permissions
    CCMOnly root admin
    CCOAny tenant admin with the following permissions:
    • Has access to the cloud region
    • Has a user cloud account configured on the CCO
    Worker (Application VM)Any user who has MANAGE or AUTHORIZE access to the deployment environment used to start the job (that started the node).
  • When the CCO is deployed in HA mode, the CCO load balancer only sends the request to one instance of the CCO cluster. As the CloudCenter platform does not select the target CCO, be sure to issue the request for all the CCO instances in the cluster.

ESB Header
  • action: put.logs (CCM must be up and running) 
  • action: put.logs
    actionparam: nodeType=CCO
    &regionId=CloudRegionId (CCO must be up and running)
  • action: put.logs
    actionparam: nodeType=WORKER &regionId=CloudRegionId &nodeId=
    nodeId (the cloud must be in the RUNNING state and the Application VM must be configured and NodeReady)

Example

curl -k -X PUT -H "Accept: application/json" -u cliqradmin:40E45DBE57E35ECB "https://<HOST>:<PORT>/v1/logs" 

Request to Update Log Level

{
    "logPackages": [{
        "packageName": "com.osmosix",
        "level": "DEBUG"
    }, {
        "packageName": "org.hibernate.SQL",
        "level": "INFO"
    }]
}

Request to Enable/Disable Logging

{
    "logPackages": [{
        "packageName": "org.hibernate.SQL",
        "enable": true
    }, {
        "packageName": "com.osmosix",
        "enable": false
    }]
}

Request Attributes

 nodeType
  • Description: A string that identifies the CloudCenter component.

  • Type: Enumeration

    EnumerationDescription
    CCMThe CCM component.
    CCOThe CCO component.
    CLOUDBLADE

    Effective CloudCenter 4.9.0, a component that provides a uniform cloud service consumption of various cloud providers offering VM deployments (public clouds and private clouds/datacenters).

    CONTAINERBLADE

    Effective CloudCenter 4.9.0, a component that provides a uniform cloud service consumption of various cloud providers offering container deployments (container clouds).

    WORKERThe Worker (Application VM) component.

regionId
  • DescriptionUnique, system-generated identifier for the cloud region 

  • Type: String

Retrieves the region identifier to map to the CCO or the Application VM

regionId
  • DescriptionUnique, system-generated identifier for the cloud region 

  • Type: String

cloudRegionId
  • Description: Unique, system-generated identifier for a cloud region
  • Type: String

nodeId
  • DescriptionUnique identifier for the node – generated by the cloud provider

  • Type: String

Identifies the ID for the application VM on which the log operations must be performed

logPackages
  • Description: Detail about each log file level and status.
  • Type: Sequence of log packages details

     packageName 
    • Description: The log file name for this package. 
    • Type: String
    level
    • Description: The log level for this file.
    • Type: Enumeration

      EnumerationDescription
      ALLAll levels of logging
      DEBUGDetailed information on the system flow and are generally written to logs.
      ERROROther runtime errors or unexpected conditions and are generally visible on the CCM UI.
      FATALSevere errors that cause premature termination and are generally visible on th CCM UI.
      INFOStartup or shut down runtime events and are are generally visible on the CCM UI.
      so be conservative and keep to a minimum.
      TRACEDetailed log information and are generally written to logs.
      WARNUse of deprecated APIs, poor use of API, other runtime situations that are undesirable or unexpected and area generally visible on the CCM UI
       TRACE_INT Detailed log information and are generally written to logs.
      OFFTurns off logging.
    enabled
    • Description: Indicates that this resource has been enabled. The default differs based on the resource.

      • true = The resource has been enabled (v2 aging and suspension policies are enabled by default).

      • false = The resource has not been enabled.

    • Type: Boolean

Response Attributes

logPackages
  • Description: Detail about each log file level and status.
  • Type: Sequence of log packages details

     packageName 
    • Description: The log file name for this package. 
    • Type: String
    level
    • Description: The log level for this file.
    • Type: Enumeration

      EnumerationDescription
      ALLAll levels of logging
      DEBUGDetailed information on the system flow and are generally written to logs.
      ERROROther runtime errors or unexpected conditions and are generally visible on the CCM UI.
      FATALSevere errors that cause premature termination and are generally visible on th CCM UI.
      INFOStartup or shut down runtime events and are are generally visible on the CCM UI.
      so be conservative and keep to a minimum.
      TRACEDetailed log information and are generally written to logs.
      WARNUse of deprecated APIs, poor use of API, other runtime situations that are undesirable or unexpected and area generally visible on the CCM UI
       TRACE_INT Detailed log information and are generally written to logs.
      OFFTurns off logging.
    enabled
    • Description: Indicates that this resource has been enabled. The default differs based on the resource.

      • true = The resource has been enabled (v2 aging and suspension policies are enabled by default).

      • false = The resource has not been enabled.

    • Type: Boolean

© 2017-2019 Cisco Systems, Inc. All rights reserved