SiteScope User's Guide

Remote Unix Servers




SiteScope can monitor other Unix servers remotely for certain statistics (such as CPU, Disk Space, Memory, or Services) without the installation of agent software on each server. SiteScope does this by running command line tools on the remote machine as a remote user. Before you can add monitors to monitor remote Unix servers, you need to define the server and connection method that SiteScope should use to login to the server. You will also need to create or modify an account on the remote server that corresponds with the connection method and permissions you intend to grant to SiteScope. After you define a remote Unix server and restart the SiteScope service, you can create a monitor to watch the status of that server. Clicking the choose server link on an Add Monitor page will display a list of the remote servers you have defined. You can then select the server that you wish to monitor.

This section describes:

Remote Servers Table

From the General Preferences page click the Unix Remotes link under the navigation bar at the top of the page. This brings up the Remote Servers page which lists in table format the currently defined remote Unix servers. The Remote Servers Table lists the following information on the currently defined Unix servers.

Name
This shows the optional name assigned to the server definition.

Server
This item indicates the server address or host name.

Status
This column displays information regarding the connectivity with this server. The connection status message is from the most recent test of connectivity either when the server profile was created or using the Test feature in the Remote Servers Table.

OS
This shows the operating system that was defined for the server. This should be the operating system that is running on the remote machine.

Method
The Method entry shows the connection method - Telnet, rlogin, HTTP - specified for the server.

Edit
Click the Edit link to edit the connection specifications for that server.

Test
Click the Test link to test connectivity to that server. If there are problems connecting to the server, the Status message will be updated with an applicable message.

Detailed Test
Click the link in the Detailed Test column to run a test on that server. The test will check connectivity, authentication, and monitoring capability.

Del
Click the X in this box to delete the server definition.

Index

Adding a Remote Machine

You can add remote Unix servers by choosing the Add a Remote Machine link below the Remote Servers Table. This brings up the Add Remote Server page.

To create a remote UNIX server definition, you need to provide the following information:

Server Address
The IP address or host name of the server you wish to monitor.  If you are using the HTTP method of monitoring, enter the full URL of the CGI script (for example: http://demo.thiscompany.com/cgi-bin/run.sh)

OS
The operating system running on the remote server. This is required so that the correct information can be obtained from that server. Use the drop-down list feature to select from the default operating systems. SiteScope currently includes default support for the following versions of UNIX:

AIX
FreeBSD
HP/UX
HP/UX 64-bit
Linux
MacOSX
OPENSERVER
SCO
SGI Irix
Sun Solaris
Tru64 5.x
Tru64 Pre 4.x (Digital)

For servers running versions of UNIX which are not included in the list, see the section on Remote UNIX Adapter Kit. in the Advanced SiteScope Topics section

Connection Method
The method for connecting to the server. The currently supported methods are:

TelnetLog in to the remote server using Telnet
SSH Log in to the remote server using the SSH protocol. This may require additional software and setup depending on the version of UNIX you are working with. See the document on Secure Shell in the Advanced SiteScope Topics section for more information on SSH requirements.
Rlogin Log in to the remote server using the Rlogin protocol
HTTP Connect to an HTTP server on the remote server and run the command via a CGI.  For this method the Login and Password are optional and are used for authorizing SiteScope to log on to the remote machine if required.

Login
The login for the remote server.

Password
The password for the remote server.

Title
A name by which the remote machine should be known. This name will appear in the drop-down list in monitors that can connect to this server.

Prompt
This is the prompt output when the system is ready to handle a command - the default is #

Login Prompt
This is the prompt output when the system is waiting for the login to be entered - the default is "ogin:"

Password Prompt
This is the prompt output when the system is waiting for the password to be entered - the default is "assword:"

Secondary Prompt
In the case the telnet connection to the remote server causes the remote server to prompt for more information about the connection, enter the secondary prompt(s) here. Separate multiple prompt string by commas (,). For example, for Telenet connections to some remote servers, the remote server may ask what terminal type should be emulated for the connection. In this case you might need to enter Terminal type? as the secondary prompt. The response to the secondary prompt is entered in the Secondary Response field below.

Secondary Response
Enter the response(s) to any secondary prompts required to establish connections with this remote server. Separate multiple responses with commas (,).

Initialize Shell Environment
Enter any shell commands to be executed at begining of the session. Seperate multiple commands with a semicolon (;). This option allows you to specify shell commands to be executed on the remote machine directly after a Telnet or SSH session has been initiated. These commands can be used to customize the shell for each SiteScope remote.

Some example cases include:

1. The remote shell may not have the correct path set for SiteScope scripts to run. The following command will add the directory /usr/local/bin into the PATH of the current shell on the remote machine:

export PATH=$PATH:/usr/local/sbin

2. The remote shell may not be initializing the pseudo terminal correctly. Enter the following command to increase the terminal width to 1024 characters:

stty cols 1024;${SHELL}

Note: commands after a shell invocation will not be executed.

3. There have been cases where the remote Telnet Server does not echo back the command line properly. This may cause strange behavior for monitors that rely on this behavior.

Enter the following command to force the remote terminal to echo:

stty echo

4. Certain UNIX shells have been known to behave erratically with SiteScope. This includes bash, ksh, and csh. Enter the following command to change the shell to sh for the SiteScope connection:

/bin/sh

Trace
Check this option to trace messages to and from the remote server in the RunMonitor.log file

After defining the server for SiteScope, you can test the settings by clicking on the test link. SiteScope attempts to display the working directory of the remote machine (the "pwd" command on UNIX, or "cd" on Windows NT), as a test to ensure that the remote machine can be accessed and can run commands properly.

Index

Technical Notes on Remote UNIX Monitoring

The following is additional information relating to the setup of remote UNIX servers in SiteScope and the monitoring of remote UNIX server performance.

Connection Methods for Remote UNIX

You can choose one of several methods that SiteScope should use to connect to remote UNIX servers. These include the following:

telnet
Along with SSH, telnet is another popular method for connecting to remote UNIX servers. You can set up your remote servers to require a password for telnet, or to allow access without a password (like "rsh"). SiteScope will handle either case.

SSH
For Solaris, use of the SSH access method requires that an SSH client is installed on the SiteScope machine and the SSH server installed on the servers you are monitoring. See the document on Secure Shell in the Advanced SiteScope Topics section for more information on SSH requirements.

Note: The path to the SSH client on the machine where SiteScope is running should be:
/usr/local/bin/ssh or /usr/bin/ssh

For Windows NT or 2000, an SSH client is included in the package. For debugging, the Windows SSH client can be run from the command line, replacing the values for the username, host name, and password:

\SiteScope\tools\plink.exe -ssh myUser@myServer.myCompany.com -pw myPassword

Using SSH requires that digital certificates be installed on each of the servers you will be connecting to.

rlogin
You can set up your remote servers to require a password for rlogin, or to allow access without a password (like "rsh"). SiteScope will handle either case.

CGI
There are some cases where it may be useful to use a Common Gateway Interface program to access performance data or application data from a UNIX server. Two simple CGI scripts are included with SiteScope:

/SiteScope/classes/CustomRemote/examples/remote.pl
/SiteScope/classes/CustomRemote/examples/remote.sh

The remote.pl CGI is a Perl (version 4 and above) script that executes a command on the server; the remote.sh script does the same, except as a UNIX sh script. CGI commands are passed in via the COMMAND CGI variable. If you are using the CGI connection method and you want to use remote actions, remember that the permissions for both the directory containing the CGI script and the /script directory need to allow the Web server (probably running as a user with few permissions) to execute in those directories. Additionally, the scripts need to have execute permission.

If you wish to use a CGI script that puts more restrictive limits on the commands that can be run, you can use a different CGI script. All that matters is that the CGI returns the output of the command passed in via the COMMAND variable. For greater security, you can set up your Web server to require a login/password authorization to run the script (this is recommended). Also, if you have a secure Web Server on that server, you can set up the script to run using the Secure Sockets Layer (SSL, used in https requests), so that the request and output is encrypted.

We are open to requests for additional connection modes and the API for writing connectors is available. We have also included information on how to create an adapter file to remotely monitor versions of UNIX that are not currently supported as one of the SiteScope defaults. In either case, contact SiteScope support at http://support.mercuryinteractive.com/ and we can discuss adding a connector that fits your specific needs. A sample connector Java class, which outlines the structure of a connector, can be found in the following directory:

/SiteScope/classes/CustomRemote/examples

If you choose to write one yourself, let us know - we'd like to hear about your experience.


 

Index





Copyright © 2003 Mercury Interactive Corporation.
All rights reserved.