This article has been updated to support v11.7.8 and the newer of Goliath Performance Monitor.
Article Contents
- System Requirements
- Goliath Performance Monitor Linux/Unix Agent Installation Steps
- Management Tasks
- Appendix
System Requirements
Note: The Goliath Intelligent Linux/Unix Agent is a Java program that runs on a wide variety of Linux and Unix-based operating systems.
Linux/Unix Version |
|
Java |
Version 1.8 or higher |
Disk |
10 MB of Disk Space* |
*If Java is required, up to an additional 100 Mb may be required to support the Java install.
Goliath Intelligent Linux/Unix Agent Installation Steps
In this section, we will cover the steps necessary to perform the agent installation. The basic process for the agent installation and what these instructions will guide you through is as follows:
- Prepare your servers to run the agent
- Copy the agent files over to the target server
- Run the install command line (single line)
- Modify ‘rc.local’ by appending the install command; so that the agent starts automatically each time the server is restarted.
Prerequisites
Previous Versions
If you are running a previous version of the Linux Agent you will need to delete that first. Please reference Uninstalling the Agent for the instructions on how to perform these steps.
Install Java
The Linux/Unix Agent is implemented in Java to provide wide compatibility across all Linux/Unix variations including Solaris, HP-UX, and AIX. However, a JRE (Java Run-time Engine) is required. If you need Java, check this official site for Oracle (who now owns SUN, the Java creators) for the appropriate JRE: http://www.oracle.com/technetwork/java/javase/downloads/jre-6u25-download-346243.html
For Fedora Core, run the following command:
yum install java
For Debian Core, run the following command:
sudo apt-get install openjdk-8-jre
Create a home for the Agent:
Create a directory on the target machine to hold the Agent files. Recommended locations are:
“/opt/monitorit/” and “/home/monitorit/”
Installing the Agent
- In the ‘GPM Server Install Path > MonitorIT\Agent\Linux-Unix’ folder, find and copy the two files, 'jar' and ‘MonitorITAgentStart.jar’ to a folder of your choice on the Linux/Unix Server, for example ‘/opt/monitorit’, using WinSCP, FileZilla, or another file transfer tool.
- Open the command prompt from the directory where you copied the files:
nohup /FullyQualifiedPathToTheInstalledJava/bin/java -cp MonitorITAgentStart.jar AgentStart -s GPMIPAddress -p PORT &
where FullyQualifiedPathToTheInstalledJava is the location where java is installed, GPMIPAddress is the IP Address or FQDN of the Goliath Server, and 443 is the agent communication port. If you are unaware of the IP Address or FQDN of the Goliath Server and or the agent communication port, please see Appendix B
For example, to connect back to GPM server at 192.168.1.100 with agent port 443 when the java program is located at ‘/usr/bin’ the installation command would be:
nohup /usr/bin/java -cp MonitorITAgentStart.jar AgentStart -s 192.168.1.100 -p 443 &
- Put the command in your ‘rc.local’ file or equivalent so the Agent will run on start-up.
- If your ‘rc.local’ file is located in ‘/etc’ you would perform the following commands from the console command prompt:
- Open the ‘rc.local’ file to edit: ‘vi /etc/rc.local’
- Find the last line in the file and append the install command used earlier by using the ‘vi’ insert command: i
- Using the example from earlier, where the agent files are located at ‘/opt/MIT’ and the MIT server is located at 192.1.100, you would enter: nohup /usr/bin/java -cp /opt/monitorit/MonitorITAgentStart.jar AgentStart -s 192.168.1.100 &
- Click the Esc key to exit insert mode, and enter the command to save and close: wq!
Please Note: Once the Agent is installed, you will be able to subsequently update it remotely from the central Goliath Server display from the ‘Configure > Inventory’ screen using 'Manage Agents'
Management Tasks
Stopping the Agent
You can stop the agent from the command line:
java -cp /opt/monitorit/MonitorITAgentStart.jar AgentStart -s GPMIPAddress –shutdown
This will connect to the Agent running on the local machine and tell it to exit.
Uninstalling the Agent
- To stop the Agent once it has been running, execute the following command from the directory where you have copied the files:
java -cp /opt/monitorit/MonitorITAgentStart.jar AgentStart -s GPMIPAddress –shutdown
Again, using the earlier example where the java program is located at ‘/usr/bin’ and MonitorIT is located in the ‘/opt/monitorit’ directory, perform the following steps:
a. Go to the MonitorIT directory
cd /opt/monitorit
b. Execute the command:
java -cp /opt/monitorit/MonitorITAgentStart.jar AgentStart -s GPMIPAddress –shutdown
- Then delete the directory where the Agent files are installed and remember to remove the command-line from the 'rc.local' file or equivalent file used when installing the agent.
a. Go to the directory where the files are located, if the agent files are located in a directory called MonitorIT within /opt then: cd /opt
b. Execute the command to delete the directory: rm –r MonitorIT
c. Remove the startup scripts (varies by the operating system) from d
d. Remove the agent from the Goliath console by going to ‘Configure>Inventory’ selecting the server, and choosing delete at the bottom of the page. Otherwise, Goliath will report the agent as ‘down’ or ‘unavailable’
Appendix
Configuring the Agent to Run Automatically
In most cases, you will want the Agent to start up when the Linux or Unix machine boots, and to run all of the time. Linux and Unix systems refer to these types of processes as daemons. You will create a script that is located in a special directory used by the operating system to start daemon processes when the machine boots. The location of this directory, and the script itself, varies from one operating system to another.
Linux
Linux-based operating systems such as Red Hat, SUSE, Ubuntu and Debian launch daemon processes using scripts located in the ‘/etc/rc.d/init.d/’ directory. These scripts are used to start and stop the processes. Below is a script to use to run the Goliath Agent. Change the script as needed to account for the address of the Goliath server and agent communication port (see Appendix B), the location of the Agent files, etc. The script should be called ‘monitorit’
#!/bin/sh
# description: MonitorIT Daemon Service
#
JAVA_EXEC=/usr/bin/java
AGENT_JAR=/opt/monitorit/MonitorITAgentStart.jar
GPM_SERVER=10.20.30.40
GPM_PORT=443
start () {
echo -n $"Starting monitorITd:"
# start daemon
$JAVA_EXEC -cp $AGENT_JAR AgentStart -s $GPM_SERVER $GPM_PORT
RETVAL=$?
return $RETVAL
}
stop () {
# stop daemon
echo -n $"Stopping $prog:"
$JAVA_EXEC -cp $AGENT_JAR AgentStart -shutdown
RETVAL=$?
return $RETVAL
}
restart() {
stop
start
}
case $1 in
start)
start
;;
stop)
stop
;;
*)
echo $"Usage: monitoritd {start|stop|restart}"
exit 3
esac
exit $RETVAL
Solaris
Solaris launches daemon processes using scripts located in the ‘/etc/ init.d/’ directory. These scripts are used to start and stop the processes. Below is a script to use to run the Goliath Agent on a Solaris machine. Change the script as needed to account for the address of the Goliath server and agent communication port (see Appendix B), as well as the location of the Agent files, etc. The script should be called ‘monitorit’
#!/bin/sh
# shell script to start/stop MonitorIT Agent
# accepts start|stop arguments
case "$1" in
'start')
# Start Agent
echo "starting monitorit"
/usr/bin/java -cp /opt/monitor/MonitorITAgentStart.jar AgentStart -s GPM_SERVER GPM_PORT
;;
'stop')
# Stop tomcat
echo "stopping monitorit"
/usr/bin/java -cp /opt/monitor/MonitorITAgentStart.jar AgentStart -shutdown
;;
;;
Esac
Mac OS X
Mac OS X from Apple runs only on Apple’s Macintosh computers. This includes the server Mac Pro machine, and the desktop-oriented iMac and MacBook Pro machines. The MonitorIT Agent supports Mac OS X. It can be used to monitor activity on desktop machines and servers.
On Mac OS X, the MonitorIT Agent files should be installed in ‘/Applications/MonitorIT’
Mac OS X launches daemon processes using scripts located in the ‘/Library/LaunchDaemons’ directory. Below is a script to use to run the Goliath Agent. Change the script as needed to account for the address of the Goliath server and agent communication port (see Appendix B), the location of the Agent files, etc. The script should be called ‘\com.goliathtechnologies.monitorit.plist’
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>monitorIT</string>
<key>WorkingDirectory</key>
<string>/Applications/MonitorIT</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/java</string>
<string>-cp</string>
<string>MonitorITAgentStart.jar</string>
<string>AgentStart</string>
<string>-s</string>
<string> GPM_SERVER </string>
<string>-p</string>
<string> GPM_PORT </string>
</array>
<key>RunAtLoad</key>
<true/>
<key>LaunchOnlyOnce</key>
<true/>
<key>ServiceDescription</key>
<string>monitorIT</string>
</dict>
</plist>
Identifying the Goliath IP Address/FQDN and the Agent Port
This section will cover how one can identify the IP Address or FQDN being using for Goliath Performance Monitor, as well as the agent communication port.
- Sign in to the Goliath Server
- Navigate to the install directory of Goliath Performance Monitor. The default location is C:\Program Files (x86)\MonitorIT or C:\Program Files\MonitorIT
- Open the Bin directory
- Select the file named ‘GPMServer.cfg’ to open
- The Goliath Server IP address or FQDN is the ‘Server' Json value