Goliath Performance Monitor (GPM) Advanced Watch monitors your Windows servers/workstations by executing any Windows program, command, script, or batch file executable that you provide. It runs the executable periodically on the monitored server/workstation according to a schedule that you specify.
Configure the Monitoring
- To create a new monitoring condition, navigate to the Configure - Monitoring Rules page and click the New button
- A selection pane will appear, select the radio button option for WindowsServices Watch and then click OK
- Now the monitoring rule pane will appear. At the top of the pane name the Monitoring Rule via the Rule Name field, as well as define the description and the severity.
- The first tab, AdvancedWatch is where you will define what is to be configured.
In the Program Name field, define the name of the program, Powershell, command line, batch file, etc. to be opened when the alert triggers. This must be a fully qualified program name path. In order to access the network share, the agent must have rights to the share. Environment Variable substitution when bracketed with the percent character; for example, %SystemRoot% is supported.
- Powershell: powershell.exe or C:\Windows\sysnative\WindowsPowerShell\v1.0\powershell.exe
- Command or Batch file: exe or C:\Windows\system32\cmd.exe
- Executable: \\10.2.1.1\c$\scripts\alerts.exe
- - or -
- You can optionally specify an Executable Time-Out value and GPM will terminate the executable if it does not complete on its own before the timeout expires.
- In the Cmd-Line Options field, define an 'Argument' string passed to the program, batch, or command file named in the Program Name field when executed.The parameters are case sensitive and must be upper case. Environment Variable substitution when bracketed with the percent character; for example, %SystemRoot% is supported. If you are returning an Exit code from your PowerShell script for processing in Goliath Performance Monitor, please see the next step for some options surrounding how you call the PowerShell script.
- Powershell: -ExecutionPolicyBypass -File "C:\Program Files\MonitorIT\Scripts\ps1"
- Command Line: net stop Spooler
- In the Exit Code field, define an exit code and a comparison that the GPM Agent will make against the executable exit code, and generate an alert if the comparison fails.
- For Exit Codes coming back from a PowerShell script, you have two options. Either define the Exit Code in your PowerShell using [Environment]::Exit(###) where ### is the Exit Code you want to pass back to Goliath Performance Monitor.
You can also alternatively use the standard Exit command instead of using [Environment]::Exit(###) in your PowerShell script by calling the script in the “Cmd-Line Options” field with the following format:
"& 'c:\commands\ExitCodeTest.ps1' "; exit $LASTEXITCODE
- The optional username and password fields are where you would, if necessary, define a user that the Goliath Agent will use to run the executable in this user’s security context.
- In the Start Directory field, optionally specify when creating the process and running the executable.
- Set the Show Program Window check box to have the executable window GUI appear on the screen or uncheck to run the executable in the background; hidden.
Configure the Schedule
The Schedule tab of a monitoring rule allows users to define how frequently the rule will alert. This can be done by adjusting the following fields:
Alert Every Time: Defines whether an alert is generated every time the conditions are on the previous tab are met.
- When checked the alert is generated every time the conditions are met.
- When unchecked, the alert is only generated if the alert conditions are met, and the Minimal Notification Interval is exceeded since the last alert for this type.
Minimal Notification Interval: Defines the minimal interval that must elapse between events for this alert before another alert will be generated.
- The Alert Every Time checkbox must be unchecked in order to use this option.
- For ServerWatch IP Services, this also defines the minimum elapsed time since a service is first detected as down or failed before an alert is generated.
Maximum Notification Interval: Defines the maximum number of times you want to be notified during a continuous failure situation.
- A value of 0 means no maximum is defined so you will continue to be notified according to your Alert Every Time and Minimal Notification Interval settings.
- A non-zero value means that after you have been notified the number of times defined in the Maximum Alert Notifications, and according to your Alert Every Time and Minimal Notification Interval settings, you will not be notified again.
Notify On Restore: Defines whether a 'Restore' alert is generated if you have previously been alerted due to a failure.
- There is always a Notify on Restore for a ServerWatch for IP Service
- Active Only if Server 'Owns".... This Cluster Group: This option is for monitoring machines that are apart of a cluster. If the checkbox is checked, then the rule is monitoring and will alert only if the server is a member of a cluster, 'owns' the specified Cluster Group and the specified Cluster Group is 'Online'.
Alert 1st Time After ___ Failures: This field allows for the alert to only trigger if the event is happening continuously.
- For example, if 5 is defined, the event will not trigger until it has occurred 5 times or more in a row. Events 1-4 will be ignored.
- Run Program Every: This is a required field where you would designate how frequently the program will execute
- Start At Date/Time: Defines the starting point for the executable. The GPM Agent attempts to always run the executable at a periodic rate that is an even increment from the Start Date/Time plus the Run Program Every rate
For additional configuration options please see the following articles:
- Enabling Notifications:
- Configure Custom Remediation