The following options are specific to the google-pubsub() destination in syslog-ng OSE.

Since this destination is based on the http() destination, the HTTP destination options can also be used. The google-pubsub() destination automatically configures some of these http() destination options as required by the Google Pub/Sub AP.

attributes()

Type: string
Default: "--scope rfc5424,all-nv-pairs --exclude MESSAGE"

Description: A JSON object representing key-value pairs for the Pub/Sub Event, formatted as syslog-ng OSE value-pairs. By default, the google-pubsub() destination sends the RFC-5424 fields as attributes. If different fields are required, override the default template. By default, the message part is sent in the data() option

auth()

Description: This is an option for cloud-related authentication. Currently only the GCP Service Account authentication is supported.

Example: storing the key to the service account

auth(
    service-account(
      key("/path/to/service-account-key.json")
    )
  )

service-account()

See the example for auth() above.

data()

Type: string/template
Default: "${MESSAGE}"

Description: The template used as the data element of the Google Pub/Sub message.

persist-name()

Type: string
Default: N/A

Description: If you receive the following error message during syslog-ng OSE startup, set the persist-name() option of the duplicate drivers:

Error checking the uniqueness of the persist names, please override it with persist-name option. Shutting down.

or

Automatic assignment of persist names failed, as conflicting persist names were found. Please override the automatically assigned identifier using an explicit persist-name() option or remove the duplicated configuration elements.

This error happens if you use identical drivers in multiple sources, for example, if you configure two file sources to read from the same file. In this case, set the persist-name() of the drivers to a custom string, for example, persist-name("example-persist-name1").

project()

Type: string/template
Default:  

Description: The ID of the Google Cloud project where syslog-ng OSE sends the data. The Pub/Sub API must be enabled for the project.

topic()

Type: string
Default:  

Description: The name of the Google Pub/Sub target topic to where syslog-ng OSE sends the data.

Updated: