- Ubuntu: 12.04 LTS, 14.04 LTS, 16.04 LTS
- Debian: 7, 8
- Redhat, CentOS: 6, 7
- Nothing
- From apt/ yum repositories
- json-c
sudo apt-get install libjson0-dev
sudo yum install json-c-devel
- openssl
sudo apt-get install libssl-dev
sudo yum install openssl-devel
- mysqlclient
sudo apt-get install libmysqlclient-dev
sudo yum install mysql-dev
- curl
sudo apt-get install libcurl4-openssl-dev
- json-c
- Others
-
Download tar file
$ wget (Download link)
- Check download links here
-
Untar moc_agent.tar.gz
$ tar -zxf moc_agent.tar.gz
-
Write your license in
cfg/license
-
Modify your configuration file (See C. Configuration)
-
Lauch the agent background
$ ./bin/agent & [1] (agent pid)
- Your configuration is in
cfg/plugins
. We support 3 plugins, os, jvm, and mysql. Add the configuration by following instructions.-
OS
It is written in the conf file by default. You can delete the line to stop observe the OS metrics. OS plugin does not need any option.
In
cfg/plugins
, add a lineos
.os
-
JVM
JVM plugin needs a port to communicate with java agent. We call it jspd. The jspd runs with tomcat to collect metrics from tomcat. So, we must set the java agent to run with tomcat at the same time.
At the first line of
$(tomcat path)/bin/catalina.sh
,export JSPD_HOME=(your agent path)/jspd
export JAVA_OPTS="-javaagent:$JSPD_HOME/lib/jspd.jar -noverify"
In
cfg/plugins
, add a linejvm
.jvm
-
MySQL
MySQL plugin needs a host address, the root account, and its password. Write the options after
mysql
with seperating commas.mysql,127.0.0.1,root,password
-
-
If you want to terminate, use this:
$ kill (agent pid)
-
Check your agent is terminated
$ ps aux | grep moc_agent (print nothing)
-
If you forgot the agent pid, check
res/pid
.$ cat res/pid (agent pid)