configuring phplogcon with wildcards?

You need additional help with phplogcon, then write into this forum.

configuring phplogcon with wildcards?

Postby whitroth » Wed Jan 07, 2009 10:13 pm

So, I've just installed 2.4.0 stable, and am trying to configure. However, I have a problem: we want to use this on a server that's accumulating remote logs. The logs will be in hostname directories, which can be created on the fly, and the logs will end with a datestamp. Is there any way to configure phplogcon to allow this, so that you can choose a hostname, then a dated log?
<br>
<br>
mark
whitroth
New
 
Posts: 1
Joined: Wed Jan 07, 2009 10:09 pm

phpLogCon professional services

  • Custom phpLogCon configuration?
  • Maintenance Contract?
  • Installation support?

Re: configuring phplogcon with wildcards?

Postby alorbach » Fri Jan 09, 2009 4:34 pm

Hi,

I am sorry, but currently it is not possible to monitor dynamic file names. But it is certainly on the LIST of possible future features.

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1129
Joined: Thu Feb 13, 2003 11:55 am

Re: configuring phplogcon with wildcards?

Postby DrSneeze » Thu Mar 05, 2009 7:36 pm

I was hoping for this feature as well! Of course, I'd love to see it in an upcoming version, but in the mean time do you think it would be reasonable to have a script that would recreate config.php once per day to add in new data sources?

Also, it seems that this would all be much easier if I were using a database to store my syslog data. I'm not doing this because I like the idea of having flat files that I can easily analyze using basic utilities (like grep). Does this point of view make sense or am I missing something? Would it make sense to mirror all syslog messages into a database and also store them in flat files?

Thanks!
- Ben
DrSneeze
New
 
Posts: 9
Joined: Sat Feb 28, 2009 7:54 pm

Re: configuring phplogcon with wildcards?

Postby rgerhards » Fri Mar 06, 2009 2:21 pm

Andre,

I think for the most common use cases this would actually be trivial. All that is needed is to support e.g. date-based replacement characters inside the file names. I think it would make sense if we could add this (knowing that it does not address all issues...).

What do you think?

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: configuring phplogcon with wildcards?

Postby rgerhards » Fri Mar 06, 2009 2:23 pm

DrSneeze wrote:Also, it seems that this would all be much easier if I were using a database to store my syslog data. I'm not doing this because I like the idea of having flat files that I can easily analyze using basic utilities (like grep). Does this point of view make sense or am I missing something? Would it make sense to mirror all syslog messages into a database and also store them in flat files?


Doing it in files and database is what a lot of people do. The question is how many messages do you have and if the database can keep up with the volume. If that is OK, the database offers quite more abilities and often better performance. File support is primarily there for review of live logs.

HTH
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: configuring phplogcon with wildcards?

Postby alorbach » Fri Mar 20, 2009 3:39 pm

To follow this topic, the next release from the beta branch will contain support for dynamic filenames. The following replacement characters will be able to be used:

Code: Select all
%y = Year with two digits (e.g. 2002 becomes "02")
%Y = Year with 4 digits
%m = with two digits (e.g. March becomes "03")
%M = Minute with two digits
%d = Day of month with two digits (e.g. March, 1st becomes "01")
%h = Hour as two digits
%S = Seconds as two digits. It is hardly believed that this ever be used in reality.   
%w = Weekday as one digit. 0 means Sunday, 1 Monday and so on.
%W =  Weekday as three-character string. Possible values are
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat".


We are going to release a new Version from the beta branch at the beginning of next week.

--
best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1129
Joined: Thu Feb 13, 2003 11:55 am

Re: configuring phplogcon with wildcards?

Postby alorbach » Thu Mar 26, 2009 11:03 am

Hi Ben,

I wanted to inform you that phpLogCon 2.7.0 has support for dynamic filenames now.
To download phpLogCon 2.7.0, see this link: http://www.phplogcon.org/downloads
For more about the available replacement characters, see this link: http://www.phplogcon.org/module-Static_ ... html.phtml

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1129
Joined: Thu Feb 13, 2003 11:55 am

Re: configuring phplogcon with wildcards?

Postby rgerhards » Thu Mar 26, 2009 11:32 am

Well done Andre :-D I think this is a very useful addition, which captures the spirit of rsyslog dynafiles and makes it easy to work with phpLogCon on the (typical) daily dynafile rollover scenario.

Rainer
User avatar
rgerhards
Site Admin
 
Posts: 2647
Joined: Thu Feb 13, 2003 11:57 am

Re: configuring phplogcon with wildcards?

Postby ckoehler » Tue Jun 02, 2009 5:01 pm

Hello,

Does this work in directories, too? I tried the following string and PHPLogCon can't read it. Permissions are 644/755 for now.

/var/log/hosts/svn/%Y/%m/%d/apache_access-%Y%m%d

Thanks for the help!

Christoph
ckoehler
Avarage
 
Posts: 10
Joined: Tue Jun 02, 2009 4:58 pm

Re: configuring phplogcon with wildcards?

Postby alorbach » Mon Jun 15, 2009 9:46 am

I think it should work. If you turn on "Show Debug messages" in Preferences, you will see how the filename looks like, that phpLogCon generates in debug output. This might help for further troubleshooting.

best regards,
Andre Lorbach
User avatar
alorbach
Site Admin
 
Posts: 1129
Joined: Thu Feb 13, 2003 11:55 am

Google Ads



Return to Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron