REMON module is one of JENNIFER independent agents that collects and process non-standard data and send it to JENNIFER server. In general, a monitoring solution is comprised of various functions such as data collection, processing, transmission, storage, and viewing. The REMON module is a generalized framework for data collection, processing, and transmission.
Using the REMON module, you can execute an arbitrary script on the OS or an arbitrary SQL on the database, or can execute a Java application that implements a specific SQL. Using these methods, you can collect non-standard data and send it to JENNIFER server.
In this article, we will explain how to configure REMON and how to write sample scripts to monitor system resources.
The REMON module is located in $JENNIFER_HOME/remon directory of the JENNIFER installation package. The REMON directory structure is as follow:
conf | The REMON configuration files are located within this directory |
lib | The Java library files used by REMON module. |
log | REMON log files directory |
logwatcher | Logwatcher is a log file monitoring module that is based on REMON. |
script | REMON script files directory |
REMON_HOME=/home/jennifer/remon
JAVA_HOME=/home/java
Configuration | Default Value | Description |
---|---|---|
remon.agent | R01 | REMON agent ID |
local.udp.port | 7701 | Port that REMON uses to receives external data |
local.tcp.port | 7701 | Port that REMON uses to receives TCP request from the control console and JENNIFER server |
local.ip | 127.0.0.1 | REMON module ip |
jennifer.sys1.ip | 127.0.01 | JENNIFER Server settings |
jennifer.sys1.port | 6902 | JENNIFER Server settings |
jennfier.sys1.agent | * | JENNIFER Server settings |
To start the REMON module, execute the remon.sh script located in $REMON_HOME.
cd /home/jennifer/remon
./remon.sh
You can write various scripts to collect data and sent it to REMON module. All scripts must be placed in $REMON_HOME/script directory. The following 3 examples show how to use REMON to collect CPU Information, Check Network Status and Disk Status
This script will use Linux top command to get CPU utilization
cd /home/jennifer/remon/script
vi cpu.sh
#!/bin/sh
##############################################
# REMON Script Header
#$ script = CPU
#$ agent= R01
#$ interval = 5
#$ fieldtype =float
#$ fieldname =CPU
##############################################
cpu=`top -d 0.5 -b -n2 | grep "Cpu(s)"|tail -n 1 | awk '{print $2 + $4}'`
echo $cpu
chmod a+x cpu.sh
cd /home/jennifer/remon
./console
load cpu.sh
start cpu.R01
This script will use the "netstat" command to check network status
#!/bin/sh
##############################################
# REMON Script Header
#$ script = NET
#$ agent= R01
#$ interval = 5
#$ fieldtype = int
#$ fieldname = est,tim,fin
##############################################
net=`netstat -an`
est=`echo $net | grep EST | wc -l`
tim=`echo $net | grep TIME | wc -l`
fin=`echo $net | grep FIN | wc -l`
echo $est,$tim,$fin
This script will display total size of the disk, used amount and free amount of the disk in megabytes.
#!/bin/sh
##############################################
# REMON Script Header
#$ script = Disk
#$ agent= R01
#$ interval = 5
#$ fieldtype = int
#$ fieldname =Size,Used,Avail
##############################################
sz=`df -hm | awk '{ for (i=1; i<=NF; i++) if ($i=="1M-blocks") { getline; print $i }}'`
us=`df -hm | awk '{ for (i=1; i<=NF; i++) if ($i=="Used") { getline; print $i }}'`
av=`df -hm | awk '{ for (i=1; i<=NF; i++) if ($i=="Available") { getline; print $i }}'`
Here is an example of the user-defined dashboard after we added the Network and Disk Space charts
In a previous article, JENNIFER Events and Alerts, we gave an introduction to JENNIFER EVENTS system. In this article, we will see how the EVENT system can be used in action. We will see how to analyz...
JENNIFER Events is a flexible notification system that allows the operation teams to receive notification about incidents that take place in a system. JENNIFER Event Rules allows you to configure Even...
Dynamic method profile is a powerful feature in JENNIFER that allows you to increase/decrease the profiling level of a transaction without restarting the application server. First of all, what is a...
What is Deployment Indicator When a new version of the code is deployed in production, JENNIFER can automatically detect this change and display the changed resource in the deployment. A vertical...
Mule is a lightweight Java-based enterprise service bus (ESB) and integration framework developed by MuleSoft. Mule ESB allows developers to connect applications together easily and quickly, enabling...