Sending E-mail Notification for Low Disk Space: Testing Notification
Next, perform the following tests to verify that notification is working correctly.
Testing the notification script or program
Before testing your configuration, you must test the script or program that you are using to send notifications. For this scenario, you would log into the notification servers, NS1 and NS2, using the PATROL default account, and attempt to send an e-mail message using mailx. After you verify that the e-mail client on the servers can send e-mail using mailx, you would use the following procedure to test whether e-mail notification is sent when the LDldFreeSpacePercent parameter enters an ALARM state.
To Test whether Notification is sent when LDldFreeSpacePercent alarms
Using the PATROL Configuration Manager, create the rule shown below:
{{"/AS/EVENTSPRING/setParameterValue" = \{ REPLACE = "/NT_LOGICAL_DISKS/__ANYINST__/LDldFreeSpacePercent=ALARM" \}}}- Use the PATROL Configuration Manager to apply this rule to the remote agents NT1, NT2, and NT3.
When you apply this rule to an agent, this rule assigns the parameter a value that is within the specified range. The parameter enters the desired state, ALARM, and generates an alert. - Determine whether the LDldFreeSpacePercent parameter enters an ALARM state and whether an e-mail notification is sent to networkadmin@abc.com.
You can also use a PSL command to set a parameter value.
To Force LDldFreeSpacePercent into ALARM using a PSL Command
- From the PATROL console, access the KM menu commands for one of the remote agents, NT1, as described in Accessing KM Commands and InfoBoxes.
- Choose the KM menu command PSL Command.
Enter the PSL command shown below and click Apply.
{{set("/NT_LOGICAL_DISKS/C:/LDldFreeSpacePercent/value",1)}}
;- Repeat the PSL command in Step 3 twice.
This PSL command sets the value of LDldFreeSpacePercent on logical disk C: to 1%. Since by default, LDldFreeSpacePercent alarms when the value is 0 to 5%, for 3 consecutive cycles, issuing this PSL command 3 times causes LDldFreeSpacePercent to enter an ALARM state and issue an alert. - Determine whether the LDldFreeSpacePercent parameter enters an ALARM state and whether an e-mail notification is sent to networkadmin@abc.com.
If a Problem Occurs
If the e-mail notification is not sent correctly, see Configuration Problems for troubleshooting help.