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 |
|
|
|
3 |
Installation Instructions
|
|
|
4 |
|
|
|
5 |
# target directory normally either /opt/sysinfo_client (Linux) or /usr/local/opt/sysinfo_client (BSD)
|
|
|
6 |
svn co http://svn.dailydata.net/svn/camp_sysinfo_client_3 /your/target/directory/camp/sysinfo_client
|
|
|
7 |
/your/target/directory/sysinfo_client/installer/setup
|
|
|
8 |
|
|
|
9 |
Resulting structure (default Linux install)
|
|
|
10 |
|
|
|
11 |
/opt/camp/sysinfo_client - Primary script (sysinfo_client) and libraries
|
|
|
12 |
/opt/camp/sysinfo_client/modules - scripts to be run to gather data
|
|
|
13 |
/opt/camp/sysinfo_client/scripts - transports to send results to another machine
|
|
|
14 |
/etc/camp/sysinfo_client - Configuration file(s)
|
|
|
15 |
/etc/camp/sysinfo_client/modules - optional location for local scripts to be run to gather data
|
|
|
16 |
/etc/camp/sysinfo_client/scripts - optional location for local scripts to transport results to master machine
|
|
|
17 |
/etc/cron.daily/sysinfo_client - soft link to executable
|
|
|
18 |
/etc/server_info - optional file to identify location, owner, etc... (see installer/server_info.sample)
|
|
|
19 |
|
|
|
20 |
FreeBSD install moves /opt to /usr/local/opt, and /etc/ to /usr/local/etc with cron link going into /etc/periodic/daily
|
|
|
21 |
|
|
|
22 |
opnSense is basic FreeBSD except cron done via config.d by placing an action file in /usr/local/opnsense/service/conf/actions.d
|
|
|
23 |
|
|
|
24 |
Operation:
|
|
|
25 |
|
|
|
26 |
When sysinfo_client is called
|
|
|
27 |
load and verify the config file, creating a structure in memory (hash)
|
|
|
28 |
run every script with the executable flag set in the modules/ directory
|
|
|
29 |
run every script with the executable flag set in /etc/..../modules directory
|
|
|
30 |
attempt each transport defined in config, from lowest priority to highest, until one succeeds
|
|
|
31 |
|
|
|
32 |
Modules
|
|
|
33 |
Each module file should have one parameter with the location of library.pm (directory only, do not include library.pm)
|
|
|
34 |
Modules must fail gracefully, identifying if they are not applicable to an existing machine (ie if a FreeBSD machine, don't try
|
|
|
35 |
to run Linux specific commands)
|
|
|
36 |
Modules return 0 or more tab delimited lines containing category, sub-category, key, value
|