Loggregator Guide for PAS Operators
Page last updated:
This topic contains information for Pivotal Application Service (PAS) deployment operators about how to configure the Loggregator system to avoid data loss with high volumes of logging and metrics data.
For more information about the Loggregator system, see Loggregator Architecture.
You can measure both the message throughput and message reliability rates of your Loggregator system.
To measure the message throughput of the Loggregator system, you can monitor the total number of egress messages from all Metrons on your platform using the
If you do not use a monitoring platform, you can measure the overall message throughput of your Loggregator system. To measure the overall message throughput:
Log in to the Cloud Foundry Command Line Interface (cf CLI) with your admin credentials by running:
Install the PAS Firehose plugin. For more information, see the Install the Plugin section of the Installing the Loggregator Firehose Plugin for cf CLI topic.
Install Pipe Viewer by running:
apt-get install pv
cf nozzle -n | pv -l -i 10 -r > /dev/null
To measure the message reliability rate of your Loggregator system, you can run black-box tests. If you want to use this method, see the open-source cf-logmon app and the configuration instructions provided in the README.md file.
Most Loggregator configurations use preferred resource defaults. For more information about customizing these defaults and planning the capacity of your Loggregator system, see Key Capacity Scaling Indicators.
Nozzles are programs that consume data from the Loggregator Firehose. Nozzles can be configured to select, buffer, and transform data, and to forward it to other apps and services. You can scale a nozzle using the subscription ID specified when the nozzle connects to the Firehose. If you use the same subscription ID on each nozzle instance, the Firehose evenly distributes data across all instances of the nozzle.
For example, if you have two nozzle instances with the same subscription ID, the Firehose sends half of the data to one nozzle instance and half to the other. Similarly, if you have three nozzle instances with the same subscription ID, the Firehose sends one-third of the data to each instance.
If you want to scale a nozzle, the number of nozzle instances should match the number of Traffic Controller instances:
Number of nozzle instances = Number of Traffic Controller instances
Stateless nozzles should handle scaling gracefully. If a nozzle buffers or caches the data, the nozzle author must test the results of scaling the number of nozzle instances up or down.
The Traffic Controller alerts nozzles if they consume events too slowly. If a nozzle falls behind, Loggregator alerts the nozzle in two ways:
TruncatingBuffer alerts: If the nozzle consumes messages more slowly than they are produced, the Loggregator system may drop messages. In this case, Loggregator sends the log message,
TB: Output channel too full. Dropped N messages, where
Nis the number of dropped messages.
CounterEvent: Loggregator also emits a CounterEvent with the name
doppler_proxy.slow_consumer. The nozzle receives both messages from the Firehose, alerting the operator to the performance issue.
For more information about the Traffic Controller, see the Loggregator Architecture section of the Loggregator Architecture topic.
You can configure PAS to forward log data from apps to an external aggregator service. For information about how to bind apps to the external service and configure it to receive logs from PAS, see Streaming App Logs to Log Management Services.
When a Diego Cell emits app logs to Metron, Diego breaks up log messages greater than approximately 60 KiB into multiple envelopes.