OAProfessor

Deep OA Product Insight

User Tools

Site Tools


sendmeanemail

Simple notification from OA

When a manager gets into some infinite loop or crashes for some reason, the PMON setting for the manager start mode = “always” will restart the manager after the Seconds to Kill has yielded no comms with the Event Manager.

Most managers in OA are very well behaved and this is very uncommon. If you have exposed a webclient_http.ctl manager to the internet, this may not be as stable as you think as various bad actors try to exploit your web server with a myriad of attacks.

The webclient_http.ctl is restarted and the functionality is automatically resumed. It would be nice if you were alerted when this uncommon situation occurred.

Look in the help→Project administration→Process monitor→Monitoring of managers. There is a discussion of a feature that is quite obscure. There is a file in the /OAinstallFolder/bin/crashAction.cmd… actually you will find crashAction_sample.cmd. This file is an example of a batch/command file that is executed if/when the PMON has to restart a manager or other major issue has occurred!

The sample file is not very interesting as the netSend command does not work on Windows any more, etc. But, if you think about it for just a little longer, you might think of another way this file might be used.

Rename the crashAction_sample.cmd to crashAction.cmd. Edit this file and change the net send… to:

cmd /c sendEmail -o tls=no -f youremail@wherever.com -t 1234567890@vtext.com -s smtp.youremailserver.net:25 -xu youremail@wherever.com -xp yourpassword -u "PMON Restart" -m "%1 %2 %3 %4 %5"

The sendEmail.exe comes with WinCC OA, and you can learn how to use it by typing sendEmail /? (also Google this as “sendEmail zehm” to learn all sorts of details and examples)

Yes, this will text your phone on Verizon that something happened. Then you can check in on the system and get the details from the log viewer. The setup of the email syntax is a bit tricky for each type of email server and phone provider, be sure to test each part of the link and run the command to test all the way from the server to your phone.

You can text or email from a batch file executed from a .ctl manager using the system() call. There is a cheap way to notify you about stuff and all the pieces are already in Open Architecture.

sendmeanemail.txt · Last modified: 2019/11/26 02:14 by toddmalone

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki