Help me in implementing email alert

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 6:38 am

Hai,
I am not able to implement email alerts in rsyslog. I have changed my configuration file as shown below
$ModLoad ommail
$ActionMailSMTPServer mailserver's address
$ActionMailFrom root@localhost.com
$ActionMailTo prakash.akumalla@xxxx.com
$template mailSubject,"disk problem on %hostname%"
$template mailBody,"RSYSLOG Alert\r\nmsg='%msg%'"
$ActionMailSubject mailSubject

$ActionExecOnlyOnceEveryInterval 60
*.* :ommail:;mailBody

Should i change or add any thing else.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Professional Services Information

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

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 11:59 am

I just used this config and it works for me. What is your actual issue? Do you never receive a message? Or only one?
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 12:22 pm

Hai,
Thanks for your reply. I too used the same config file and did not receive even one mail from two days. I used the same what i have written earlier. please check once.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 12:24 pm

Hai,
Thanks for your reply. I too used the same config file and did not receive even one mail from two days. I used the same what i have written earlier. please check once.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 12:55 pm

please use a *.* mail rule and check if a message goes through. Let me know the result. If no message goes through, I need a debug log.
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 12:59 pm

lol, wrong case ;) You already use a *.* rule. So what I need now is a *complete* debug log (run rsyslogd interactively with -dn) of a rsyslog startup. If that's too much to post, you can mail me privately at rgerhards-at-gmail.com.
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 1:34 pm

Hai,
I used *.* just to check whether the changes in the config file are working or not. I found that its not working. I have send a mail to your private gmail about the problem completly.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 1:36 pm

Hi, you seem to have forgotten the debug log in the google mail. I need this, otherwise I can not help ;)
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 1:52 pm

Hi,

I have sent it to your gmail.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 1:56 pm

I think we are misunderstanding each other ;)

What I need is a *debug log* not a config file. You obtain this by running rsyslogd interactively and adding -dn to your normal actions. eg. like this

$ rsyslogd -dn > debuglog

(press ctrl-C after a short while of running).

The config file does not show me the source of the problem (at least this is my current school of thinking, to be refined after getting the debug file. Note that debug files can get quite large, what is OK with me.

I hope this clarifies.

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

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 2:06 pm

Hi,

I got it. I have send it now to ur gmail.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 2:18 pm

Exellent. The relevant line is this here:

logmsg: flags 5, from 'server', msg could not load module '/usr/local/lib/rsyslog/ommail.so', dlopen: /usr/local/lib/rsyslog/ommail.so: cannot open shared object file: No such file or directory

This message should also exist in /var/log/messages.

In essence, it says that you do not have the ommail plugin installed. If you build rsyslogd from a source tarball, you need to add --enable-mail to the ./configure options. If you installed it from a package, you need to find out which package provides the mail functionality.
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby prakash.akumalla on Mon Jun 30, 2008 3:02 pm

Hi,
Sorry to say you that I have enabled mail and even then I did not get any mail to the given address
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Re: Help me in implementing email alert

Postby rgerhards on Mon Jun 30, 2008 8:09 pm

Please send me a new debug log.
User avatar
rgerhards
Site Admin
 
Posts: 1780
Joined: Thu Feb 13, 2003 11:57 am

Re: Help me in implementing email alert

Postby prakash.akumalla on Tue Jul 01, 2008 6:22 am

Hai,
I have send it to your gmail.
prakash.akumalla
Frequent Poster
 
Posts: 101
Joined: Thu Jun 26, 2008 2:37 pm

Google Ads


Next

Return to Configuration

Who is online

Users browsing this forum: No registered users and 1 guest

cron