You can migrate existing syslog properties that are defined by a tile into a syslog form that is provided in Tanzu Operations Manager v2.9 and later.

When you enable the syslog feature, Tanzu Operations Manager:

  • Provides your tile with its own syslog form
  • Ensures that the syslog BOSH release is automatically injected into the instance groups of your product
  • Includes syslog configuration properties when Tanzu Operations Manager injects the syslog release into your product

Syslog data model

The following table lists the Tanzu Operations Manager syslog parameters that you can use to migrate your existing configurations:

Syslog parameter Data Type Required Notes
enabled boolean No Defaults to false
address string Yes The address or host for the syslog server.
Must be a valid network address
port integer Yes The port on which the syslog server listens
transport_protocol string No The transport protocol used to send syslog messages to the server.
Valid values are tcp and udp. Defaults to tcp
tls_enabled boolean No Send logs encrypted to syslog server through TLS. Defaults to false
permitted_peer boolean No, unless tls_enabled is true Defaults to false.
ssl_ca_certificate string No, unless tls_enabled is true Must be a valid certificate
Defaults to null.
environment string No Human-readable identifier that is included in each log line
queue_size integer No The number of log entries the buffer holds before dropping messages. A larger buffer size might overload the system. Defaults to 100000
forward_debug_logs boolean No Defaults to false
custom_rsyslog_configuration text No Additional configuration for rsyslog written in the rainerscript syntax. For example, ($app-name startswith "exampleComponent") and stop.
This code drops all traffic from a particular component. The configuration is applied before the forwarding rule.

Use the JavaScript migration process

Tile authors can write a JavaScript migration to move their existing syslog properties into the syslog form provided by Tanzu Operations Manager. After a successful migration, Tanzu Operations Manager presents the migrated syslog properties in the Syslog form of the tile.

  1. Set the opsmanager_syslog property to true in your metadata.yml file. For more information, see opsmanager_syslog.

  2. To write your JavaScript migration, use the following example as a template:

    exports.migrate = function(input) {
      input.syslog_configuration = {
        enabled: true,
        address: input.properties['.PROPERTY-REFERENCE.EXAMPLE-ADDRESS'],
        port: input.properties['.PROPERTY-REFERENCE.EXAMPLE-PORT'],
        transport_protocol: input.properties['.PROPERTY-REFERENCE.EXAMPLE-PROTOCOL']
      };
      return input;
    };
    

    Replace the example text as follows:

    • PROPERTY-REFERENCE: Replace with the property reference that corresponds to the metadata file, such as properties. For more information about migrating properties, see Tile Upgrades.
    • EXAMPLE-ADDRESS: Replace with the property name of the address.
    • EXAMPLE-PORT: Replace with the property name of the port.
    • EXAMPLE-PROTOCOL: Replace with the property name of the transport protocol.
  3. Save the JavaScript file to the PRODUCT/migrations/v1 directory of your .pivotal file.

  4. Remove the following:

    • From your product template, form_types that allow operators to configure tile-specific syslog configuration
    • From your tile, the syslog BOSH release
    • From your deployment manifest, syslog configuration properties
  5. To ensure that operators do not try to update syslog configuration properties with no outward capability, mark all existing syslog configuration properties in your product as non-configurable.

  6. Update the description for the deprecated properties to state that they are deprecated and are no longer used to configure the syslog.

  7. Run a deployment test of your tile using the procedures in Testing Tiles.

  8. Verify that your syslog properties are migrated into the Tanzu Operations Manager syslog configuration:

    • View the configurations in the Syslog pane in Tanzu Operations Manager Settings page.
    • View your syslog properties using the syslog_configuration Tanzu Operations Manager API endpoint.

    For more information about the syslog_configuration API endpoint, see Retrieving syslog configuration for a product.

  9. In the next version of your product, remove the deprecated syslog configuration properties.

check-circle-line exclamation-circle-line close-line
Scroll to top icon