################################################################################ $Id: php.conf,v 1.1 2006/11/12 18:28:31 bjorn Exp $################################################################################ $Log: php.conf,v $# Revision 1.1 2006/11/12 18:28:31 bjorn# New php service, by Jeremias Reith.################################################################################## You can put comments anywhere you want to. They are effective for the# rest of the line.
# this is in the format of <name> = <value>. Whitespace at the beginning# and end of the lines is removed. Whitespace before and after the = sign# is removed. Everything is case *insensitive*.
# Yes = True = On = 1# No = False = Off = 0
# **** LogWatchのレポートに出力されるタイトル名を変更します。Title= php-messages
# **** LogWatchで参照するログファイルの設定ファイル名を変更します。# Which logfile group...#LogFile = phpLogFile= php-fpm
# PHP notices should be fixedDetail= High
# vi: shiftwidth=3 tabstop=3 et
################################################################################ $Id: php.conf,v 1.1 2006/11/12 18:28:31 bjorn Exp $################################################################################ $Log: php.conf,v $# Revision 1.1 2006/11/12 18:28:31 bjorn# New php service, by Jeremias Reith.################################################################################# This was written and is maintained by:# Jeremias Reith <jr@terragate.net>## Please send all comments, suggestions, bug reports,# etc, to jr@terragate.net and logwatch-devel@logatch.org################################################################################
# What actual file? Defaults to LogPath if not absolute path....# **** LogWatchでログファイルを探すファイル名(ワイルドカード使用可)を変更します。#LogFile = httpd/php_logLogFile= /var/log/php-fpm/www.log
# adjust your php.ini accordingly:# error_log = /var/log/httpd/php_log# log_errors = On
# If the archives are searched, here is one or more line# (optionally containing wildcards) that tell where they are...#If you use a "-" in naming add that as well -mgt# **** LogWatchでアーカイブログファイルを探すファイル名(ワイルドカード使用可)を変更します。#Archive = httpd/php_log.*Archive= /var/log/php-fpm/www.log.*.gz
# vi: shiftwidth=3 tabstop=3 et
#!/usr/bin/perl################################################################################ $Id: php,v 1.2 2008/03/24 23:31:26 kirk Exp $################################################################################ $Log: php,v $# Revision 1.2 2008/03/24 23:31:26 kirk# added copyright/license notice to each script## Revision 1.1 2006/11/12 18:28:31 bjorn# New php service, by Jeremias Reith.################################################################################## Logwatch service for php error logs## Processes all messages and summarizes them# Each message is given with a timestamp and RMS
## Covered under the included MIT/X-Consortium License:## this script are assumed to have been donated to the## Logwatch project and thus assume the above copyright## and licensing terms. If you want to make contributions## under your own copyright or a different license this## must be explicitly stated in the contribution an the## Logwatch project reserves the right to not accept such## contributions. If you have made significant## contributions to this script and want to claim## copyright please contact logwatch-devel@logwatch.org.#########################################################
use strict;
use Logwatch ':dates';
use Time::Local;
use POSIX qw(strftime);
my $date_format =# ここの日付フィルターに+タイムゾーンの文字列分を加えるように変更する# my $filter = TimeFilter($date_format);
my $filter = TimeFilter($date_format).'\s+[^]]*';
my $detail = exists $ENV{'LOGWATCH_DETAIL_LEVEL'} ? $ENV{'LOGWATCH_DETAIL_LEVEL'} : 0;
...
$logwatch--servicephp-fpm--rangetoday
################### Logwatch 7.3.6 (05/19/07) ####################
Processing Initiated: Mon Nov 19 11:43:19 2012
Date Range Processed: today
( 2012-Nov-19 )
Period is day.
Detail Level of Output: 0
Type of Output/Format: stdout / text
Logfiles for Host: db
##################################################################
--------------------- php-messages Begin (detail=10) ------------------------
Fatal errors:
3 times:
[19-Nov-2012 04:25:36 +/-6 hour(s)] Call to undefined function aaa() in /var/www/html/root/test.php on line 3
---------------------- php-messages End -------------------------
###################### Logwatch End #########################
2014年10月28日, 11:53 PM
Hi ,
I have tried your article, but still log watch is not able to read php-fpm logs
Please suggest here
Thanks
Sushil
2014年11月19日, 4:25 PM
Hi, Sushil
This is Kon, I managed this site.
What is your question?
If you tell me more detail informations, I might be able to help you.