Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions doc/.tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,6 @@ file_filter = locale/<lang>/LC_MESSAGES/admin-guide/monitoring/logging/log-build
source_file = _build/locale/pot/admin-guide/monitoring/logging/log-builder.en.pot
source_lang = en

[apache-traffic-server-6x.admin-guide--monitoring--logging--log-collation_en]
file_filter = locale/<lang>/LC_MESSAGES/admin-guide/monitoring/logging/log-collation.en.po
source_file = _build/locale/pot/admin-guide/monitoring/logging/log-collation.en.pot
source_lang = en

[apache-traffic-server-6x.admin-guide--monitoring--logging--log-formats_en]
file_filter = locale/<lang>/LC_MESSAGES/admin-guide/monitoring/logging/log-formats.en.po
source_file = _build/locale/pot/admin-guide/monitoring/logging/log-formats.en.pot
Expand Down
7 changes: 0 additions & 7 deletions doc/admin-guide/files/logging.yaml.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,6 @@ rolling_min_count number Specifies the minimum number of rolled logs t
filters array of The optional list of filter objects which
filters restrict the individual events logged. The array
may only contain one accept filter.
collation_hosts array of If present, one or more strings specifying the
strings log collation hosts to which logs should be
delivered, each in the form of "<ip>:<port>".
:ref:`admin-logging-collation` for more
information. NOTE: This is a deprecated feature,
which will be removed in ATS v9.0.0. See the
logging documentation (above) for more details.
====================== =========== =================================================

Enabling log rolling may be done globally in :file:`records.config`, or on a
Expand Down
99 changes: 1 addition & 98 deletions doc/admin-guide/files/records.config.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2765,25 +2765,7 @@ Logging Configuration
.. note::

All files in the logging directory contribute to the space used,
even if they are not log files. In collation client mode, if
there is no local disk logging, or
:ts:cv:`proxy.config.log.max_space_mb_for_orphan_logs` is set
to a higher value than :ts:cv:`proxy.config.log.max_space_mb_for_logs`,
|TS| will take :ts:cv:`proxy.config.log.max_space_mb_for_orphan_logs`
for maximum allowed log space.

.. ts:cv:: CONFIG proxy.config.log.max_space_mb_for_orphan_logs INT 25
:units: megabytes
:reloadable:

The amount of space allocated to the logging directory (in MB) if this node is acting as a collation client.

.. note::

When max_space_mb_for_orphan_logs is take as the maximum allowed log space in the logging system, the same rule apply
to proxy.config.log.max_space_mb_for_logs also apply to proxy.config.log.max_space_mb_for_orphan_logs, ie: All files
in the logging directory contribute to the space used, even if they are not log files. you may need to consider this
when you enable full remote logging, and bump to the same size as proxy.config.log.max_space_mb_for_logs.
even if they are not log files.

.. ts:cv:: CONFIG proxy.config.log.max_space_mb_headroom INT 1000
:units: megabytes
Expand Down Expand Up @@ -2826,85 +2808,6 @@ Logging Configuration
others, even if specified in the configuration file. Permissions for
existing log files are not changed when the configuration is modified.

.. ts:cv:: LOCAL proxy.local.log.collation_mode INT 0
:reloadable:
:deprecated:

Set the log collation mode.

===== ======================================================================
Value Effect
===== ======================================================================
``0`` Log collation is disabled.
``1`` This host is a log collation server.
``2`` This host is a collation client and sends entries using standard
formats to the collation server.
``3`` This host is a collation client and sends entries using the
traditional custom formats to the collation server.
``4`` This host is a collation client and sends entries that use both the
standard and traditional custom formats to the collation server.
===== ======================================================================

For information on sending custom formats to the collation server,
refer to :ref:`admin-logging-collating-custom-formats` and
:file:`logging.yaml`.

.. note::

Log collation is a *deprecated* feature as of ATS v8.0.0, and will be
removed in ATS v9.0.0. Our recommendation is to use one of the many existing
log collection tools, such as Kafka, LogStash, FileBeat, Fluentd or even
syslog / syslog-ng.

.. ts:cv:: CONFIG proxy.config.log.collation_host STRING NULL
:deprecated:

The hostname of the log collation server.

.. ts:cv:: CONFIG proxy.config.log.collation_port INT 8085
:reloadable:
:deprecated:

The port used for communication between the collation server and client.

.. ts:cv:: CONFIG proxy.config.log.collation_secret STRING foobar
:reloadable:
:deprecated:

The password used to validate logging data and prevent the exchange of unauthorized information when a collation server is being used.

.. ts:cv:: CONFIG proxy.config.log.collation_host_tagged INT 0
:reloadable:
:deprecated:

When enabled (``1``), configures |TS| to include the hostname of the collation client that generated the log entry in each entry.

.. ts:cv:: CONFIG proxy.config.log.collation_retry_sec INT 5
:reloadable:
:deprecated:

The number of seconds between collation server connection retries.

.. ts:cv:: CONFIG proxy.config.log.collation_host_timeout INT 86390
:deprecated:

The number of seconds before inactivity time-out events for the host side.
This setting over-rides the default set with proxy.config.net.default_inactivity_timeout
for log collation connections.

The default is set for 10s less on the host side to help prevent any possible race
conditions. If the host disconnects first, the client will see the disconnect
before its own time-out and re-connect automatically. If the client does not see
the disconnect, i.e., connection is "locked-up" for some reason, it will disconnect
when it reaches its own time-out and then re-connect automatically.

.. ts:cv:: CONFIG proxy.config.log.collation_client_timeout INT 86400
:deprecated:

The number of seconds before inactivity time-out events for the client side.
This setting over-rides the default set with proxy.config.net.default_inactivity_timeout
for log collation connections.

.. ts:cv:: CONFIG proxy.config.log.rolling_enabled INT 1
:reloadable:

Expand Down
137 changes: 3 additions & 134 deletions doc/admin-guide/logging/destinations.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ Two classes of destinations are provided by |TS| currently: local and remote.
Local logging involves storing log data onto filesystems locally mounted on the
same system as the |TS| processes themselves and are covered below in
:ref:`admin-logging-destinations-local`, while remote logging options involving
:manpage:`syslog` and built-in |TS| log collation, are covered below in
:ref:`admin-logging-destinations-remote`.
:manpage:`syslog`, are covered below in :ref:`admin-logging-destinations-remote`.

.. _admin-logging-destinations-local:

Expand All @@ -44,9 +43,8 @@ Local Logging
Log Directory Configuration
---------------------------

All local logging output (including incoming collation logs on a |TS| instance
configured as a :ref:`admin-logging-collation-server`) are stored within a
single base directory. Individual log file configurations may optionally append
All local logging output is stored within a single base directory.
Individual log file configurations may optionally append
subdirectories to this base path. This location is adjusted with
:ts:cv:`proxy.config.log.logfile_dir` in :file:`records.config`.

Expand Down Expand Up @@ -196,132 +194,3 @@ system and emergency logs. Sending custom event or transaction error logs to
syslog is not directly supported. You may use external log aggregation tools,
such as Logstash, to accomplish this by having them handle the ingestion of
|TS| local log files and forwarding to whatever receivers you wish.

.. _admin-logging-collation:

Log Collation
-------------

.. note::

Log collation is a *deprecated* feature as of ATS v8.0.0, and will be
removed in ATS v9.0.0. Our recommendation is to use one of the many existing
log collection tools, such as Kafka, LogStash, FileBeat, Fluentd or even
syslog / syslog-ng (see above).

|TS| offers remote log shipping natively through the log collation feature,
which allows one or more |TS| instances handling regular traffic to transmit
their log data to one or more |TS| instances acting as collation servers.

This allows you to centralize your |TS| logging for (potentially) easier
analysis and reporting in environments with many |TS| instances. Collation
servers may be |TS| instance running a stripped down configuration aimed
at log collation only (and omitting any configuration for actual traffic
proxying or caching).

When a |TS| node generates a buffer of event log entries, it first determines
if it is the collation server or a collation client. The collation server node
writes all log buffers to its local disk (as per its :file:`logging.yaml`
configuration), just as it would if log collation was not enabled. The
collation client nodes prepare their log buffers for transfer across the
network and send the buffers to the configured log collation server.

If log clients cannot contact their log collation server, then they write their
log buffers to their local disks, into orphan log files. Orphaned log files
require manual collation.

.. important::

Log collation can have an impact on network performance. Because all nodes
are forwarding their log data buffers to the single collation server, a
bottleneck can occur. In addition, collated log files contain timestamp
information for each entry, but entries in the files do not appear in strict
chronological order. You may want to sort collated log files before doing
analysis.

.. _admin-logging-collation-client:

Collation Client
~~~~~~~~~~~~~~~~

To configure a |TS| node to be a collation client, follow the steps below.

#. In the :file:`records.config` file, edit the following variables:

- :ts:cv:`proxy.local.log.collation_mode`: ``2`` to configure this node as
log collation client and send standard formatted log entries to the
collation server. For custom log entries, see :file:`logging.yaml`.
- :ts:cv:`proxy.config.log.collation_host`
- :ts:cv:`proxy.config.log.collation_port`
- :ts:cv:`proxy.config.log.collation_secret`
- :ts:cv:`proxy.config.log.collation_host_tagged`
- :ts:cv:`proxy.config.log.max_space_mb_for_orphan_logs`

#. Run the command :option:`traffic_ctl config reload` to apply the configuration
changes.

.. note::

If you modify the collation port or secret after connections between the
collation server and collation clients have been established, you must
restart |TS| on all nodes.

.. _admin-logging-collation-server:

Collation Server
~~~~~~~~~~~~~~~~

To configure a |TS| node to be a collation server, perform the following
configuration adjustments in :file:`records.config`:

#. Set :ts:cv:`proxy.local.log.collation_mode` to ``1`` to indicate this node
will be a server. ::

CONFIG proxy.local.log.collation_mode INT 1

#. Configure the port on which the server will listen to incoming collation
transfers from clients, using :ts:cv:`proxy.config.log.collation_port`. If
omitted, this defaults to port ``8085``. ::

CONFIG proxy.config.log.collation_port INT 8085

#. Configure the shared secret used by collation clients to authenticate their
sessions, using :ts:cv:`proxy.config.log.collation_secret`. ::

CONFIG proxy.config.log.collation_secret STRING seekrit

#. Run the command :option:`traffic_ctl config reload` to apply the configuration
changes.

.. note::

If you modify the collation port or secret after connections between the
collation server and collation clients have been established, you must
restart |TS| on all nodes.

.. _admin-logging-collating-custom-formats:

Collating Custom Logs
~~~~~~~~~~~~~~~~~~~~~

If you use custom event log files, then you must edit :file:`logging.yaml`,
in addition to configuring a collation server and collation clients.

To collate custom event log files:

#. On each collation client, edit :file:`logging.yaml` and add the
``CollationHosts`` attribute to the relevant logs. For example, adding two
collation hosts to an ASCII log that uses the Squid format would look like:

.. code:: yaml

logs:
- mode: ascii
format: squid
filename: squid
collationhosts:
- 192.168.1.100:4567
- 192.168.1.101:4567

#. Run the command :option:`traffic_ctl config reload` to restart |TS|.

23 changes: 0 additions & 23 deletions doc/admin-guide/logging/formatting.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ down into the following broad categories for (hopefully) easier reference:
- :ref:`admin-logging-fields-methods`
- :ref:`admin-logging-fields-ids`
- :ref:`admin-logging-fields-lengths`
- :ref:`admin-logging-fields-collation`
- :ref:`admin-logging-fields-network`
- :ref:`admin-logging-fields-plugin`
- :ref:`admin-logging-fields-proto`
Expand Down Expand Up @@ -447,28 +446,6 @@ ssql Origin Response Content body and header length combined of the
origin server response to |TS|.
===== ====================== ==================================================

.. _admin-logging-fields-collation:

Log Collation
~~~~~~~~~~~~~

.. _phn:
.. _phi:

Logging fields related to :ref:`admin-logging-collation`.

===== ====== ==================================================================
Field Source Description
===== ====== ==================================================================
phn Proxy Hostname of the |TS| node which generated the collated log entry.
phi Proxy IP of the |TS| node which generated the collated log entry.
===== ====== ==================================================================

.. note::

Log collation is a *deprecated* feature as of ATS v8.0.0, and will be
removed in ATS v9.0.0.

.. _admin-logging-fields-network:

Network Addresses, Ports, and Interfaces
Expand Down
3 changes: 1 addition & 2 deletions doc/admin-guide/logging/rotation.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ the following information:

- The original log file's name (such as ``access.log``).

- The hostname of the |TS| node that generated the log file (useful in |TS|
log collation configurations).
- The hostname of the |TS| node that generated the log file.

- Two timestamps separated by a hyphen (``-``). The first timestamp is
a *lower bound* for the timestamp of the first record in the log
Expand Down
1 change: 0 additions & 1 deletion doc/admin-guide/performance/index.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,6 @@ Logging Configuration

binary vs. ascii output
multiple log formats (netscape+squid+custom vs. just custom)
overhead to log collation
using direct writes vs. syslog target

Plugin Tuning
Expand Down
3 changes: 1 addition & 2 deletions include/ts/ts.h
Original file line number Diff line number Diff line change
Expand Up @@ -2087,8 +2087,7 @@ tsapi void TSRecordDump(int rec_type, TSRecordDumpCb callback, void *edata);
Creates a new custom log file that your plugin can write to. You
can design the fields and inputs to the log file using the
TSTextLogObjectWrite() function. The logs you create are treated
like ordinary logs; they are rolled if log rolling is enabled. (Log
collation is not supported though).
like ordinary logs; they are rolled if log rolling is enabled.

@param filename new log file being created. The new log file
is created in the logs directory. You can specify a path to a
Expand Down
1 change: 0 additions & 1 deletion iocore/cache/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ test_LDADD = \
$(top_builddir)/iocore/hostdb/libinkhostdb.a \
$(top_builddir)/proxy/logging/liblogging.a \
$(top_builddir)/proxy/hdrs/libhdrs.a \
$(top_builddir)/proxy/logging/liblogcollation.a \
$(top_builddir)/proxy/shared/libdiagsconfig.a \
$(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/iocore/utils/libinkutils.a \
Expand Down
1 change: 0 additions & 1 deletion iocore/eventsystem/I_Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
#define RAFT_EVENT_EVENTS_START 3200
#define SIMPLE_EVENT_EVENTS_START 3300
#define UPDATE_EVENT_EVENTS_START 3500
#define LOG_COLLATION_EVENT_EVENTS_START 3800
#define AIO_EVENT_EVENTS_START 3900
#define BLOCK_CACHE_EVENT_EVENTS_START 4000
#define UTILS_EVENT_EVENTS_START 5000
Expand Down
7 changes: 0 additions & 7 deletions lib/perl/lib/Apache/TS/AdminClient.pm
Original file line number Diff line number Diff line change
Expand Up @@ -520,12 +520,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.local_state_dir
proxy.config.log.ascii_buffer_size
proxy.config.log.auto_delete_rolled_files
proxy.config.log.collation_host
proxy.config.log.collation_host_tagged
proxy.config.log.collation_max_send_buffers
proxy.config.log.collation_port
proxy.config.log.collation_retry_sec
proxy.config.log.collation_secret
proxy.config.log.file_stat_frequency
proxy.config.log.hostname
proxy.config.log.log_buffer_size
Expand All @@ -535,7 +529,6 @@ The Apache Traffic Server Administration Manual will explain what these strings
proxy.config.log.max_line_size
proxy.config.log.max_secs_per_buffer
proxy.config.log.max_space_mb_for_logs
proxy.config.log.max_space_mb_for_orphan_logs
proxy.config.log.max_space_mb_headroom
proxy.config.log.overspill_report_count
proxy.config.log.rolling_enabled
Expand Down
Loading