[root@DB01 rma_setup]# pwd
/usr/local/rma/rma_setup
[root@DB01 rma_setup]# ll
total 380
-rwxr-xr-x 1 root root 807 Sep 1 15:16 cpu.sh
-rw-r--r-- 1 root root 12987 Sep 1 15:16 INSTALL
-rw-r--r-- 1 root root 4641 Sep 1 15:16 LICENSE
-rwxr-xr-x 1 root root 787 Sep 1 15:16 proccnt.sh
-rwxr-xr-x 1 root root 543 Sep 1 15:16 proclist.sh
-rwxr-xr-x 1 root root 299 Sep 1 15:16 qnx_cpu.sh
-rw-r--r-- 1 root root 2996 Sep 1 15:16 README
-rwxr-xr-x 1 root root 218178 Sep 1 15:16 rma
-rw-r--r-- 1 root root 93748 Sep 1 15:16 rma128_fedora4_x86.tar
-rw-r--r-- 1 root root 7684 Sep 1 15:16 rma.ini
-rw-r--r-- 1 root root 7647 Sep 1 15:16 rma.ini.bak
-rwxr-xr-x 1 root root 587 Sep 1 15:16 setup.sh
[root@DB01 rma_setup]# vi rma.ini

; ==========================================================================
;
; RMA (Remote Monitoring Agent) for FreeBSD/Linux/Solaris
; Configuration file
;
; Note:
; - any line which starts with a ; (semi-colon) or a # (hash) is a comment
; and is ignored
; - parameters are case insensitive
;
; BTW:
; To configure single agent or huge arrays of remote agents installed in
; different networks you may use RMA Manager. It allows you to change
; settings for hundreds of agents installed on remote systems at one time
; and from one comfortable location.
; http://www.ks-soft.net/hostmon.eng/rma-manager/index.htm
;
; ==========================================================================


;---------------------------------------------------------------------------

[Basic]
"rma.ini" 211L, 7684C
; ==========================================================================
;
; RMA (Remote Monitoring Agent) for FreeBSD/Linux/Solaris
; Configuration file
;
; Note:
; - any line which starts with a ; (semi-colon) or a # (hash) is a comment
; and is ignored
; - parameters are case insensitive
;
; BTW:
; To configure single agent or huge arrays of remote agents installed in
; different networks you may use RMA Manager. It allows you to change
; settings for hundreds of agents installed on remote systems at one time
; and from one comfortable location.
; http://www.ks-soft.net/hostmon.eng/rma-manager/index.htm
;
; ==========================================================================


;---------------------------------------------------------------------------

[Basic]

; RmaPath
; Obligatory parameter. Full path to the agent. UNIX does not have common
; method that allows to retrieve module name and path.
; Without this parameter agent will not be able to upgrade and restart itself.

RmaPath =/usr/local/rma/rma_setup/rma

; TmpDir
; Parameter is optional. For some tests (CPU, Process and Shell Script) agent
; creates temporary files. RMA searches for temporary directory in the
; following order:
; - directory that specified by this option (TMPDIR)
; - directory that specified by "TMPDIR" environment variable
; - directory that specified by "TMP" environment variable

; - if non of these parameters specified or specified directory doesn't
; exist, RMA uses current directory

TmpDir =

; Optional PID file
; A PID-File is a file containing the process identification number (pid) that
; allows other programs to find out the pid of a running agent.
; RMA started in interactive mode ignores this parameter.

; PidFile = /var/run/rma.pid

; Comment - here you may specify a comment (actually you may type any text
; here, it could be a simple recognizable name or an identifier for this
; agent). This helps to identify agents easier.

Comment=RMA for FreeBSD/Linux/Solaris

;------------------------- Connection parameters -------------------------

; Optional parameter. Can be useul when system has several network interfaces.

Host=

; Port - specifies the TCP port number which RMA utilizes to listen for
; incoming connections. Default setting is #1055.

Port=1055

; Timeout - the maximum amount of time (in miliseconds) that agent will keep
; waiting for the complete request packet from HostMonitor (after initial
; TCP connection established) before dropping the connection.

Timeout=5000

; Password - minimum six character length password. Using of an empty password
; is not permitted. The password is required for every communication session
; between RMA and HostMonitor or RMA and RMA Manager. All traffic between RMA
; and HostMonitor or RMA and RMA Manager is encrypted and the password itself
; is never transmitted through the network without encryption.

Password=root@test

;-------------------------------- Logging --------------------------------

[Logging]

; Successful audit log
; here you may specify a log file where agent will store information about
; successfully accepted connections. This log has no use when everything
; works well (it then just takes space on the hard drive), but you may found
; it really helpful when a sophisticated network problem has to be fixed.
; If you specify just the name of the file (without a full path), an agent
; will store a log in the same directory where configuration file located.

LogSuccess=0
OkLogFile=log.txt

; Failure audit log
; you may specify another log file where an agent will store information about
; rejected requests. E.g.: connections from an IP addresses that are not
; allowed or connections with invalid password, etc. Log file is a simple
; text file that contains date of the event, remote IP address from which
; an attempt of connection has occurred and information about the error.
; If you specify just the file name (without path), an agent will store it

; in the same directory where configuration file located.

LogFails=1
BadLogFile=log.txt

; Verbose Log
; This log is used when you start RMA with -v command line parameter. In
; this case RMA will store various information about each connection.

VerboseLogFile=log_verbose.txt

;--------------------------- Security settings ---------------------------

[IncomeFilter]

; Enable or disable accepting connections from any IP address
; FilterActive=0 will allow RMA to accept control commands from any IP
; address (as long as the incoming connection provides correct password)
; Set FilterActive=1 and RMA will accept connections only from the addresses
; that specified in by FilterList parameter (password is required as always).

FilterActive=0
FilterList=127.0.0.1 192.168.1.10 192.168.1.12 192.168.1.101 192.168.1.102
FilterMarks=11111


[RemoteManagment]
; Enable remote updates from address
; this option allows remote updates of the RMA code (e.g. when a new version
; is available) from the IP address being provided. To upgrade an array of
; remote agents you may use RMA Manager. Of course all operations with agents
; are encrypted and password protected but this option increases security
; even more.
; Note: Instead of single IP address you may specify a list and/or a range of
; IP addresses. IP addresses in the list should be separated by comma. Dash
; is used to define a range of addresses.
; Example: "UpdateAddr=127.0.0.1, 192.168.13.10 - 192.168.13.99"

AllowUpdates=1
UpdateAddr=192.168.1.100-192.168.1.105, 192.168.1.12, 127.0.0.1

; Enable remote management from address
; this option sets the IP address from which it is allowed to control and
; manage RMA. Using RMA Manager installed on the system with that IP address
; you will be able to change agent's settings remotely, also you will be
; able to restart and terminate an agent.
; Note: Instead of single IP address you may specify a list and/or a range of
; IP addresses. IP addresses in the list should be separated by comma. Dash
; is used to define a range of addresses.
; Example: "ManageAddr=127.0.0.1, 192.168.13.10 - 192.168.13.99"

AllowManage=1
ManageAddr=192.168.1.100-192.168.1.105, 192.168.1.12, 127.0.0.1


[EnabledTests]
; specifies the list of tests methods allowed for execution by this RMA.
; To enable the test assign 1 to the parameter, to disable the test assign 0
; to the parameter

Ping=1
TCP=1
UDP=1
UNC=1
FolderSize=1
CountFiles=1
FileExists=1
TextLog=1
FileCRC=1
CompareFiles=1
Process=1
CPUUsage=1
Script=1
External=1
ODBC=1
SNMP=1
ShellScript=1

[EnabledActions]
; specifies the list of action methods allowed for execution by this RMA.
; To enable the action assign '1' to the parameter, to disable the action
; assign '0' to the parameter

ExecuteAction=0
TcpUdpAction=1
SyslogAction=1

[Tests]
; Following parametrs provide the path to specialized scripts that RMA needs
; to perform some tests (such as CPU Usage and Process tests). These tests
; were implemented as external scripts to simplify customization for various
; systems. You may easily modify scripts using any text editor.
; If you specify just the name of the file (without a full path), an agent
; will assume that script is located in the same directory where the agent is

; Provides the path to a script that returns current CPU Usage
CPUUsageScript=cpu.sh
; Provides the path to a script that returns current number of running
; instances of the specified process
ProcCntScript=proccnt.sh

; Provides the path to a script that returns list of started processes.
ProcListScript=proclist.sh

; ==========================================================================
; end of ini file

:wq!

[root@DB01 rma_setup]# chmod -R 777 /usr/loal/rma/ rma.ini

[root@DB01 rma_setup]# ./rma -d rma.ini

[root@DB01 rma_setup]#lsof -n -i:1055
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
rma 25501 root 3u IPv4 459149 TCP *:ansyslmd (LISTEN)
[root@DB01 rma_setup]# ps -ef|grep rma
root 25501 1 0 14:28 ? 00:00:00 ./rma -d rma.ini
root 26103 25773 0 14:48 pts/1 00:00:00 grep rma
[root@DB01 rma_setup]#kill -9 25501
[root@DB01 rma_setup]# ./rma -d rma.ini
-------------------------------------------------------------
Application: RMA (Remote Monitoring Agent for HostMonitor)
Version: 1.28 for Linux (Red Hat, Mandrake, SuSE)
Copyright: 2004 - 2009 Alexander Kozlov
web: http://www.ks-soft.net
e-mail: support@ks-soft.net
-------------------------------------------------------------
Command line checking .. Ok
Settings checking .. Ok
CPU testing .. Ok
Basic encyption checking .. Ok
RMA encyption checking .. Ok
Sock testing .. Ok
Daemon started
[root@DB01 rma_setup]#
-------------------------------------------------------------

Finished, go HostMonitor main utility configuration interface to complete the agent addtion .

posted on 2011-09-25 03:44  andly96  阅读(1116)  评论(0)    收藏  举报