[opensuse] How can I setup live viewing of logs via a web browser?
Is there a way I can view my logs via a web browser in real time, or near real time? I know I can use apache ssi, but it didn't seem to parse the files correctly. Has anyone done this? What I am trying to accomplish is: Having a syslog server, and having people be able to get to their applications log files from a single web page (just links to their app, then their log file). Thanks -- I say never be complete. I say stop being perfect. I say let's evolve. Let the chips fall where they may. -Fight Club -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Ben Kevan wrote:
Is there a way I can view my logs via a web browser in real time, or near real time?
I know I can use apache ssi, but it didn't seem to parse the files correctly. Has anyone done this?
SSI only parses for SSI instructions, so assuming your logfiles don't contain, you won't get anything parsed. AFAICS, there's no need for SSI anyway - for viewing logfiles via apache, just make sure you send the correct header ("text/plain" presumably), then send the logfile. It's easily done with the "AddHeader" directive for instance. /Per -- Per Jessen, Zürich (0.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 14 Feb 2009 01:39:54 -0800, Per Jessen
Ben Kevan wrote:
Is there a way I can view my logs via a web browser in real time, or near real time?
I know I can use apache ssi, but it didn't seem to parse the files correctly. Has anyone done this?
SSI only parses for SSI instructions, so assuming your logfiles don't contain, you won't get anything parsed.
AFAICS, there's no need for SSI anyway - for viewing logfiles via apache, just make sure you send the correct header ("text/plain" presumably), then send the logfile. It's easily done with the "AddHeader" directive for instance.
/Per
Thank you Per, Do you know if there's any way I can format it with newest on top without changing the log file? (like sort the output via .conf file in apache) or am I just asking for too much now? text/plain worked just fine, and for a test I just symlink'ed /var/log/secure to the directory that was being displayed. Now to fix up my syslog a bit, to get the app logs I want to pass to this server, and really start restructuring how my syslogs are sent (i'm hoping in syslog.conf on the clients I can pass to the syslog server with the `hostname` within the .conf file and it'll pass it to the correct directory. Guess i'll have to give it a shot. My goal is to have: http://syslogserver/logs and within there --- servername/ ---- log1.log ---- log2.log So I don't have to give the QA people access to the boxes when all they want to do is see the logs. -- I say never be complete. I say stop being perfect. I say let's evolve. Let the chips fall where they may. -Fight Club -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 14 February 2009 20:08:45 Ben Kevan wrote:
Is there a way I can view my logs via a web browser in real time, or near real time?
Take a look at awstats: http://awstats.sourceforge.net/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Ben Kevan wrote:
Do you know if there's any way I can format it with newest on top without changing the log file? (like sort the output via .conf file in apache) or am I just asking for too much now? text/plain worked just fine, and for a test I just symlink'ed /var/log/secure to the directory that was being displayed.
Wild guess - I think you could probably set up a filter or a handler in apache to do the sort. /Per -- Per Jessen, Zürich (1.2°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Ben Kevan
-
Bogdan Cristea
-
Per Jessen