SiteScope User's Guide


Monitoring Remote UNIX Servers

Today's business networks are often a mix of applications and services that are often run on different operating systems. Monitoring operation and performance across multiple platforms is both imperative and a challenge. SiteScope can monitor systems and services running on remote UNIX servers for certain statistics (such as CPU, Disk Space, Memory, and Processes) without the installation of agent software on each server.

This section describes:

About Monitoring Remote UNIX Servers

SiteScope can monitor many applications independent of the platform they are run on by using Internet and other standard protocols such as SMTP, FTP, LDAP, and so forth. These types of systems and services can usually be monitored by sending requests using these platform-independent protocols. For example, checking that a Web server is responsive can be done using by making HTTP requests such as used by URL monitor types.

An important part of effective system monitoring involves monitoring resources at the server level. This is usually done by running commands specific to the operating system running on the server. This level of monitoring can be done using a login connection to the remote server.

SiteScope automates monitoring of server resources on remote UNIX servers by running command line tools on the remote machine as a remote user. To do this SiteScope must be able to establish a connection to the servers you want to monitor and be authenticated as a remote user having permissions to execute the applicable commands.

Before you can configure SiteScope monitors to monitor resources on a remote UNIX server, you need to define a Remote UNIX Server connection profile for that 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 as a "remote user" logging onto that server.

After you define a remote UNIX connection profile, you can create monitors to watch the resources of that server. Multiple monitors can use the same connection profile. 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 want to monitor.

The Remote UNIX Servers Table

You use the Remote UNIX Servers table to view and manage profiles for connecting to and monitoring services and resources on remote servers running UNIX and Linux operating systems. From the General Preferences page click the Remote UNIX 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 server profiles. The following is an example of the Remote UNIX Servers page showing several server connection profiles.

Remote UNIX
    Servers page view

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. If no name was specified, the server or host name is used.

Server
This column 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 drop-down list 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 UNIX Server Profile

You add a remote UNIX server profile by choosing the Add a Remote Machine link below the Remote Servers Table. The following is an example of the Add Remote Server page for adding a connection to a remote UNIX machine.

Remote UNIX
    Servers page view

To create a remote UNIX server profile, you will need to know 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)

To use the same login credentials to configure multiple servers at the same time, enter the server addresses separated by commas. For example, if you are using NetBIOS to connect to other servers in an NT domain, you can enter a comma-separated string of server addresses such as: serveraddress1,serveraddress2,serveraddress3,serveraddress4. When you complete the other required entries on the form and click Add Remote NT Server, SiteScope creates a new remote connection profile for each server address in the list.

Note: When adding multiple servers in a single operation, SiteScope does not automatically test connectivity with each server. You can use the Test links in the Remote NT Server Table to test connectivity after the profiles have been added.

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 Monitoring Adapter Kit in the SiteScope Reference Guide for more information on adpating SiteScope to monitor other versions of UNIX.

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

Connection Method

Description

Telnet Log 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 or the passphrase for the SSH key file. Note: When using SSH authentication with public/private key based authentication enter the passphrase for the identity file here.

Title
A name by which the remote machine should be known in SiteScope. This name will appear in the drop-down list of the Choose Server page for monitors that can connect to remote servers.

Prompt
This is the prompt output when the remote 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 Telnet 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 box 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 beginning of the session. Separate multiple commands with a semicolon (;). You use this option 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

Add and Test
Check this radio button to add the remote server profile and perform the connectivity test.

Note: The Add and Test option does not currently support the option to add multiple servers in one operation. If you are adding multiple servers in a single operation, select the Add Only option below.

Add Only
Check this radio button to add the remote server profile or profiles only. With this option checked, no connectivity test is performed.

Index

SSH Advanced Options

The SSH Advanced Options section presents a number of settings and options for configuring SSH connections to remote UNIX and Linux servers. Use of the SSH connection method requires installation and configuration of SSH clients and daemons. See the section on SiteScope Monitoring via Secure Shell (SSH) for more information on how to configure SiteScope for monitoring via SSH.

SSH Client
The client to use for this connection. The currently supported clients are:

Client

Description

Internal Java Libraries Connect using the Java SSH client integrated with SiteScope.
Plink/External SSH Client Connect using an external SSH client. On NT, SiteScope ships with Plink on UNIX or Linux SiteScope will use an installed client such as OpenSSH.

Port
Enter the port that the remote SSH server is listening on.

Disable Connection Caching
Check this option to turn off connection caching for this remote. By default SiteScope caches open connections.

Connection Limit
This setting controls the number of open connections that SiteScope will allow for this remote. If you have a large number of monitors configured to use this connection then set this number high enough to relieve the potential bottleneck. Note: This setting does not effect the running of tests for a remote, tests will always create a new connection.

SSH Authentication Method
The authentication method to use for SSH connections. The currently supported methods are:

Authentication

Description

Password Authenticate using a password.
Key File Authenticate using public/private key authentication. When this option is selected SiteScope uses the private key in the file SiteScope/groups/identity to authenticate. The corresponding public key must be listed in the authorized_keys file on the remote host. See the document on Secure Shell in the Advanced SiteScope Topics section for more information on SSH requirements.

Key File for SSH connections
Select the file that contains the private key for this connection. The default key file is SiteScope\groups\identity. This setting only applies when the authentication method is Key File .

SSH Version 2
Check this option to force SiteScope to use SSH protocol version 2 only. This option only applies when using the integrated Java Client. See the section on Configuring SSH Using an External Client for information on configuring an external SSH client to use SSH2 protocol.

Custom Commandline
Enter a custom commandline for a remote using the External Client. This option can be used when needing to pass specific options to the external client being executed. Valid substitution variable are
  • $root$ : This will be translated to the SiteScope directory.
  • $user$ : This will be translated to the username entered into the remote.
  • $password$ : This will be translated to the password entered into the remote.
  • $host$ : This will be translated to the hostname entered into the remote.

Use the following steps to add a remote UNIX server profile to SiteScope.

To add a Remote UNIX Server profile

  1. Click the Remote UNIX link on the SiteScope navigation menu. The Remote UNIX Servers page is displayed.
  2. Click the Add a Remote Machine link below the Remote UNIX Servers table. The Add Remote Server page is displayed.
  3. Enter the address to the remote server you want to be able to connect to in the Server Address box.
  4. Select the operating system that is running on the remote server using the drop down menu for the OS box.
  5. Select the connection method for this profile using the drop down menu for the Connection Method box. If you are using telnet or rlogin, also specify the shell prompt output when the system is ready to accept a command in the Prompt box.
  6. Enter the login user name and password in the fields provided for the login account that has been created on the remote server.
  7. Enter an optional Title used to identify this connection profile in other parts of SiteScope. If you do not provide a title, the server address is used.
  8. Complete the form with other information needed to connect to the remote server as described in the sections above.
  9. Select the Add and Test radio button to add and test the connection profile or select the Add Only radio button to only add the profile without testing.
  10. Click the Add Remote Server button to complete the action.

After defining the server for SiteScope, you can have SiteScope test the settings by clicking on the Test link for the applicable server in the Remote UNIX Server table. 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 that the login account 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.

HTTP
There are some cases where it may be useful to use a Common Gateway Interface program over HTTP to access performance data or application data from a UNIX server. Two simple CGI scripts are included with SiteScope to allow access over HTTP:
<SiteScope install path>/SiteScope/classes/CustomRemote/examples/remote.pl
<SiteScope install path>/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.

SiteScope can be adapted for additional connection modes and the API for writing connectors is available. 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 is included in the SiteScope Reference Guide. You can contact SiteScope support at http://support.mercuryinteractive.com/ for more information on 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 install path>/SiteScope/classes/CustomRemote/examples
    

Index