Subversion Repositories camp_sysinfo_client_3

Rev

Rev 237 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
226 rodolico 1
Set of scripts designed to audit a Linux or Unix server, sending the results as a YAML file for additional processing
2
 
236 rodolico 3
sysinfo-client (main program) reads your config file, then runs each applicable script in <installdir>/modules and <confdir>/modules.
4
The output of all three (config and the modules directory) are a Perl hash, which is converted to a YAML representation.
5
The YAML file is then transmitted to another server using processes stored in <installdir>/scripts and/or <confdir>/scripts
6
 
7
<installdir>/* are designed to be updated but <confdir>/* is NOT modified by updates (unless requested).
8
 
226 rodolico 9
Installation Instructions
10
 
11
# target directory normally either /opt/sysinfo_client (Linux) or /usr/local/opt/sysinfo_client (BSD)
12
svn co  http://svn.dailydata.net/svn/camp_sysinfo_client_3 /your/target/directory/camp/sysinfo_client
13
 
236 rodolico 14
Now, either manually configure (see <installdir>/install/sysinfo-client.conf.template.yaml) or run 
15
<installdir>/installer/setup.
16
 
17
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.
18
You can also run the individual scripts in the install directory (see setup for correct order)
19
 
226 rodolico 20
Resulting structure (default Linux install)
21
 
22
/opt/camp/sysinfo_client         - Primary script (sysinfo_client) and libraries
23
/opt/camp/sysinfo_client/modules - scripts to be run to gather data
24
/opt/camp/sysinfo_client/scripts - transports to send results to another machine
25
/etc/camp/sysinfo_client         - Configuration file(s)
26
/etc/camp/sysinfo_client/modules - optional location for local scripts to be run to gather data
27
/etc/camp/sysinfo_client/scripts - optional location for local scripts to transport results to master machine
28
/etc/cron.daily/sysinfo_client   - soft link to executable
29
/etc/server_info                 - optional file to identify location, owner, etc... (see installer/server_info.sample)
30
 
31
FreeBSD install moves /opt to /usr/local/opt, and /etc/ to /usr/local/etc with cron link going into /etc/periodic/daily
32
 
33
opnSense is basic FreeBSD except cron done via config.d by placing an action file in /usr/local/opnsense/service/conf/actions.d
34
 
35
Operation:
36
 
37
When sysinfo_client is called
38
   load and verify the config file, creating a structure in memory (hash)
39
   run every script with the executable flag set in the modules/ directory
40
   run every script with the executable flag set in /etc/..../modules directory
41
   attempt each transport defined in config, from lowest priority to highest, until one succeeds
42
 
43
Modules
44
   Each module file should have one parameter with the location of library.pm (directory only, do not include library.pm)
45
   Modules must fail gracefully, identifying if they are not applicable to an existing machine (ie if a FreeBSD machine, don't try 
46
      to run Linux specific commands)
47
   Modules return 0 or more tab delimited lines containing category, sub-category, key, value