OPSCM LINUX AGENT V.3.1

1.0 ABOUT
	Agent developed to audit Linux text configuration files on OpMon.
	Completely developed using Perl, with the following dependencies:
		- Getopt::Std
		- LWP::UserAgent
		- Digest::MD5
		- MIME::Base64
		- URI::Escape

2.0 CONFIGURATION
	This agent was developed to run under nrpe's umbrella, so, first
	of all, you need to configure nrpe.cfg properly, adding the following
	line to it:

	command[opscm]=/path/to/opscm -s $ARG1$ -n $ARG2$ -d /path/to/opscm/config/dir/

2.1 CONFIGURATION ARGUMENTS
	The agent accepts a list of arguments, amongst them you will find:

	-s 
		The IP address of OpMon server
	-n
		The target hostname configured on OpMon.
		You may use OpMon's $HOSTNAME$ macro if you want to.
	-d
		Directory where to look for opscm agent configuration files.
		There are two different configuration files:

		scm-files.ini
			Global template file. Here you can list all files that
			you want to audit on OpMon.
			If a file listed here isn't present on monitored host,
			nothing gonna happen. It's a list of NOT mandatory files.

		scm-files-local.ini
			Local files to audit. Here you may list your files that
			are mandatory on the system. If a file present on this
			list isn't present on the system, an alert will appear
			on OpMon.

	-v
		Run the agent on verbose mode. For debug purpose only.

3.0 ABOUT CONFIGURATION FILES FORMAT
	Configuration files(scm-files.ini and scm-local-files.ini) format is
	a list of full paths to configuration files, one file per line.
	You may find an example on scm-files.ini on this package.

4.0 INSTALLING
	Create a directory under NRPE's root directory:

	$ mkdir /usr/local/opmon/libexec/opscm
	$ cd /usr/local/opmon/libexec/opscm

	Upload the following files to the recently created directory
		- opscm (the agent)
		- scm-files.ini (global template file)

	Optionally you can create a local file containing the MANDATORY
	files for the target host, called scm-local-files.ini

5.0 TESTING
	Just to look for unsolved dependencies, we strongly recommend to run
	as NRPE user(generally opuser) a basic test on the target host with 
	the following commands:

	$ su - opuser
	$ /usr/local/opmon/libexec/opscm/opscm
	Usage: opscm -s SCM_SERVER_URI -n SCM_NAMESPACE -d CONFIG_DIR
	-s SCM_SERVER_URI   - SCM server address. ex: 127.0.0.1, https://localhost:443
	-n SCM_NAMESPACE    - Configuration repo namespace. ex: localhost, linux-server
	-d CONFIG_DIR       - Base configuration directory. Default /usr/local/opmon/libexec/
	-v                  - Verbose output.


	$ /usr/local/opmon/libexec/opscm/opscm -s 192.168.10.2 -n HOSTNAME -d /usr/local/opmon/libexec/opscm/opscm/

	
