logwatch
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
logwatch [2020/11/05 19:42] – créée pascal | logwatch [2023/07/04 10:55] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
===== Présentation ===== | ===== Présentation ===== | ||
- | ntpd est un daemon | + | logwatch |
===== Installation ===== | ===== Installation ===== | ||
< | < | ||
- | root@mazarini: | + | root@mazarini: |
</ | </ | ||
- | ===== Configuration | + | ===== Configuration ===== |
- | ==== Configuration initiale | + | ==== / |
+ | Création du répertoire s'il n' | ||
< | < | ||
- | # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help | + | root@mazarini: |
+ | root@mazarini: | ||
+ | total 0 | ||
+ | root@mazarini: | ||
+ | </ | ||
+ | ==== /etc/logwatch/ | ||
+ | Copier le fichier / | ||
+ | === Configuration initiale === | ||
+ | < | ||
+ | ######################################################## | ||
+ | # This was written and is maintained by: | ||
+ | # Kirk Bauer < | ||
+ | # | ||
+ | # Please send all comments, suggestions, | ||
+ | # etc, to kirk@kaybee.org. | ||
+ | # | ||
+ | ######################################################## | ||
- | driftfile / | + | # NOTE: |
+ | # All these options are the defaults if you run logwatch with no | ||
+ | # | ||
+ | # | ||
+ | # You can put comments anywhere you want to. They are effective for the | ||
+ | # rest of the line. | ||
- | # Enable | + | # this is in the format of < |
- | #statsdir / | + | # and end of the lines is removed. |
+ | # is removed. | ||
- | statistics loopstats peerstats clockstats | + | # Yes = True = On = 1 |
- | filegen loopstats file loopstats type day enable | + | # No = False = Off = 0 |
- | filegen peerstats file peerstats type day enable | + | |
- | filegen clockstats file clockstats type day enable | + | |
+ | # You can override the default temp directory (/tmp) here | ||
+ | TmpDir = / | ||
- | # You do need to talk to an NTP server or two (or three). | + | #Output/ |
- | #server ntp.your-provider.example | + | #By default Logwatch will print to stdout in text with no encoding. |
+ | #To make email Default set Output = mail to save to file set Output = file | ||
+ | Output = stdout | ||
+ | #To make Html the default formatting Format = html | ||
+ | Format = text | ||
+ | #To make Base64 [aka uuencode] Encode = base64 | ||
+ | Encode = none | ||
- | # pool.ntp.org maps to about 1000 low-stratum NTP servers. | + | # Input Encoding |
- | # pick a different set every time it starts up. | + | # Logwatch assumes that the input is in UTF-8 encoding. |
- | # pool: < | + | # will use iconv to convert text to the UTF-8 encoding. |
- | server 0.debian.pool.ntp.org iburst | + | # to an empty string to use the default current locale. |
- | server 1.debian.pool.ntp.org iburst | + | # encoding, |
- | server 2.debian.pool.ntp.org iburst | + | # illegal characters. Valid encodings are as used by the iconv program, |
- | server 3.debian.pool.ntp.org iburst | + | # and `iconv -l` lists valid character set encodings. |
+ | # Setting CharEncoding to UTF-8 simply discards illegal UTF-8 characters. | ||
+ | # | ||
+ | # Default person to mail reports to. Can be a local account or a | ||
+ | # complete email address. | ||
+ | # --output mail should be passed on command line to enable mail feature. | ||
+ | MailTo = root | ||
+ | # WHen using option --multiemail, | ||
+ | # email recipient per host processed. | ||
+ | # for hostname host1 to user@example.com, | ||
+ | # | ||
+ | # Multiple recipients can be specified by separating them with a space. | ||
- | # Access control configuration; | + | # Default person to mail reports from. |
- | # details. | + | # complete email address. |
- | # might also be helpful. | + | MailFrom = Logwatch |
- | # | + | |
- | # Note that " | + | |
- | # that might be intended to block requests from certain clients could also end | + | |
- | # up blocking replies from your own upstream servers. | + | |
- | # By default, exchange time with everybody, but don't allow configuration. | + | # if set, the results will be saved in < |
- | restrict -4 default kod notrap nomodify nopeer noquery | + | # or displayed. Be sure to set Output = file also. |
- | restrict -6 default kod notrap nomodify nopeer noquery | + | #Filename = / |
- | # Local users may interrogate | + | # Use archives? |
- | restrict 127.0.0.1 | + | # (i.e. / |
- | restrict ::1 | + | # be searched in addition to the / |
+ | # This usually will not do much if your range is set to just | ||
+ | # ' | ||
+ | # By default this is now set to Yes. To turn off Archives uncomment this. | ||
+ | #Archives = No | ||
- | # Clients from this (example!) subnet have unlimited access, but only if | + | # The default time range for the report... |
- | # cryptographically authenticated. | + | # The current choices are All, Today, Yesterday |
- | #restrict 192.168.123.0 mask 255.255.255.0 notrust | + | Range = yesterday |
+ | # The default detail level for the report. | ||
+ | # This can either be Low, Med, High or a number. | ||
+ | # Low = 0 | ||
+ | # Med = 5 | ||
+ | # High = 10 | ||
+ | Detail = Low | ||
- | # If you want to provide time to your local subnet, change the next line. | ||
- | # (Again, the address is an example only.) | ||
- | #broadcast 192.168.123.255 | ||
- | # If you want to listen to time broadcasts on your local subnet, de-comment | + | # The ' |
- | # next lines. | + | # (in / |
- | # | + | # The default service(s) to report |
- | #broadcastclient | + | # most people. |
- | </ | + | Service = All |
- | ==== Choisir son serveur de référence ==== | + | # You can also disable |
- | < | + | Service = " |
- | # pool.ntp.org maps to about 1000 low-stratum NTP servers. | + | # prints useful network configuration info. |
- | # pick a different set every time it starts up. Please consider joining | + | Service |
- | # pool: <http://www.pool.ntp.org/join.html> | + | # prints useful system configuration info. |
- | server 0.fr.pool.ntp.org iburst dynamic | + | Service = "-eximstats" |
- | server 1.fr.pool.ntp.org iburst dynamic | + | # is a wrapper for the eximstats program. |
- | server 2.fr.pool.ntp.org iburst dynamic | + | # If you only cared about FTP messages, you could use these 2 lines |
- | server 3.fr.pool.ntp.org iburst dynamic | + | # instead of the above: |
- | server ntp.online.net | + | #Service = ftpd-messages |
- | </ | + | #Service = ftpd-xferlog |
- | Il faut choisir des **serveurs proche de chez soi**. Souvent, ce ne sont pas des machines mais des pools de machines qui tournent. | + | # Maybe you only wanted reports on PAM messages, then you would use: |
+ | #Service = pam_pwdb | ||
+ | #Service = pam # General PAM messages... usually not many | ||
- | J'ai choisi de prendre les serveurs ntp de mon hébergeur et les 4 pools français. Il y a des pools définis par zone géographique. | + | # You can also choose to use the 'LogFile' |
+ | # logwatch to only analyze that one logfile.. for example: | ||
+ | #LogFile = messages | ||
+ | # will process / | ||
+ | # process that logfile. | ||
+ | # most people. | ||
+ | # anyways... | ||
- | La machine ntp.online.net correspond à un pool de machines. | + | # |
+ | # By default we assume that all Unix systems have sendmail or a sendmail-like MTA. | ||
+ | # The mailer code prints a header with To: From: and Subject:. | ||
+ | # At this point you can change the mailer to anything that can handle this output | ||
+ | # stream. | ||
+ | # TODO test variables in the mailer string to see if the To/ | ||
+ | # From here with out breaking anything. This would allow mail/ | ||
+ | mailer = "/ | ||
- | iburst | + | # |
+ | # With this option set to a comma separated list of hostnames, only log entries | ||
+ | # for these particular hosts will be processed. | ||
+ | # process only its own logs, or Logwatch can be run once per a set of hosts | ||
+ | # included in the logfiles. | ||
+ | # Example: HostLimit = hosta, | ||
+ | # | ||
+ | # The default is to report on all log entries, regardless of its source host. | ||
+ | # Note that some logfiles do not include host information and will not be | ||
+ | # influenced by this setting. | ||
+ | # | ||
+ | #HostLimit = myhost | ||
- | dynamic : ne pas black-lister les serveurs indisponible | + | # Default Log Directory |
+ | # All log-files are assumed to be given relative to the LogDir directory. | ||
+ | # Multiple LogDir statements are possible. | ||
+ | # to set particular directories follow, so LogDir need not be set. | ||
+ | #LogDir = /var/log | ||
+ | # | ||
+ | # By default /var/adm is searched after LogDir. | ||
+ | # | ||
+ | # | ||
+ | # By default /var/log is to be searched after LogDir and /var/adm/ . | ||
+ | # | ||
+ | # | ||
+ | # The current working directory can be searched after the above. | ||
+ | # default. | ||
+ | # | ||
+ | </ | ||
+ | === Modifications === | ||
+ | < | ||
+ | Output = mail | ||
+ | MailFrom = root | ||
+ | </ | ||
===== Commandes ===== | ===== Commandes ===== | ||
- | ==== Gestion du daemon | + | ==== Test de logwatch |
< | < | ||
- | root@mazarini: | + | root@mazarini: |
- | root@mazarini: | + | root@mazarini: |
- | root@mazarini: | + | |
- | </ | + | |
- | ==== Interrogation ==== | + | |
- | < | + | |
- | # ntpq -p | + | |
- | | + | |
- | ============================================================================== | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | # | + | |
</ | </ | ||
+ | Commande trouvée dans / | ||
+ | |||
===== Références ===== | ===== Références ===== | ||
- | * Choix du pool de serveurs | ||
- | * [[http:// | ||
- | * [[http:// | ||
| |
logwatch.1604605355.txt.gz · Dernière modification : 2023/07/04 10:55 (modification externe)