1753894 Members
7705 Online
108809 Solutions
New Discussion юеВ

Disable EMS upon reboot

 
SOLVED
Go to solution
jimmie_smith
Occasional Advisor

Disable EMS upon reboot

Is there any way to disable the EMS email notification(other than disabling mail) that occurs when a system is rebooting. If you turn it off before you reboot via the "K" option in monconfig it seems to restart regardless upon system boot. I've looked through these forums and have found this question asked in 2002, but I was wondering if this functionality has been added since then. Couple of notes here...

-EMS is configured for (A)ll monitors and sends email to our group alias
-Along with that other monitors for filesystems , nics, etc..etc..were added using emscli -a


6 REPLIES 6
Sundar_7
Honored Contributor
Solution

Re: Disable EMS upon reboot

I believe setting EMS_ENABLED=0 in /etc/rc.config.d/ems wil disable EMS from starting at boot time.

Learn What to do ,How to do and more importantly When to do ?
Ivan Krastev
Honored Contributor

Re: Disable EMS upon reboot

According to Doc ID S3100002997 Title: EMS: disabling monitor restart messages:

"No, you cannot disable the restart messages without disabling the other
messages."


regards,
ivan

jimmie_smith
Occasional Advisor

Re: Disable EMS upon reboot

I disabled EMS and that seemed to work as far as EMS not starting up. The issue is the messages are coming from the monitors(if that is in fact the proper term) that i added with the emscli command. For example, to monitor / we used..

emscli -a /system/filesystem/availMb/root -n 1 -r le 2000 -o ini -p 300 -u sec -t email emailgroup@domain.org

I'm assuming there is not much I can do about these. Thx guys for all your help
Sundar_7
Honored Contributor

Re: Disable EMS upon reboot

Hi Jimmie,

I believe emccli configures "persistent" EMS monitoring requests and thus may still be running irrespective of whether EMS is running or not (just my guess !)

But you could use the -d option with emscli to disable the persistent monitoring as well.

Sundar.
Learn What to do ,How to do and more importantly When to do ?
Andrew Merritt_2
Honored Contributor

Re: Disable EMS upon reboot

Hi Jimmie,

Can you clarify exactly what the email messages you are getting are? What do they say?

Do you get them when EMS is started, after having it disabled for the boot?

What versions of HP-UX, EMS, OnlineDiags and HA monitors (if installed) do you have?

Andrew
jimmie_smith
Occasional Advisor

Re: Disable EMS upon reboot

First of all..thx to all that have responded. It is really appreciated.

As for versions..were using hpux 11i(release = B.11.23) EMS-CORE,r=A.04.20 with the latest patch depot scanned for the system. After reading below I'm not sure it will make a difference on the versions of EMS..please let me know if I need to expand on that if it actually would be helpful or not in my particular situation.

Here is a sample of one of the notifications I receive in email...

>------------ Event Monitoring Service Event Notification ------------<

Notification Time: Mon Apr 9 14:26:04 2007

HOSTNAME sent Event Monitor notification information:

/net/interfaces/lan/status/lan20 will meet notification criteria when it is != 1.
Its initial value is UP(1).



>---------- End Event Monitoring Service Event Notification ----------<


Now, we are using apa with lanmon on 4 quadcards. I have about 12 interfaces im individualy monitoring as well as the aggregated group and the failover group..so for example our typical setup is

root@hostname#lanscan -q
0
2
etc..etc..
902 900(0 4 16 20) 901(8 12 24 28)
903 1 13 17 29


and was created using this command
emscli -a /net/interfaces/lan/status/lan0 -n 1 -r ne UP -o ini -p 300 -u sec -t email admin@domain.org

A typical output of emscli -l for one of our superdomes

root@hostname# emscli -l
Req ID Resource Value
152633350 /system/kernel_parameters/history 0.000000
620167418 /system/filesystem/availMb/root 36461.500000
620167428 /system/filesystem/availMb/stand 776.100000
620167438 /system/filesystem/availMb/var 11534.400000
620167448 /system/filesystem/availMb/opt 34281.200000
620167458 /system/filesystem/availMb/export_home 9422.800000
620167468 /system/filesystem/availMb/tmp 9905.400000
622461209 /storage/status/disks/default/4_0_8_1_0.0.0UP (0)
622461214 /storage/status/disks/default/4_0_8_1_0.2.0UP (0)
622461219 /storage/status/disks/default/6_0_8_1_0.0.0UP (0)
622461224 /storage/status/disks/default/6_0_8_1_0.2.0UP (0)
622461233 /adapters/status/ql_adapter/4_0_6_1_0 UP (0)
622461242 /adapters/status/ql_adapter/4_0_6_1_1 UP (0)
622461251 /adapters/status/ql_adapter/4_0_14_1_0 UP (0)
622461260 /adapters/status/ql_adapter/4_0_14_1_1 UP (0)
622461269 /adapters/status/ql_adapter/6_0_6_1_0 UP (0)
622461278 /adapters/status/ql_adapter/6_0_6_1_1 UP (0)
622461287 /adapters/status/ql_adapter/6_0_14_1_0 UP (0)
622461296 /adapters/status/ql_adapter/6_0_14_1_1 UP (0)
629347603 /net/interfaces/lan/status/lan0 UP (1)
629347686 /net/interfaces/lan/status/lan1 UP (1)
629347769 /net/interfaces/lan/status/lan4 UP (1)
629347852 /net/interfaces/lan/status/lan16 UP (1)
629347935 /net/interfaces/lan/status/lan20 UP (1)
629348018 /net/interfaces/lan/status/lan8 UP (1)
629348101 /net/interfaces/lan/status/lan12 UP (1)
629348184 /net/interfaces/lan/status/lan24 UP (1)
629348267 /net/interfaces/lan/status/lan28 UP (1)
629348350 /net/interfaces/lan/status/lan13 UP (1)
629348433 /net/interfaces/lan/status/lan17 UP (1)
629348516 /net/interfaces/lan/status/lan29 UP (1)
629348599 /net/interfaces/lan/status/lan900 UP (1)
629348682 /net/interfaces/lan/status/lan901 UP (1)
629348765 /net/interfaces/lan/status/lan902 UP (1)
629348848 /net/interfaces/lan/status/lan903 UP (1)

----------------------

These monitor our fc ports, local disks along with filesystem utilization and all the network interfaces. The rest of the EMS I setup using monconfig configuring with the default options which if memory serves me correctly defaults to (A)ll and <=major or something similar.

One thing I noticed is I still get emailed for these monitors(if thats even the proper term for these) even if EMS was disabled on boot. I went ahead and re-enabled EMS on boot since it didnt make a difference. However I created a "workaround" to this already, but not really the solution I'm hoping to use forever. I have a disable script which really just runs an emscli cmd that awks out and loops through creating scripts for each individual monitor and putting them in one big script so they can be recreated with the "enable" script. It's very crude at this point, here's the just of it..

for i in `emscli -l | tail +3 | awk '{print $1}'`;
do emscli -g $i -f /tmp/ems.out2;
cat /tmp/ems.out2 >>/var/tmp/ems.OFF;
emscli -d $i -f;

It's still a manual process at this time since the monitors do not come up as quick as ssh does. Better logic in the script could easily fix that.

As you can probably tell I am new to this ems stuff so at this point my only question is ...Is this implemented correctly? It seems there are two parts to this.. one being handled with monconfig and just monitors everything(or what precanned monitors you specify), but if you need to get other info you use the emscli or ems gui ran from the systems mgmt homepage(or purchase hpov). Is this a correct assumption? I haven't seen what anyone else is doing so am I going about this completely wrong? I don't feel that way since I'm receiving the notifications I'm after..just not any clear way to globaly control them. If one of the options were to run a script/cmd rather than just what type of notification method then it would be a lot easier for me to control I think. When I run my re-enable script, I'm actually creating new instances and again get notified for each one. My solution to that is rename sendmail.cf at the beginning and end..heh. I just assumed I'm missing the big picture here since I'm not experienced with this. Thx again guys..