nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

How to monitor logs

This is a discussion on How to monitor logs within the Linux software forums, part of the Linux Getting Started category; Hi, I'm looking for a way to monitor my system log for specific events, and have an email sent to ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-20-2009, 06:14 PM
Junior Member
User
 
Join Date: Nov 2008
OS: Redhat Enterprise 5, Centos 5
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jgijanto is on a distinguished road
Default How to monitor logs

Hi,

I'm looking for a way to monitor my system log for specific events, and have an email sent to an account I specify when these events occur. I've looked into Logwatch and it doesn't appear to satisfy my requirements - I'm looking for an active monitor which can trigger an arbitrary event. Any suggestions?

-Joe
Reply With Quote
  #2 (permalink)  
Old 03-20-2009, 07:09 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,674
Thanks: 11
Thanked 240 Times in 180 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Logwatch needs lots of configuration and it will send a summery of all logs. If you need event specific email write your own script. For example, script to monitor disk space and send email alert when you are low on disk.
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 03-20-2009, 07:39 PM
Junior Member
User
 
Join Date: Nov 2008
OS: Redhat Enterprise 5, Centos 5
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
jgijanto is on a distinguished road
Default

How would I go about doing this though - would I need to write a daemon using perl/python that would run in the background?
Reply With Quote
  #4 (permalink)  
Old 03-20-2009, 08:15 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,674
Thanks: 11
Thanked 240 Times in 180 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

No need to write daemon. Just write a script and check it via cronjob. Another option is use tool such as monit to monitor apache, mysql, process, disk space and other stuff.
  1. Monitor and restart Apache or lighttpd webserver when daemon is killed
  2. UNIX / Linux Shell Script For Monitoring System network with ping command
  3. Perl script to monitor disk space and send an email
  4. Linux: Monitor hard disks temperature with hddtemp
Hope above examples gives you required ideas.

HTH
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply

Tags
cronjobs , crontab , disk monitoring , email alerts , linux , logs


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
SSH output - also question about linux logs bigcat1009 Ubuntu / Debian 1 05-12-2009 11:41 AM
Allow non-root to view system logs? Dino Networking, Firewalls and Security 4 11-21-2008 02:57 AM
Proxy server logs upanwar Proxy Servers 2 09-28-2008 10:17 AM
How to monitor RSH commands mformit Solaris/OpenSolaris 0 04-11-2008 09:44 PM
CVS logs how to rajuk Linux software 1 12-14-2006 04:44 PM


All times are GMT +5.5. The time now is 01:42 AM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38