Stopping ProTop for Maintenance like Database Changes, Application Deployments, Server OS Updates, etc (maintenance.sh/bat)
I have to do some work on my OpenEdge system and don't want ProTop to alert me while this is going on, how do I put alert emails and texts on hold?
NOTE: If you have configured ProTop to monitor your OE Replication server (running OE Repl+) be sure to repeat these steps on your target db server.
Stopping ProTop for Dictionary Changes
If you apply dictionary changes in single-user mode or use online schema changes, ProTop does not interfere and does not need to be stopped.
If the database runs in multi-user mode and you attempt to load a df from the data dictionary without checking the "Add new objects online" box, the ProTop agent, a regular 4GL client, will prevent exclusive access to the database schema.
In that case, you can pause ProTop using one of the following methods:
Schedule an Outage (Preferred)
Run the maintenance.sh (or .bat on Windows) script, using the "on" option and specifying the number of hours for the outage:
bin/maintenance.sh on 2 <== for *nix
or
bin\maintenance.bat on 2 <== for Windows
This will disable ProTop for all of the resources on this server. It shuts down the Progress sessions so other sessions can get a schema lock. It also creates an Outage entry on the ProTop Portal for these resources so that emails and pages are not sent out during that window.
Manual Stop
If you prefer to control the stop and start of ProTop manually:
-
Stop the ProTop service
- For UNIX - comment out the dbmonitor cron job
- For Windows - stop the ProTop3 DB Monitor Windows service
- Delete $PROTOP/tmp/*.flg. This stops all ProTop processes (dbmonitor and pt3agents).
Restart ProTop
When you finish your schema changes or other maintenance, re-enable ProTop by either:
- Restarting the ProTop Service if you stopped it manually or, by
- Ending the scheduled maintenance you created above by running:
bin/maintenance.sh off <== for *nix
or
bin\maintenance.bat off <== for WindowsThis will remove the tmp/MAINTENANCE file, which allows your scheduled ProTop Service (dbmonitor) to restart monitoring for this site's resources. Maintenance "off" waits for monitoring to restart before deactivating the Outage entry on the portal and ending.
- Repeat on your target db server(s).
Background (330+)
When you use “bin/maintenance.sh on”:
- If maintenance mode is already “on” and “strict” mode is enabled a log message is written but no other action will be taken.
- If maintenance mode is already “on” and “strict” mode is NOT enabled a log message is written. The utility will proceed.
When you use “bin/maintenance.sh off”:
- If maintenance mode is already “off” and “strict” mode is enabled a log message is written but no other action will be taken.
- If maintenance mode is already “off” and “strict” mode is NOT enabled a log message is written. The utility will proceed.
- The MAINTENANCE file will be removed. This should result in dbmonitor and the agents automatically restarting.
- A timer will start based on maintenanceRestartDelay in etc/protop.cfg.
- If dbmonitor has not restarted by the time that the timer runs out and if maintenanceRestartFailure does not equal "continue" the script will end but take no action. The outage remains in place.
- If dbmonitor restarts or maintenanceRestartFailure = "continue" then the portal will be sent a “heartbeat” alert and THEN notified that the outage has ended.
Additionally: writing to the log file has been modified. Previously the script output directly to STDOUT in real-time. The script now only outputs the last line of the log file when the script has finished.
New properties in etc/protop.cfg:
# outage maintenance
#
maintenanceRestartDelay 900 # how long (in seconds) should we
# wait for dbmonitor to restart?
maintenanceRestartFailure abort # if dbmonitor fails to restart
# should we abort or continue?
maintenanceOnMode strict # if tmp/MAINTENANCE already exists
# do we stop? (strict) or do we
# continue? (loose)
maintenanceOffMode strict # if tmp/MAINTENANCE is missing do
# we stop? (strict) or do we
# continue? (loose)