Anyone know a hack to...

jsteel

Well-Known Member
Jul 4, 2002
646
0
166
Atlanta, GA
...configure WHM to only send certain 'email alerts' to my pager? I'd like to get the service monitor, statscheck and maxclientscheck alerts, but I really don't need the newmailcgi and kernelcheck alerts waking me up in the middle of the night. Getting those last two in email to review the next day is plenty sufficient.

Jaz
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
For kernel alerts - modify /scripts/kernelcheck and change,

if (/^CONTACT[E|P]+\S+ (.*)/) {

to

if (/^CONTACT[E]+\S+ (.*)/) {

E=Email
P=Pager

chattr +i kernelcheck so it doesn't get changed.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,531
10
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
It may not be easy, as most of the scripts that send to mail or pagers and such all use a common contact file iContact.pm Changing that file would affect too many other things.
 

mweb

Member
Mar 11, 2003
23
0
151
Ugh. I've had it with newmailcgi, too. Commented out /usr/local/cpanel/bin/scanfornewmail from /scripts/upcp.

Maybe I'll run it manually if I really want to know this...