FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-11-2008, 04:11 AM
Ow Mun Heng
 
Default mdmonitor not triggering program on fail events

Hi,

Can anyone help me with this since I want to get it done "the correct
way"

I'm trying to make mdmonitor to execute a program when it detects a fail
event automatically.

Currently, from what I see, init is calling mdmonitor with these options

mdadm --monitor --scan -f

(note that the --program is not there)

and this is in my /etc/mdadm.conf

MAILADDR root
PROGRAM /root/program_2_run.sh

short of hacking the mdmonitor script to hardcode the program there, is
there an alternate, more elegant way?

Thanks.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 01:25 AM
Ow Mun Heng
 
Default mdmonitor not triggering program on fail events

No One has any clues??

On Wed, 2008-06-11 at 12:11 +0800, Ow Mun Heng wrote:
> Hi,
>
> Can anyone help me with this since I want to get it done "the correct
> way"
>
> I'm trying to make mdmonitor to execute a program when it detects a fail
> event automatically.
>
> Currently, from what I see, init is calling mdmonitor with these options
>
> mdadm --monitor --scan -f
>
> (note that the --program is not there)
>
> and this is in my /etc/mdadm.conf
>
> MAILADDR root
> PROGRAM /root/program_2_run.sh
>
> short of hacking the mdmonitor script to hardcode the program there, is
> there an alternate, more elegant way?
>
> Thanks.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 08:11 AM
Ralph Angenendt
 
Default mdmonitor not triggering program on fail events

Ow Mun Heng wrote:
> Currently, from what I see, init is calling mdmonitor with these options
>
> mdadm --monitor --scan -f
>
> (note that the --program is not there)
>
> and this is in my /etc/mdadm.conf
>
> MAILADDR root
> PROGRAM /root/program_2_run.sh
>
> short of hacking the mdmonitor script to hardcode the program there, is
> there an alternate, more elegant way?

What's not elegant about that? Sure, an /etc/sysconfig/mdmonitor would
probably have been better, but it scans the config file for MAIL and
PROGRAM being in it and would stop otherwise.

Ralph
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 08:29 AM
Ow Mun Heng
 
Default mdmonitor not triggering program on fail events

On Thu, 2008-06-12 at 10:11 +0200, Ralph Angenendt wrote:
> Ow Mun Heng wrote:
> > Currently, from what I see, init is calling mdmonitor with these options
> >
> > mdadm --monitor --scan -f
> >
> > (note that the --program is not there)
> >
> > and this is in my /etc/mdadm.conf
> >
> > MAILADDR root
> > PROGRAM /root/program_2_run.sh
> >
> > short of hacking the mdmonitor script to hardcode the program there, is
> > there an alternate, more elegant way?
>
> What's not elegant about that? Sure, an /etc/sysconfig/mdmonitor would
> probably have been better, but it scans the config file for MAIL and
> PROGRAM being in it and would stop otherwise.

Yeah, it scans for either mail OR program being in there but for some
obscure reason, (or perhaps I just don't get how it works) the PROGRAM
to be ran isn't being called out by the mdmonitor init script and I'm
not sure why.

The only thing which I can see is that the option --program is not
mentioned

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 05:19 PM
Scott Silva
 
Default mdmonitor not triggering program on fail events

on 6-12-2008 1:29 AM Ow Mun Heng spake the following:

On Thu, 2008-06-12 at 10:11 +0200, Ralph Angenendt wrote:

Ow Mun Heng wrote:

Currently, from what I see, init is calling mdmonitor with these options

mdadm --monitor --scan -f

(note that the --program is not there)

and this is in my /etc/mdadm.conf

MAILADDR root
PROGRAM /root/program_2_run.sh

short of hacking the mdmonitor script to hardcode the program there, is
there an alternate, more elegant way?

What's not elegant about that? Sure, an /etc/sysconfig/mdmonitor would
probably have been better, but it scans the config file for MAIL and
PROGRAM being in it and would stop otherwise.


Yeah, it scans for either mail OR program being in there but for some
obscure reason, (or perhaps I just don't get how it works) the PROGRAM
to be ran isn't being called out by the mdmonitor init script and I'm
not sure why.

The only thing which I can see is that the option --program is not
mentioned

I don't see an option "--program" mentioned in the man page either.
Is that a valid option?


--
MailScanner is like deodorant...
You hope everybody uses it, and
you notice quickly if they don't!!!!

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 06:15 PM
Ralph Angenendt
 
Default mdmonitor not triggering program on fail events

Scott Silva wrote:
> I don't see an option "--program" mentioned in the man page either.
> Is that a valid option?

-p, --program, --alert
Give a program to be run whenever an event is detected.

So yes, it is valid

Cheers,

Ralph
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 06-12-2008, 07:36 PM
"Michael Peterson"
 
Default mdmonitor not triggering program on fail events

What version of CentOS are you running?
Are you looking at root emails or having them forwarded to your local or
system account?

I have CentOS 5.1 running with Software RAID in place and I have a hard
drive failing.
I received an email first from SMART and then from MDADM that the drive was
going bad.
These occurred automatically.

I have root emails forwarded to my local account on the system and then I
check the email through pop via dovecot to get them.


-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Ow Mun Heng
Sent: Wednesday, June 11, 2008 8:26 PM
To: CentOS mailing list
Subject: Re: [CentOS] mdmonitor not triggering program on fail events

No One has any clues??

On Wed, 2008-06-11 at 12:11 +0800, Ow Mun Heng wrote:
> Hi,
>
> Can anyone help me with this since I want to get it done "the correct
> way"
>
> I'm trying to make mdmonitor to execute a program when it detects a fail
> event automatically.
>
> Currently, from what I see, init is calling mdmonitor with these options
>
> mdadm --monitor --scan -f
>
> (note that the --program is not there)
>
> and this is in my /etc/mdadm.conf
>
> MAILADDR root
> PROGRAM /root/program_2_run.sh
>
> short of hacking the mdmonitor script to hardcode the program there, is
> there an alternate, more elegant way?
>
> Thanks.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.3.0/1499 - Release Date: 6/12/2008
7:13 AM

No virus found in this outgoing message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 270.3.0/1499 - Release Date: 6/12/2008
7:13 AM

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 07:58 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org