Subversion Repositories camp_sysinfo_client_3

Rev

Rev 226 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

Set of scripts designed to audit a Linux or Unix server, sending the results as a YAML file for additional processing

sysinfo-client (main program) reads your config file, then runs each applicable script in <installdir>/modules and <confdir>/modules.
The output of all three (config and the modules directory) are a Perl hash, which is converted to a YAML representation.
The YAML file is then transmitted to another server using processes stored in <installdir>/scripts and/or <confdir>/scripts

<installdir>/* are designed to be updated but <confdir>/* is NOT modified by updates (unless requested).

Installation Instructions

# target directory normally either /opt/sysinfo_client (Linux) or /usr/local/opt/sysinfo_client (BSD)
svn co  http://svn.dailydata.net/svn/camp_sysinfo_client_3 /your/target/directory/camp/sysinfo_client

Now, either manually configure (see <installdir>/install/sysinfo-client.conf.template.yaml) or run 
<installdir>/installer/setup.

NOTE: setup is still beta, so use with care. However, it is designed to be non-destructive, so running it more than once is fine.
You can also run the individual scripts in the install directory (see setup for correct order)

Resulting structure (default Linux install)

/opt/camp/sysinfo_client         - Primary script (sysinfo_client) and libraries
/opt/camp/sysinfo_client/modules - scripts to be run to gather data
/opt/camp/sysinfo_client/scripts - transports to send results to another machine
/etc/camp/sysinfo_client         - Configuration file(s)
/etc/camp/sysinfo_client/modules - optional location for local scripts to be run to gather data
/etc/camp/sysinfo_client/scripts - optional location for local scripts to transport results to master machine
/etc/cron.daily/sysinfo_client   - soft link to executable
/etc/server_info                 - optional file to identify location, owner, etc... (see installer/server_info.sample)

FreeBSD install moves /opt to /usr/local/opt, and /etc/ to /usr/local/etc with cron link going into /etc/periodic/daily

opnSense is basic FreeBSD except cron done via config.d by placing an action file in /usr/local/opnsense/service/conf/actions.d

Operation:

When sysinfo_client is called
   load and verify the config file, creating a structure in memory (hash)
   run every script with the executable flag set in the modules/ directory
   run every script with the executable flag set in /etc/..../modules directory
   attempt each transport defined in config, from lowest priority to highest, until one succeeds
   
Modules
   Each module file should have one parameter with the location of library.pm (directory only, do not include library.pm)
   Modules must fail gracefully, identifying if they are not applicable to an existing machine (ie if a FreeBSD machine, don't try 
      to run Linux specific commands)
   Modules return 0 or more tab delimited lines containing category, sub-category, key, value