Skip to content

Commit e8c4ccd

Browse files
committed
fixed some bugs
1 parent f521762 commit e8c4ccd

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

src/common/de/monitoring_logfiles.asciidoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -*- coding: utf-8 -*-
2-
// IGNORE ereignisbasiert mk_logwatch venv anlassbezogen giga terabyteweise CheckmkService Precompile logfile logfiles logwatch Reklassifizieren aussieben maxcontextlines maxlines maxlinesize maxoutputsize maxtime nocontext skipconsecutiveduplicated Seperate
2+
// IGNORE ereignisbasiert mk_logwatch venv anlassbezogen giga terabyteweise CheckmkService Precompile logfile logfiles logwatch Reklassifizieren aussieben maxcontextlines maxlines maxlinesize maxoutputsize maxtime nocontext Logfile skipconsecutiveduplicated Seperate
33
include::global_attr.adoc[]
44
= Log-Dateien überwachen
55
:revdate: draft
@@ -164,7 +164,7 @@ Wir verwenden an dieser Stelle das Python-Modul `glob`, zu dem es auf docs.pytho
164164
Wir wollen Ihnen aber gleich hier ein paar hilfreiche Beispiele an die Hand geben.
165165

166166
Schreiben Sie hier beispielsweise `/var/log/my.log` hinein, wird Logwatch eben diese eine Log-Datei überwachen.
167-
Geben Sie hier stattdessen `/var/log/*log` ein, wird Logwatch alle Dateien, die auf die Zeichenfolge `log` enden und *direkt* im Verzeichnis `/var/log` liegen, überwachen.
167+
Geben Sie hier stattdessen `pass:[/var/log/*log]` ein, wird Logwatch alle Dateien, die auf die Zeichenfolge `log` enden und *direkt* im Verzeichnis `/var/log` liegen, überwachen.
168168
Wollen Sie Log-Dateien in allen direkten Unterverzeichnissen von `/var/` überwachen, können Sie das beispielsweise mit dem folgenden Glob erledigen: `pass:[/var/*/*log]`.
169169
Das Glob `pass:[**]` zum rekursiven Durchsuchen einer Verzeichnisstruktur bieten wir hier explizit *nicht* an, weil wir damit viel zu schnell bei viel zu großen Trefferlisten landen und den eigentlichen Einsatzzweck von Logwatch hinter uns lassen.
170170

@@ -209,7 +209,7 @@ Bei kleinen Log-Dateien, die minütlich nur um ein paar Zeilen anwachsen, ist di
209209
Wenn aber auf einem Host aber 50 Log-Dateien überwacht werden, die plötzlich 100.000 neue Zeilen mit einer Länge von 500 Zeichen aufweisen, landen wir schon im Gigabyte-Bereich.
210210
Womöglich würde es bei einem solchen Ereignis eben genügen zu sehen, dass seit der letzten Prüfung sehr viele neue Meldungen dazu gekommen sind, um eine Prüfung direkt auf dem betroffenen Host zu veranlassen.
211211

212-
Sollten Sie den Kontext - also die Zeilen vor und nach einer für Sie wichtigen Log-Meldung - doch benötigen, so können Sie diesen mit der Optionen [.guihint]#Limit the amount of context data sent to the monitoring server# und [.guihint]# auf eine bestimmte Menge an Zeilen vorher und nachher beschränken.
212+
Sollten Sie den Kontext - also die Zeilen vor und nach einer für Sie wichtigen Log-Meldung - doch benötigen, so können Sie diesen mit der Optionen [.guihint]#Limit the amount of context data sent to the monitoring server# auf eine bestimmte Zahl an Zeilen vorher und nachher beschränken.
213213

214214
Mit [.guihint]#Limit the amount of data sent to the monitoring server# beschränken Sie die Größe der übertragenen Daten ganz allgemein.
215215

@@ -221,8 +221,8 @@ Erst beim zweiten Durchlauf werden die Dateien dann auf Ihren Inhalt - sprich di
221221

222222
Logwatch ist bei seiner Arbeit darauf angewiesen, die Log-Dateien aus tatsächlich lesen zu können.
223223
Unter der Haube gibt sich Logwatch sehr viel Mühe, die Kodierung einer jeden Log-Datei zu erkennen.
224-
Allzu exotische Codecs können aber dazu führen, dass es hier zu Problemen kommt.
225-
Falls Sie den Codec der überwachten Log-Dateien beeinflussen können, ist UTF-8 eine sehr gute Wahl.
224+
Allzu exotische Zeichenkodierungen können aber dazu führen, dass es hier zu Problemen kommt.
225+
Falls Sie die Zeichenkodierungen der überwachten Log-Dateien beeinflussen können, ist UTF-8 eine sehr gute Wahl.
226226
Geht das nicht und schafft Logwatch es nicht, die Kodierung herauszufinden, können Sie mit [.guihint]#Codec that should be used to decode the matching files# eine explizite Angabe machen.
227227

228228
Mit [.guihint]#Duplicated messages management# lässt sich wieder ein bisschen Bandbreite sparen und auch die spätere Ausgabe in {CMK} wird leserlicher, wenn Sie diese Option aktivieren.
@@ -279,7 +279,7 @@ Konsultieren Sie für die Erklärung bitte obigen Abschnitt.
279279

280280
[cols=4]
281281
|===
282-
| Option in logwatch.cfg | Entsprechung | Beispiel | Anmerkung
282+
| Option in `logwatch.cfg` | Entsprechung | Beispiel | Anmerkung
283283
| regex | Regular expression for logfile filtering | `regex='error.log$\|err$'` |
284284
| encoding | Codec that should be used to decode the matching files | `encodig=utf-8` |
285285
| maxlines | Restrict number of processed messages per cycle | `maxlines=500` |
@@ -300,7 +300,8 @@ Konsultieren Sie für die Erklärung bitte obigen Abschnitt.
300300
Der zum Agentenplugin gehörige Check namens `logwatch` erstellt normalerweise für jede Logdatei einen eigenen Service.
301301
Durch die Definition von Gruppierungen mithilfe der Regel [.guihint]#Logfile Grouping# können Sie auf den Check `logwatch_groups` umschalten.
302302

303-
Weitere Informationen folgen demnächst. Konsultieren Sie bis dahin bitte die Inline-Hilfe der Regel [.guihint]#Logfile Grouping.#
303+
Weitere Informationen folgen demnächst.
304+
Konsultieren Sie bis dahin bitte die Inline-Hilfe der Regel [.guihint]#Logfile Grouping.#
304305

305306

306307
[#logfile_patterns]

src/common/en/monitoring_logfiles.asciidoc

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// -*- coding: utf-8 -*-
2-
// IGNORE mk_logwatch venv codecs CheckmkService Precompile logfile logfiles logwatch maxcontextlines maxlines maxlinesize maxoutputsize maxtime nocontext skipconsecutiveduplicated Seperate
2+
// IGNORE mk_logwatch venv CheckmkService Precompile Codec logfile logfiles logwatch maxcontextlines maxlines maxlinesize maxoutputsize maxtime nocontext skipconsecutiveduplicated Seperate Logfile prefiltering
33
include::global_attr.adoc[]
44
= Monitoring log files
55
:revdate: draft
@@ -38,7 +38,7 @@ You should also use moderation when using Logwatch.
3838
Logwatch is suitable for metered use and not for processing gigabytes or terabytes of log files.
3939
There are certainly more suitable tools for this.
4040
We strongly recommend using Logwatch only on an ad hoc basis and not across the board.
41-
As you will see later in the article, it is easy to carry out an important part of the (pre-)filtering on the monitored host.
41+
As you will see later in the article, it is easy to carry out an important part of the prefiltering on the monitored host.
4242

4343
[#prereqisites]
4444
== Prerequisites
@@ -108,6 +108,9 @@ Users of our commercial editions can select [.guihint]#Text logfiles (Linux, Sol
108108
In line with the initial considerations, Logwatch does not monitor anything without configuration.
109109
Therefore, after installing the agent plugin, it is essential to create a configuration file for the monitored host.
110110

111+
[#configuration_bakery]
112+
==== Configuration via the Agent Bakery
113+
111114
{cee-only}
112115
In the commercial editions, first call up the rule for the agent plugin [.guihint]#Setup > Agents > Windows, Linux, Solaris, AIX > Agent rules > Text logfiles (Linux, Solaris, Windows)#.
113116
The default setting [.guihint]#Deploy the Logwatch plugin and its configuration# should normally be left as it is.
@@ -127,7 +130,7 @@ We are using the Python module `glob` here, for which there is a link:https://do
127130
However, we would like to provide you with a few helpful examples right here.
128131

129132
For example, if you enter `/var/log/my.log` here, Logwatch will monitor just this one log file.
130-
If you enter `/var/log/*log` here instead, Logwatch will monitor all files that end with the character string `log` and are located *directly* in the directory `/var/log`.
133+
If you enter `pass:[/var/log/*log]` here instead, Logwatch will monitor all files that end with the character string `log` and are located *directly* in the directory `/var/log`.
131134
If you want to monitor log files in all direct subdirectories of `/var/`, you can do this with the following glob, for example: `pass:[/var/*/*log]`.
132135
We explicitly *do not* offer the glob `pass:[**]` for recursively searching a directory structure here, because we would end up with far too large a hit list far too quickly and leave the actual purpose of Logwatch behind us.
133136

@@ -139,7 +142,7 @@ The following table gives you a few more helpful examples of how you can use glo
139142
|`/var/log/*` | All files in `/var/log` | `/var/log/mylog` `/var/log/my.log`
140143
|`pass:[/var/log/*/*]`| All files in all direct subdirectories of /var/log/ | `/var/log/foo/mylog` `/var/log/bar/mylog`
141144
|`/var/log/mylog?.log` | All files in `/var/log` where the name begins with `mylog`, followed by a singe character and ending in `.log` | `/var/log/mylog1.log` `/var/log/mylog9.log`
142-
|`/var/log/mylog[123].log`| All files in `/var/log` where the name begins with `mylog`, followed by either a `1`, `2` or `3` and ending in`.log` | `/var/log/mylog1.log` `/var/log/mylog3.log`
145+
|`/var/log/mylog[123].log`| All files in `/var/log` where the name begins with `mylog`, followed by either a `1`, `2` or `3` and ending in `.log` | `/var/log/mylog1.log` `/var/log/mylog3.log`
143146
|===
144147

145148
So when it comes to which files are "matched" in the *first* step, we use *no* regular expressions and this may be enough for you to reach all the files you want.
@@ -169,7 +172,7 @@ For small log files that only grow by a few lines every minute, the setting [.gu
169172
However, if 50 log files are monitored on a host, which suddenly contain 100,000 new lines with a length of 500 characters, we are already in the gigabyte range.
170173
In such an event, it may be enough to see that a large number of new messages have been added since the last check in order to initiate a check directly on the host concerned.
171174

172-
If you do need the context - i.e. the lines before and after a log message that is important to you - you can limit this to a certain amount of lines before and after with the options [.guihint]#Limit the amount of context data sent to the monitoring server# and [.guihint]#.
175+
If you do need the context - i.e. the lines before and after the log message that is important to you - you can limit this to a certain amount of lines before and after with the options [.guihint]#Limit the amount of context data sent to the monitoring server#.
173176

174177
With [.guihint]#Limit the amount of data sent to the monitoring server# you can limit the size of the transferred data in general.
175178

@@ -181,8 +184,8 @@ Only during the second run are the files checked for their content - i.e. the ne
181184

182185
Logwatch relies on actually being able to read the log files.
183186
Under the hood, Logwatch goes to great lengths to recognize the coding of each log file.
184-
However, codecs that are too exotic can lead to problems.
185-
If you can influence the codec of the monitored log files, UTF-8 is a very good choice.
187+
However, character encoding that are too exotic can lead to problems.
188+
If you can influence the character encoding of the monitored log files, UTF-8 is a very good choice.
186189
If this is not possible and Logwatch does not manage to find out the encoding, you can make an explicit specification with [.guihint]#Codec that should be used to decode the matching files#.
187190

188191
With [.guihint]#Duplicated messages management# you can save a bit of bandwidth again and the subsequent output in {CMK} will also be more readable if you activate this option.
@@ -228,7 +231,7 @@ Please refer to the above section for an explanation.
228231

229232
[cols=4]
230233
|===
231-
| option in logwatch.cfg | counterpart | example | remark
234+
| option in `logwatch.cfg` | counterpart | example | remark
232235
| regex | Regular expression for logfile filtering | `regex='error.log$\|err$'` |
233236
| encoding | Codec that should be used to decode the matching files | `encodig=utf-8` |
234237
| maxlines | Restrict number of processed messages per cycle | `maxlines=500` |

0 commit comments

Comments
 (0)