Spring Boot based CF Firehose Nozzle - will feed data to TCP/UDP based syslog sink
Java

README.adoc

This is a Cloud Foundry Firehose Nozzle written using CF-Java-Client and Spring Boot. This project is heavily inspired by go based firehose-to-syslog nozzle and should be completely feature compatible with that project including being able to enhance log details with information about application name, org and space the application belongs to.

Developing Locally

  • Clone this project

git clone https://github.com/bijukunjummen/boot-firehose-to-syslog
  • Build it locally

./gradlew clean build
  • Run it locally

./gradlew bootRun

If you have a local PCF Dev running, you should see logs being printed to the console at this point. PR’s and suggestions are welcome!

Deploying the Nozzle

  • Get the latest version of the release available here OR build a release zip using

./gradlew buildZip
  • Unzip the zip file and there should be a manifest and a jar file.

  • Specify the parameters in manifest.yml to connect to firehose and to the syslog sink :

cf_host: api.local.pcfdev.io
cf_user: admin
cf_password: admin
cf_skip_ssl_validation: true
firehose_event_types: LOG_MESSAGE, VALUE_METRIC, CONTAINER_METRIC
firehose_text_format: TEXT
firehose_parallelism: 5
firehose_subscription_id: boot-firehose-to-syslog
syslog_server: asyslogserver
syslog_port: 9997
syslog_connection_type: TCP

The text format can be set to TEXT or JSON, the eventTypes to CONTAINER_METRIC, COUNTER_EVENT, ERROR, HTTP_START, HTTP_START_STOP, HTTP_STOP, LOG_MESSAGE, VALUE_METRIC

Metrics can be sent over both TCP/UDP. If the connectionType is set to "DEBUG" then the logs will simply be printed to the console which is the default mode.

  • Push the app once you have a working set of environment variables in the manifest file:

cf push