|
|
|
Monitors and Services
You can define an unlimited number of TCP/IP monitors and services. Once defined, these can be used on any device on your maps.
WhatsUp Gold is shipped with monitors/services already defined for you:
You can define additional TCP services. For example, you may want to monitor an IRC (Internet Relay Chat) service, a Lotus Notes server, a Microsoft SQL server, or a Microsoft Exchange service.
Defining a Custom TCP/IP Service
The monitoring of a service always involves a protocol handshake and can also include some additional information exchange between WhatsUp Gold and the service. You can search the response from the service for an exact match of a particular text string, or you can use rule expressions to analyze the response for a more generic text pattern.
For example, if you are looking for any error message, and you know that all possible error messages have the word "fail" in common, you can use a rule expression to look for just the word "fail." Or, you can create a rule expression that looks for any number of possible error messages. You can search for "this," "that," or "the other."
To define a custom TCP/IP service:
You can do the following from this dialog box:
- Click New to create a new custom service or monitor.
- Click Edit to edit a custom service or monitor (first select the service you want to edit).
- Click Copy to copy a custom service or monitor (first select the service you want to copy).
- Click Delete to delete a custom service (first select the service you want to delete).
- Click the New button.
![]()
- From the Service Type list box, select TCP/IP Service.
- In the Service Name text box, enter a unique name for the service. This name will be displayed as a selectable option on the Services dialog box of the device properties.
- Click OK.
- Select a Network Type. Select the TCP or UDP network type.
- Example: The network type for the IRC (Internet Relay Chat) service is TCP
- Example: The network type for the RADIUS (Remote Authentication and Dial-In User Service) service is UDP.
- Select a Port Number. Enter the TCP or UDP port that you want to monitor.
- Example: 6667 is the port number for the IRC (Internet Relay Chat) service.
- Example: 1645 is the port number of the RADIUS (Remote Authentication and Dial-In User Service) service.
- Set the Timeout in Seconds.
Note: Since some devices may be at a different site or may take longer to respond, you can change the default amount of time that WhatsUp Gold waits for a response from the device. This can be from 1 to 500 seconds; or from 501 to 999 milliseconds. In other words, if you enter a value greater than 500, the value is interpreted as milliseconds.
- To Expect on connect, use an Expect= keyword. Enter either an exact text string or a rule expression that you expect the remote service to send to you when you connect. To view the Rule Expression Editor, click the Browse button. For more information on composing a rule expression, see "Using Rule Expressions".
- To Send command on connect, use a Send= keyword. Enter the command to send to the service's port. For example: for IRC (Internet Relay Chat), the send command is: "Version\r\n"
- To Expect a command response, use another Expect= keyword. Enter an exact text string or a rule expression that represents the expected response to the "Send" command. For example: for IRC, this is ":irc"
- To Send to disconnect, use a Send= keyword. Enter a command string to disconnect from the service properly. For example: for most TCP/IP servers, the string QUIT\r\n is proper. If a command string is not specified, the connection is closed by sending a FIN packet and then an RST packet.
- Click OK to save the custom service.
- You can now turn on monitoring of the service on any device in any network map.
Note: Depending on the plug-ins you have installed, there are many other services/monitors you can define. Others include: DNS Monitoring, Telnet Monitoring, SNMP Monitoring, and NT Service. See the WhatsUp Gold help topic: "Plug-Ins" for more information.
Using Rule Expressions
The rule expression syntax is:
Note that search_text can be any combination of literal text and the text patterns shown below.
- In the "Monitors & Services" dialog box shown on page 98, click the Browse button next to the Timeout:(seconds) box to view the Rule Expression Editor.
![]()
![]()
- Select the contains option to look for messages that contain the search string; select Doesn't contain to look for messages that do not contain the search string.
- Select Match Case to search for text that matches the case of the search string; to ignore case, make sure Match Case is cleared.
- Enter the expected text by doing one or more of the following:
- Type the literal text that you want to search for. For example, if you want to find the word fail, type fail.
- Type the text and quantifiers you want to search for; see "Rule Expressions Text and Quantifiers Tables".
- Click Insert Expression to insert a generic form of a text pattern or a quantifier. Then edit the inserted expression. See "Rule Expressions Text and Quantifiers Tables" below.
- Select and copy the rule before clicking OK. Once back in your script, paste the rule as your Expect= string.
Rule Expressions Text and Quantifiers Tables
Quantifier Expression Match Zero or more * Match One or more + Match n times {n} At least n, but not more than m (where n and m are numbers) {n,m} Note: As shown above, the following characters have special meaning in a rule:
{}()|*+,.:%If you want to use one of these characters in a search string, precede it with a backslash. For example, to search for a plus sign, enter \+ in the search string.
Testing a Rule Expression
To test a rule expression, you use the Rule Expression Editor.
![]()
- If the Rule Expression Editor is not visible, from the Configure menu, select Monitors & Services. Then, select the rule you want to test. Click the Browse button next to the rule to view the Rule Expression Editor.
![]()
- In the lower text box of the Rule Expression Editor, copy a message that meets your intended search criteria, select Contains, and click Test Expression.
![]()
If the rule expression does what you intended it to, The Comparison Text MATCHED the Pattern Specified is displayed.
If the rule expression doesn't test true, The Comparison text DID NOT MATCH the pattern specified is displayed. Edit the rule expression and test again. For a long or complex rule expression, we recommend you test one part of it at a time.
|
Ipswitch, Inc. http://www.ipswitch.com |
| ©Ipswitch 2001 | |||