You can migrate existing syslog properties that are defined by a tile into a syslog form that is provided in VMware Tanzu Operations Manager v2.9 and later.
When you enable the syslog feature, VMware Tanzu Operations Manager:
The following table lists the VMware 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 via 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 messages 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, if ($app-name startswith "exampleComponent") then stop . can be used to drop all traffic from a particular component. The configuration is applied before the forwarding rule. |
Tile authors can write a JavaScript migration to move their existing syslog properties into the syslog form provided by VMware Tanzu Operations Manager. After a successful migration, VMware Tanzu Operations Manager presents the migrated syslog properties in the Syslog form of the tile.
Set the opsmanager_syslog
property to true
in your metadata.yml
file. For more information, see opsmanager_syslog.
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;
};
In the code block above, 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.Save the JavaScript file to the PRODUCT/migrations/v1
directory of your .pivotal
file.
Remove the following:
form_types
that allow operators to configure tile-specific syslog configurationTo ensure that operators do not try to update syslog configuration properties with no outward functionality, mark all existing syslog configuration properties in your product as non-configurable.
Update the description for the deprecated properties to state that they are deprecated and are no longer used to configure the syslog.
Run a deployment test of your tile using the procedures in Testing Tiles.
Verify that your syslog properties are migrated into the VMware Tanzu Operations Manager syslog configuration:
syslog_configuration
VMware Tanzu Operations Manager API endpoint.For more information about the syslog_configuration
API endpoint, see Using the VMware Tanzu Operations Manager API.
In the next version of your product, remove the deprecated syslog configuration properties.