# destination: Forward, send, and store log messages

A destination is where a log message is sent if the filtering rules match. Similarly to sources, destinations consist of one or more drivers, each defining where and how messages are sent.

Note If no drivers are defined for a destination, all messages sent to the destination are discarded. This is equivalent to omitting the destination from the log statement. 

To define a destination, add a destination statement to the `syslog-ng.conf` configuration file using the following syntax:
```
 
       destination <identifier> {
            destination-driver(params); destination-driver(params); ...
        };
    
```

Note the following points:

  * Do not define the same drivers with the same parameters more than once, because it will cause problems. For example, do not open the same file in multiple destinations.
  * Do not use the same destination in different log paths, because it can cause problems with most destination types. Instead, use filters and log paths to avoid such situations.
  * Sources and destinations are initialized only when they are used in a log statement. For example, AxoSyslog starts listening on a port or starts polling a file only if the source is used in a log statement. For details on creating log statements, see [log: Filter and route log messages using log paths, flags, and filters](../docs/axosyslog-core/chapter-routing-filters/index.md).




## Example: A simple destination statement

The following destination statement sends messages to the TCP port `1999` of the `10.1.2.3` host.
```
 
       destination d_demo_tcp {
            network("10.1.2.3" port(1999));
        };
    
```

If name resolution is configured, you can use the hostname of the target server as well.
```
 
       destination d_tcp {
            network("target_host" port(1999));
        };
    
```

The following destination drivers are available in AxoSyslog. If these destinations do not satisfy your needs, you can extend AxoSyslog and write your own destination, for example, in C, Java, or Python. For details, see [Write your own custom destination in Java or Python](../docs/axosyslog-core/chapter-destinations/reference-destination-custom/index.md).

* * *

[amqp: Publish messages using AMQP](../docs/axosyslog-core/chapter-destinations/configuring-destinations-amqp/index.md)

[Send data to Azure Monitor and Sentinel](../docs/axosyslog-core/chapter-destinations/azure-monitor/index.md)

[Send data to Google BigQuery](../docs/axosyslog-core/chapter-destinations/google-bigquery/index.md)

[ClickHouse database](../docs/axosyslog-core/chapter-destinations/clickhouse/index.md)

[collectd: Send metrics to collectd](../docs/axosyslog-core/chapter-destinations/destination-collectd/index.md)

[discord: Send alerts and notifications to Discord](../docs/axosyslog-core/chapter-destinations/destination-discord/index.md)

[elasticsearch2: DEPRECATED - Send messages directly to Elasticsearch version 2.0 or higher](../docs/axosyslog-core/chapter-destinations/configuring-destinations-elasticsearch2/index.md)

[Send messages to Elasticsearch data streams](../docs/axosyslog-core/chapter-destinations/elasticsearch-data-stream/index.md)

[elasticsearch-http: Send messages to Elasticsearch HTTP Bulk API](../docs/axosyslog-core/chapter-destinations/configuring-destinations-elasticsearch-http/index.md)

[file: Store messages in plain-text files](../docs/axosyslog-core/chapter-destinations/configuring-destinations-file/index.md)

[Google Pub/Sub gRPC](../docs/axosyslog-core/chapter-destinations/google-pubsub-grpc/index.md)

[Google Pub/Sub HTTP REST API](../docs/axosyslog-core/chapter-destinations/google-pubsub/index.md)

[graphite: Send metrics to Graphite](../docs/axosyslog-core/chapter-destinations/configuring-destinations-graphite/index.md)

[graylog2: Send logs to Graylog](../docs/axosyslog-core/chapter-destinations/configuring-destinations-graylog/index.md)

[hdfs: Store messages on the Hadoop Distributed File System (HDFS)](../docs/axosyslog-core/chapter-destinations/configuring-destinations-hdfs/index.md)

[java: Post messages over HTTP using Java](../docs/axosyslog-core/chapter-destinations/configuring-destinations-http/index.md)

[http: Post messages over HTTP without Java](../docs/axosyslog-core/chapter-destinations/configuring-destinations-http-nonjava/index.md)

[kafka: Publish messages to Apache Kafka (Java implementation)](../docs/axosyslog-core/chapter-destinations/configuring-destinations-kafka/index.md)

[kafka-c(): Publish messages to Apache Kafka (C implementation)](../docs/axosyslog-core/chapter-destinations/configuring-destinations-kafka-c/index.md)

[loggly: Send logs to Loggly](../docs/axosyslog-core/chapter-destinations/configuring-destinations-loggly/index.md)

[logmatic: Send logs to Logmatic.io](../docs/axosyslog-core/chapter-destinations/configuring-destinations-logmatic/index.md)

[Send messages to Falcon LogScale](../docs/axosyslog-core/chapter-destinations/crowdstrike-falcon/index.md)

[loki: Grafana Loki](../docs/axosyslog-core/chapter-destinations/destination-loki/index.md)

[mongodb(): Store messages in a MongoDB database](../docs/axosyslog-core/chapter-destinations/configuring-destinations-mongodb/index.md)

[mqtt(): Send messages from a local network to an MQTT broker](../docs/axosyslog-core/chapter-destinations/destination-mqtt-intro/index.md)

[network: Send messages to a remote log server using the RFC3164 protocol (network() driver)](../docs/axosyslog-core/chapter-destinations/configuring-destinations-network/index.md)

[Send messages to OpenObserve](../docs/axosyslog-core/chapter-destinations/openobserve/index.md)

[opensearch: Send messages to OpenSearch](../docs/axosyslog-core/chapter-destinations/destination-opensearch/index.md)

[osquery: Send log messages to osquery's syslog table](../docs/axosyslog-core/chapter-destinations/configuring-destinations-osquery/index.md)

[Send logs, metrics, and traces to OpenTelemetry](../docs/axosyslog-core/chapter-destinations/opentelemetry/index.md)

[pipe: Send messages to named pipes](../docs/axosyslog-core/chapter-destinations/configuring-destinations-pipe/index.md)

[program: Send messages to external applications](../docs/axosyslog-core/chapter-destinations/configuring-destinations-program/index.md)

[pseudofile()](../docs/axosyslog-core/chapter-destinations/configuring-destinations-pseudofile/index.md)

[python: Write custom Python destinations](../docs/axosyslog-core/chapter-destinations/python-destination/index.md)

[redis: Store name-value pairs in Redis](../docs/axosyslog-core/chapter-destinations/configuring-destinations-redis/index.md)

[riemann: Monitor your data with Riemann](../docs/axosyslog-core/chapter-destinations/configuring-destinations-riemann/index.md)

[s3: Amazon S3](../docs/axosyslog-core/chapter-destinations/destination-s3/index.md)

[slack: Send alerts and notifications to a Slack channel](../docs/axosyslog-core/chapter-destinations/destination-slack/index.md)

[smtp: Generate SMTP messages (emails) from logs](../docs/axosyslog-core/chapter-destinations/configuring-destinations-smtp/index.md)

[snmp: Send SNMP traps](../docs/axosyslog-core/chapter-destinations/destination-snmp/index.md)

[splunk-hec-event: Send messages to Splunk HEC](../docs/axosyslog-core/chapter-destinations/syslog-ng-with-splunk/index.md)

[sql: Store messages in an SQL database](../docs/axosyslog-core/chapter-destinations/configuring-destinations-sql/index.md)

[stdout: Send messages to standard output](../docs/axosyslog-core/chapter-destinations/destination-stdout/index.md)

[stomp: Publish messages using STOMP](../docs/axosyslog-core/chapter-destinations/configuring-destinations-stomp/index.md)

[Sumo Logic destinations: sumologic-http() and sumologic-syslog()](../docs/axosyslog-core/chapter-destinations/destination-sumologic-intro/index.md)

[syslog: Send messages to a remote logserver using the IETF-syslog protocol](../docs/axosyslog-core/chapter-destinations/configuring-destinations-syslog/index.md)

[syslog-ng(): Forward logs to another syslog-ng node](../docs/axosyslog-core/chapter-destinations/destination-syslog-ng/index.md)

[axosyslog-otlp(): Forward logs to another node using OpenTelemetry](../docs/axosyslog-core/chapter-destinations/destination-syslog-ng-otlp/index.md)

[tcp, tcp6, udp, udp6: OBSOLETE - Send messages to a remote log server using the legacy BSD-syslog protocol (tcp(), udp() drivers)](../docs/axosyslog-core/chapter-destinations/configuring-destinations-tcpudp/index.md)

[telegram: Send messages to Telegram](../docs/axosyslog-core/chapter-destinations/configuring-destinations-telegram/index.md)

[unix-stream, unix-dgram: Send messages to UNIX domain sockets](../docs/axosyslog-core/chapter-destinations/configuring-destinations-unixstream/index.md)

[usertty: Send messages to a user terminal](../docs/axosyslog-core/chapter-destinations/destination-usertty/index.md)

[Write your own custom destination in Java or Python](../docs/axosyslog-core/chapter-destinations/reference-destination-custom/index.md)

[Client-side failover](../docs/axosyslog-core/chapter-destinations/concepts-failover/index.md)

Last modified October 22, 2024: [Formatting fixes on the main destinations page (be5c0ea)](<https://github.com/axoflow/axosyslog-core-docs/commit/be5c0eaffbcb0586bc3ef830db4709d45c03f62a>)