rsyslog with php

General discussions here

Moderator: rgerhards

rsyslog with php

Postby delphi329 on Fri Jan 04, 2008 2:26 am

Hi:

Got a newbie question. How to use rsyslog in php? Do I use the same openlog(), syslog() calls?

thanks,

-john
delphi329
New
 
Posts: 6
Joined: Fri Jan 04, 2008 2:24 am

Professional Services Information

  • Custom written rsyslog.conf?
  • Maintenance Contract?
  • Installation support?

RE: rsyslog with php

Postby rgerhards on Fri Jan 04, 2008 2:14 pm

Hi John,

yes, that's exactly the same. rsyslog changes the server side, but everything on the clients remains as is.

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

Postby delphi329 on Fri Jan 04, 2008 7:29 pm

Hi Rainer:

Thanks and great work. I am using rsyslog as a relay system for a reader/writer solution, i.e. rsyslog consolidate records from various places into one queue on one host and have another daemon process consuming the incoming records. To synchronize the two processes, I am thinking of using flock the log file. Will that work?

btw: have you thought about using rsyslog in a guaranteed delivery, relay system? It is a critical piece in almost all distributed systems. rsyslog only needs to add a guaranteed delivery part which is easy to do. This kind of relaying system is behind almost all Yahoo and Google apps and I have yet found a good open source solution.

-john
delphi329
New
 
Posts: 6
Joined: Fri Jan 04, 2008 2:24 am

Postby rgerhards on Fri Jan 04, 2008 10:44 pm

delphi329 wrote:Thanks and great work. I am using rsyslog as a relay system for a reader/writer solution, i.e. rsyslog consolidate records from various places into one queue on one host and have another daemon process consuming the incoming records. To synchronize the two processes, I am thinking of using flock the log file. Will that work?


I am not sure - I strongly recommend to do some testing.

What input interface does the other daemon have? Or are you writing it? In this case, keep in mind that rsyslog has a plugin architecture, so you could simply extend it...

delphi329 wrote:btw: have you thought about using rsyslog in a guaranteed delivery, relay system? It is a critical piece in almost all distributed systems. rsyslog only needs to add a guaranteed delivery part which is easy to do. This kind of relaying system is behind almost all Yahoo and Google apps and I have yet found a good open source solution.


With RFC 3195, it is theoretically possible today. And tcp based syslog offers 99% of this already, right now. As far as the networking part is concerned, we are still a bit away from a 100% reliability point (but, as always, you can write plugins to do it now).

What I am currently working on is a reliable queue. If the output is not available, messages will be queued on-disk until the output is online again. Then, the messages will be transmitted. I hope to finish that in January - so far, it looks quite good for that schedule.

Feedback is appreciated.

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

Postby delphi329 on Fri Jan 04, 2008 11:41 pm

What input interface does the other daemon have? Or are you writing it? In this case, keep in mind that rsyslog has a plugin architecture, so you could simply extend it...

<<<<< I just downloaded version 2.0.0 and will take a look at the plugin architecture. Is there any doc on it?

What I am currently working on is a reliable queue. If the output is not available, messages will be queued on-disk until the output is online again. Then, the messages will be transmitted. I hope to finish that in January - so far, it looks quite good for that schedule.

<<<<< this is exactly what Yahoo and Google did. It is not that difficult to implement. All one need is a reliable queue and keep track of writer and reader pointers. You should also design for many to many topology. All it takes is to have multiple pointers for all targets. A simple file, offset file pointer will suffice. This kind of many to many relay system is incredibly useful with many applications beyond logging. Let me know I can help you on the project.
delphi329
New
 
Posts: 6
Joined: Fri Jan 04, 2008 2:24 am

Google Ads



Return to General

Who is online

Users browsing this forum: No registered users and 0 guests

cron