Sending an email notification when syslog goes down


 
Thread Tools Search this Thread
Operating Systems AIX Sending an email notification when syslog goes down
# 1  
Old 11-17-2011
Sending an email notification when syslog goes down


Hi

All of a sudden the syslog daemon in the server went down and then later I started it manually
Code:
# ps -ef | grep syslogd
root 217228 114906 0 Nov 16 - 0:00 /usr/sbin/syslogd
root 430306 290870 0 14:18:11 pts/0 0:00 grep syslogd

Can some one help me with a script which will monitor the syslog continuously and will email me automatically if in case it goes down by any chance
# 2  
Old 11-17-2011
assuming you configured your system to send mails from command line:

Code:
ps -ef | grep "[/]usr/sbin/syslogd" >/dev/null 2>&1 || echo "syslog down on host $(hostname)" | mail -s "syslog down" youremail@domain

This User Gave Thanks to funksen For This Post:
# 3  
Old 11-17-2011
two ways all i know
run a cron job every minute or run a script which sleeps for time interval you want to check the syslog service
in script you can check the status of syslog service if the status is running every thing is fine else make it send an alert (email)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Email notification error on Solaris

Hi, I am getting error below when testing email. is there a way I can configure email on Solaris? SunOS -s 5.10 Generic_147440-04 sun4u sparc SUNW,SPARC-Enterprise echo "hello" | sendmail -v abcd WARNING: local host name (-s) is not qualified; see cf/README: WHO AM I? abcd... Connecting... (1 Reply)
Discussion started by: roshanbi
1 Replies

2. Shell Programming and Scripting

Email Notification

Hi All, I need write a linux script which emails each record to the employee manager email-id which will be specified inside the file. Each employee can have a different manager too.. file contain 200 to 300 records Employee ID, Employee Name, Employee Email-ID, Manager, Manager... (4 Replies)
Discussion started by: tradingspecial
4 Replies

3. Shell Programming and Scripting

Script for sending notification mail

hi all, needed a script to send a notfication mail if the specified folder had the copy of the files that are older than 15 days i.ee for example my folder name is SAi and the files are as follows sai.txt copyofsai.txt copyofcopyofsai.txt hemanth.txt copyofcopyofhemanth.txt... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies

4. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

5. UNIX for Dummies Questions & Answers

Understanding Email notification script

Hello All, 1) I am trying to understand the shell script written already, below is the code in this code i am seeing a variable $EMAIL_ID which was not defined in entire script, neither it is passed as a parameter while executing shell script nor it is defined in .profile, could you please tell... (1 Reply)
Discussion started by: Ariean
1 Replies

6. UNIX and Linux Applications

Sending email via syslog-ng

Hi friends I have syslog-ng installed in RHEL5 server, I make it as CEntral log for all servers in my network, Filtered by IP Now What I want to do is make it send to me an email for a specific log for one of my server, In other word when any log sent from this IP (192.168.1.1 ) For... (4 Replies)
Discussion started by: reaky
4 Replies

7. Shell Programming and Scripting

Crontab change and email notification

Hey guys Just need some help with crontab.Iam looking for a script that will alert particular user about its change through sendmail.We are using bash here. --CoolKid (3 Replies)
Discussion started by: coolkid
3 Replies

8. UNIX for Dummies Questions & Answers

How to add email notification in scripts?

Hi. I want to add email notification so when the my script finishes it sends out an email of the results to our team. If there are errors the subject on the email should say there were errors. If any having idea/sample scripts pls share with me. (2 Replies)
Discussion started by: redlotus72
2 Replies

9. UNIX for Dummies Questions & Answers

nagios not sending hosts notification

I configured nagios version 1.0b on solaris 9 and it working fine, but when hosts goes down or unreachable I do not get hosts notification. I get service notification when servive is critical, unrechable and recovered but not an hosts notification. here is my contact.cfg define contact{... (1 Reply)
Discussion started by: hassan2
1 Replies

10. Post Here to Contact Site Administrators and Moderators

Why am I not recieving email notification?

I have been a member for almost a year now. I have always recieved email notifications when I select "subcribe to this thread" at the bottom of posts that I reply to. However, over the last month or so, I have not been recieving email notification of replys to posts I respond to. I have... (6 Replies)
Discussion started by: Kelam_Magnus
6 Replies
Login or Register to Ask a Question