「logwatch」の版間の差分

提供: セキュリティ
移動: 案内検索
(ページの作成:「<!-- vim: filetype=mediawiki --> 読み方 ;logwatch:ろぐうぉっち __TOC__ == 概要 == logwatch は、ログ監視ツールです。 == インスト...」)
 
 
(同じ利用者による、間の1版が非表示)
行12: 行12:
  
 
== インストール ==
 
== インストール ==
 +
 +
{{ports|/usr/ports/sysutils/logwatch|logwatch}}
  
 
{{yum|logwatch}}
 
{{yum|logwatch}}
  
 
== 使い方 ==
 
== 使い方 ==
 +
 +
<syntaxhighlight lang="bash">
 +
$ sudo logwatch --help
 +
 +
Usage: /usr/sbin/logwatch [--detail <level>] [--logfile <name>]
 +
  [--print] [--mailto <addr>] [--archives] [--range <range>] [--debug <level>]
 +
  [--save <filename>] [--help] [--version] [--service <name>]
 +
  [--numeric] [--output <output_type>]
 +
  [--splithosts] [--multiemail] [--no-oldfiles-log]
 +
 +
--detail <level>: Report Detail Level - High, Med, Low or any #.
 +
--logfile <name>: *Name of a logfile definition to report on.
 +
--logdir <name>: Name of default directory where logs are stored.
 +
--service <name>: *Name of a service definition to report on.
 +
--print: Display report to stdout.
 +
--mailto <addr>: Mail report to <addr>.
 +
--archives: Use archived log files too.
 +
--save <filename>: Save to <filename>.
 +
--range <range>: Date range: Yesterday, Today, All, Help
 +
                            where help will describe additional options
 +
--numeric: Display addresses numerically rather than symbolically and numerically
 +
          (saves  a  nameserver address-to-name lookup).
 +
--debug <level>: Debug Level - High, Med, Low or any #.
 +
--splithosts: Create a report for each host in syslog.
 +
--multiemail: Send each host report in a separate email.  Ignored if
 +
              not using --splithosts.
 +
--output <output type>: Report Format - mail, html or unformatted#.
 +
--encode: Use base64 encoding on output mail.
 +
--no-oldfiles-log: Suppress the logwatch log, which informs about the
 +
                  old files in logwatch tmpdir.
 +
--version: Displays current version.
 +
--help: This message.
 +
* = Switch can be specified multiple times...
 +
</syntaxhighlight>
 +
  
 
標準出力に表示です。
 
標準出力に表示です。

2013年4月7日 (日) 23:03時点における最新版


読み方

logwatch
ろぐうぉっち

概要

logwatch は、ログ監視ツールです。

インストール

FreeBSDにインストールする場合

ports コレクションからインストールする場合

cd /usr/ports/sysutils/logwatch
sudo make install clean

pkgコマンドでインストールする場合

sudo pkg install logwatch

portmasterコマンドでインストールする場合

sudo portmaster -y -d /usr/ports/sysutils/logwatch

portinstallコマンドでインストールする場合

sudo portinstall /usr/ports/sysutils/logwatch

CentOSにインストールする場合

CentOSyum コマンドでインストールする場合。

sudo yum -y  install logwatch

使い方

$ sudo logwatch --help
 
Usage: /usr/sbin/logwatch [--detail <level>] [--logfile <name>]
   [--print] [--mailto <addr>] [--archives] [--range <range>] [--debug <level>]
   [--save <filename>] [--help] [--version] [--service <name>]
   [--numeric] [--output <output_type>]
   [--splithosts] [--multiemail] [--no-oldfiles-log]
 
--detail <level>: Report Detail Level - High, Med, Low or any #.
--logfile <name>: *Name of a logfile definition to report on.
--logdir <name>: Name of default directory where logs are stored.
--service <name>: *Name of a service definition to report on.
--print: Display report to stdout.
--mailto <addr>: Mail report to <addr>.
--archives: Use archived log files too.
--save <filename>: Save to <filename>.
--range <range>: Date range: Yesterday, Today, All, Help
                             where help will describe additional options
--numeric: Display addresses numerically rather than symbolically and numerically
           (saves  a  nameserver address-to-name lookup).
--debug <level>: Debug Level - High, Med, Low or any #.
--splithosts: Create a report for each host in syslog.
--multiemail: Send each host report in a separate email.  Ignored if
              not using --splithosts.
--output <output type>: Report Format - mail, html or unformatted#.
--encode: Use base64 encoding on output mail.
--no-oldfiles-log: Suppress the logwatch log, which informs about the
                   old files in logwatch tmpdir.
--version: Displays current version.
--help: This message.
* = Switch can be specified multiple times...


標準出力に表示です。

$ sudo logwatch --print
$ sudo logwatch --print --service http
$ sudo logwatch --print --service http --service sshd

実行例。

$ sudo logwatch --print
 
 ################### Logwatch 7.3.6 (05/19/07) ####################
        Processing Initiated: Sun Apr  7 22:52:28 2013
        Date Range Processed: yesterday
                              ( 2013-Apr-06 )
                              Period is day.
      Detail Level of Output: 0
              Type of Output: unformatted
           Logfiles for Host: u0.local
  ##################################################################
 
 --------------------- Disk Space Begin ------------------------
 
 Filesystem            Size  Used Avail Use% Mounted on
 /dev/sda5             9.7G  7.1G  2.1G  78% /
 /dev/sda1             985M  150M  785M  17% /boot
 /dev/sda2             282G   65G  203G  25% /home
 /dev/mapper/jmicron_GRAIDp1
                       587G   92G  466G  17% /home/raid
 
 
 ---------------------- Disk Space End -------------------------
 
 
 ###################### Logwatch End #########################

関連項目