diff --git a/Content/Guides/syslog-ng-guide-admin/destination-opensearch.htm b/Content/Guides/syslog-ng-guide-admin/destination-opensearch.htm new file mode 100644 index 000000000..d65fa2253 --- /dev/null +++ b/Content/Guides/syslog-ng-guide-admin/destination-opensearch.htm @@ -0,0 +1,60 @@ + + + + + + +

opensearch: Send messages to OpenSearch

+

Available in version 4.4 and later versions.

+

The opensearch() destination posts log messages to OpenSearch using its HTTP endpoint.

+

HTTPS connection, password- and certificate-based authentication are supported. The content of the events is sent in JSON format.

+
+
Declaration:
+

d_opensearch {
+    opensearch(
+        index("<opensearch-index-to-store-messages>")
+        url("https://your-opensearch-endpoint:9200/_bulk")
+    );
+};

+
+
+
+
Example: Sending log data to OpenSearch
+

The following example defines an opensearch() destination, using only the required options.

+
destination opensearch {
+    opensearch(
+        index("<name-of-the-index>")
+        url("http://my-elastic-server:9200/_bulk")
+    );
+};
+    
+    
+log {
+    source(s_file);
+    destination(d_opensearch_http);
+    flags(flow-control);
+};
+ +

The following example uses mutually-authenticated HTTPS connection, templated index, and additional options.

+

destination opensearch_https {
+    opensearch(
+        url("https://node01.example.com:9200/_bulk")
+        index("test-${YEAR}${MONTH}${DAY}")
+        time-zone("UTC")
+        workers(4)
+        batch-lines(16)
+        timeout(10)
+        tls(
+            ca-file("ca.pem")
+            cert-file("syslog_ng.crt.pem")
+            key-file("syslog_ng.key.pem")
+            peer-verify(yes)
+        )
+    );
+};
+

+

This driver is a reusable configuration snippet configured to send log messages using the http() driver with a template. For more information on using or writing such configuration snippets, see Reusing configuration blocks. For the source of this configuration snippet, see GitHub.

+
+
+ + \ No newline at end of file diff --git a/Project/TOCs/syslog-ng-ose-guide-admin.fltoc b/Project/TOCs/syslog-ng-ose-guide-admin.fltoc index 258860ba8..9a4b1095c 100644 --- a/Project/TOCs/syslog-ng-ose-guide-admin.fltoc +++ b/Project/TOCs/syslog-ng-ose-guide-admin.fltoc @@ -715,6 +715,10 @@ Link="/Content/Guides/syslog-ng-guide-admin/reference-destination-network-chapter.htm" Title="[%=System.LinkedTitle%]"> + +