Contents Lab128 - Tools for Advanced Oracle Tuning and Monitoring. Reference Guide.

Settings for Monitored Instance

Lab128 can be customized in the Settings window. When settings are changed, the "Apply" button becomes enabled. Clicking this button commits all changes. All changes take effect immediately: there is no need to re-start Lab128. The "Cancel" button cancels all changes and closes the Settings window. The "OK" button commits (applies) changes and closes the window. The Settings window has two pages: Main Settings and Save Performance Data.

Main Settings page.

There are three sections on this page: General, SQL Statistics, and Active Session History:

General Settings.
SQL Statistics Settings.
Active Session History Collection Settings.

RAC page.


Saving Performance Data Page.


Reconnect Behavior.

When Lab128 successfully connects to Oracle, it will attempt to maintain connection automatically. If it gets disconnected, it will continuously try to reconnect. Additional options are:

Example
This example shows how to send e-mail message using Windows Power Shell. Save the code below into send_email.ps1 file in the directory where Lab128 is installed. In On Lost Connection section enter in the "Command" box this string:

powershell -file "send_email.ps1" ${MONITOR_NAME}

Depending on the security settings, you my need to add '-executionpolicy bypass' option, also see comments in the code.

#-------------------------------------------------------------------
# This Power Shell script can be used for sending e-mail messages 
# from Lab128 using this commad:
# powershell -executionpolicy bypass -file "send_email.ps1" ${MONITOR_NAME}
# The script takes one parameter, a monitor name. 
# Secure TLS and SSL protocols are supported as well.
#-------------------------------------------------------------------


#-------------------------------------------------------------------
# Customize this section
#-------------------------------------------------------------------
$emailSmtpServer     = "mail.somewhere.com"
$emailSmtpServerPort = "587"
$emailSmtpUser       = "smtp_user"
$emailSmtpPass       = "smtp_password"
$emailFrom           = "Administrator <admin@somewhere.com>"
$emailTo             = "john@somewhere.com"

$emailMessage = New-Object System.Net.Mail.MailMessage($emailFrom, $emailTo)

#-------------------------------------------------------------------
# Customize the subject and message text
#-------------------------------------------------------------------
$emailMessage.Subject = "Monitor "+$args[0]+" cannot reconnect"
$emailMessage.IsBodyHtml = $true
$emailMessage.Body = "<p>This message is sent from Lab128: the monitor " `
  + $args[0] + " cannot reconnect to Oracle server.</p>"


$SMTPClient = New-Object System.Net.Mail.SmtpClient($emailSmtpServer, $emailSmtpServerPort)
$SMTPClient.EnableSsl = $true
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential($emailSmtpUser, $emailSmtpPass);


#-------------------------------------------------------------------
# Now send the message
#-------------------------------------------------------------------
# Uncomment this line to override "certificate is invalid..." error
#[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}
$SMTPClient.Send($emailMessage );

echo Finished! 

If Power Shell is not available, you can use many freeware command line e-mail clients avaialble on Internet.

See also: lab128.ini file