From 08e7b00cadb6d673affaa05d0d9371eb134b96cd Mon Sep 17 00:00:00 2001 From: "Zsolt Gyulai (zgyulai)" Date: Thu, 7 Dec 2023 12:49:50 +0100 Subject: [PATCH] Added section about ingress/egress metrics Signed-off-by: Zsolt Gyulai (zgyulai) --- .../Guides/syslog-ng-guide-admin/logpath.htm | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Content/Guides/syslog-ng-guide-admin/logpath.htm b/Content/Guides/syslog-ng-guide-admin/logpath.htm index ed17b94bb..c89fa7d0d 100644 --- a/Content/Guides/syslog-ng-guide-admin/logpath.htm +++ b/Content/Guides/syslog-ng-guide-admin/logpath.htm @@ -36,6 +36,35 @@
Declaration
+

In version 4.1 and later versions, it is possible to add an ID or name to the log path to produce an easily readable configuration file. also collects ingress and egress metrics for named log paths.

+
+
Example:
+
log top-level {
+    source(s_local);
+
+    log inner-1 {
+        filter(f_inner_1);
+        destination(d_local_1);
+    };
+
+    log inner-2 {
+        filter(f_inner_2);
+        destination(d_local_2);
+    };
+};
+
+

Each named log path counts its ingress and egress messages:

+
syslogng_log_path_ingress{id="top-level"} 114
+syslogng_log_path_ingress{id="inner-1"} 114
+syslogng_log_path_ingress{id="inner-2"} 114
+syslogng_log_path_egress{id="top-level"} 103
+syslogng_log_path_egress{id="inner-1"} 62
+syslogng_log_path_egress{id="inner-2"} 41
+
+
+

NOTE: The egress statistics only log the messages which have not been filtered out from the related log path. It ignores whether there are any destinations in the message or that any destination delivers or drops the message.

+
+
Example: A simple log statement