Agent Installation for Linux

This is the installation manual for Cavisson Monitoring Agent for Linux environment.  The CMON has two components:

  • ND Machine Agent, and
  • ND Java Application Agent.

Prerequisites

  1. ND Machine Agent should be running with the same user name as Java application user**.
  2. JDK 1.8 or later is required.
    1. RPM installation will auto detect Java and set JAVA_HOME.
  3. For RPM installation the user needs root / sudo access

** If ND Machine Agent is not running with the same user then the user won’t be able to take thread dump and heap dump of the JVM.

Installation 

To install CMON-ND-NF service, execute the following command:

Syntax: rpm –ivh “package name”
Example: rpm -ivh ” cmon-nd-4.2.0-71.2.x86_64.rpm”

* CMON-ND-NF default path is /srv/prop/cavisson/monitors
*To run CMON-ND-NF with specific user and specific path, go to Installing RPM with Specific User on Specific Path section.

To Run CMON Service with Specified User

export CMON_USER=<user_name>

export CMON_GROUP=<group_name>

Install CMON Service with Specific Path

Syntax: rpm –ivh –-prefix=<path> “package name”

Example: rpm -ivh –prefix=/home/cavisson “cmon-nd-4.2.0-71.2.x86_64.rpm”

Configuration

ND Machine Agent Configuration

Make changes in the configuration details within the following file: $CAV_MON_HOME/sys/cmon.env

Auto Registration Configuration (Optional)
  • NDE Controller Address (Host and Port): Configure NDE Controller as following:

CONTROLLER=<host:port>

  • Tier Name: Configure Tier Name as following:

Tier=<Tier Name>

If the tier name is not defined, then the server will be the part of ‘Default’ tier.

JVM Configuration

Add following for Heap size setting and enabling JMX port of Machine Agent in CMON_OPTS.

“-Xms512m -Xmx512m -Dcom.sun.management.jmxremote.port=7991 -Dcom.sun.management.jmxremote.authenticate=false”

Sample cmon.env file content

CMON_USER=cavisson JAVA_HOME=/apps/java/jdk1.8.0_131 CAV_MON_AGENT_OPTS=”-F 1″ CMON_OPTS=”-Xms512m -Xmx512m -Dcom.sun.management.jmxremote.port=7991 -Dcom.sun.management.jmxremote.authenticate=false -Djffi.boot.library.path=/export/cavisson/monitors/nf/nfagent/vendor/jruby/lib/jni -Xbootclasspath/a:/export/cavisson/monitors/nf/nfagent/vendor/jruby/lib/jruby.jar -Djruby.home=/export/cavisson/monitors/nf/nfagent/vendor/jruby -Djruby.lib=/export/cavisson/monitors/nf/nfagent/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh” CLASSPATH=$CLASSPATH:/export/cavisson/monitors/lib/jruby.jar:. #NDE Controller Host and Port CONTROLLER=10.10.40.13:7891 #Tier and Server TIER=WebStore SERVER=<ip address or host name of server>

Sample nf.properties file content

NFAgent considers the config directory provided in nf.properties file under nfConfigDir. Default is conf.d.journald, change it to conf.d.files where we are reading logs from log files.

Example

nfEnv=nf/nfagent/lib/bootstrap/environment.rb nfVersion=–1.9 nfConfigDir=nf/nfagent/config/conf.d.journald/ nfRunner=nf/nfagent/logstash-core/lib/nfagent/runner.rb

Restart ND Machine Agent

Restart ND Machine agent using following command:

service cmon restart Or systemctl restart cmon

ND Java Application Agent Configuration

Add following arguments in Java startup program:

– javaagent:/opt/cavisson/netdiagnostics/lib/ndmain.jar=time,ndAgentJar=/opt/cavisson/netdiagnostics/lib/ndagent-with-dep.jar,ndHome=/opt/cavisson/netdiagnostics,ndcHost=<ndc IP>,ndcPort=<ndc Port>,tier=<tier>

Serial No Parameter Description
1 Tier The tier of the application. For example AppTier, SearchTier
2 Server The display or actual name of the server where the agent is running. This can take both hostname and IP
3 Instance The name of the standalone application instance or managed instances. For example “cav-stf-01”
4 ndcHost NetDiagnostics Collector IP or hostname
5 ndcPort NetDiagnostics Collector port. Use 7891 unless some other port is used.
This concludes the successful installation of Java Application Agent.

NetForest Configuration

A. Reading NFAgent Configuration (parser) from NFDB (Default)

To read configuration from NFDB, we have to provide NFDB URL in $CAV_MON_HOME/nf/nfagent/config/nfagent.yml file.

config.store.nfdb: true 
config.hosts: ["localhost:9200"]

Note:

  1. If config.store.nfdb is false, configuration are read from files (see below section).
  2. config.hosts can have comma separated host list in case of multinode clusters.

For example: config.hosts: [“localhost:9200”, “10.10.10.1:9200”]

B. Reading NFAgent Configuration (parser) From Files 

config.store.nfdb: false

File configurations are stored in $CAV_MON_HOME/nf/nfagent/config/conf.d.files

Note:

In case of failures i.e. NFAgent is unable to connect NFDB for configuration or configuration index is not present etc., it takes configurations from files as fallback.

Add environment specific information in $CAV_MON_HOME/sys/nf.env file.

SERVER=<server>
DC=<dc>
ENV=<env>
INDEX_PREFIX=<prefix>
# If it's false only OUTPUT_HOST1 and OUTPUT_PORT1 is considered
OUTPUT_MULTINODE=false
OUTPUT_HOST1=<host1>
OUTPUT_PORT1=<port1>

Note:

  1. TIER is taken from env.
  2. In case of cloud installations, SERVER and ENV is taken from Journald not from env.
  3. In case OUTPUT_MULTINODE is false (i.e. nfdb cluster has only one node), OUTPUT_HOST1 and OUTPUT_PORT1 is considered, and rest are ignored.
  4. Server is optional for cloud environment. It takes hostname as server.

Reload NFAgent

In case of any changes in nf.env or in NFDB configuration index, reload the NFAgent config.

Use below steps to reload NFAgent:

  1. nc <ND Machine Agent ip> <ND Machine Agent port> (set port to 7891)
  2. START_SESSION
  3. NetForestCMD:RELOAD
  4. STOP_SESSION 
This concludes the installation of NFAgent.