LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-22-2013, 03:54 AM   #1
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Rsyslog server not sending email alerts


Greeting all,

I have configured rsyslog on CentOS 6 with a client on Windows server 2008.
Server is collecting the log files fine without issues. LogAnalyzer shows proper data. But it is not sending the email alerts. Seems there is some issue with "if" loop used in the configuration.
Here is the config:

Code:
$ModLoad ommail
$ActionMailSMTPServer mx1.<org>.com
$ActionMailFrom rsyslog@<org>.com
$ActionMailTo <me>@<org>.com
$template mailSubject,"Rsyslog alert for %hostname%"
$template mailBody,"Rsyslog alert for %hostname%\r\nmsge='%msg%'"
$ActionMailSubject mailSubject
$ActionExecOnlyOnceEveryInterval 30
if $syslogseverity-text == 'INFO' then :ommail:;mailBody
But I do not receive any alerts even though there are logs with severity INFO.

Any help would be appreciated.

Last edited by linuxlover.chaitanya; 02-22-2013 at 03:55 AM. Reason: removed email address
 
Old 02-22-2013, 08:26 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by linuxlover.chaitanya View Post
Seems there is some issue with "if" loop used in the configuration.
How did you come to that conclusion? I suggest you 0) check syslog for clues (usually around the time it gets started or restarted), 1) run a check (see 'man rsyslog.conf' for "-d" and "-N"), 2) attach debug output as plain text file if necessary and 3) post your complete /etc/rsyslog.conf and /etc/rsyslog.d/ contents instead of just a snippet.
 
Old 02-24-2013, 12:44 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Original Poster
Rep: Reputation: Disabled
Well, I might surely be incorrect but I am thinking that "if" loop is not working because I get the email alerts if I change the configuration to send alerts for everything.

Like
Code:
*.* :ommail:;mailBody
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nagios not sending alerts through email lemay_jeff Linux - Networking 3 09-25-2021 12:04 AM
Problem sending email through new email server bigben747 Linux - Server 3 01-26-2009 05:16 PM
Sending email with a Linux Server bwtoh Linux - Software 3 09-14-2004 02:36 AM
Setting email Alerts for mail server topcat Linux - Networking 4 06-18-2004 05:52 AM
Sending email from a server fuelinjection Linux - General 4 12-29-2003 12:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration