236 |
rodolico |
1 |
the scripts directory contains scripts which transmit the YAML data file to "someplace else". The order and inclusion is
|
|
|
2 |
defined in the configuration file under the transports tag.
|
|
|
3 |
|
|
|
4 |
Scripts must be Perl, and must have a subroutine named 'doit' accepting two parameters; a hash reference with parameters needed by
|
|
|
5 |
the transport script and a string containing the data to be transmitted.
|
|
|
6 |
|
|
|
7 |
If you write your own, put it in <confdir>/scripts to avoid overwriting on upgrade.
|
|
|
8 |
|
|
|
9 |
Scripts included are:
|
|
|
10 |
|
|
|
11 |
== save_local
|
|
|
12 |
|
|
|
13 |
Saves the output locally.
|
|
|
14 |
Even on systems where another script is preferred, this should be defined in the config file with an index larger than everything else
|
|
|
15 |
Target directory is defined in the configuration file with the key 'output directory'
|
|
|
16 |
Target file name is calculated by concating 'report date', 'client name', 'host name' and 'serial number' separated by underscores
|
|
|
17 |
|
|
|
18 |
== sendEmailScript
|
|
|
19 |
|
|
|
20 |
Sends report as an attachment to an e-mail.
|
|
|
21 |
WARNING: Currently, this script requires sendEmail by Brandon Zehm (https://github.com/zehm/sendEmail)
|
|
|
22 |
|
|
|
23 |
Parameters include:
|
|
|
24 |
|
|
|
25 |
mailServer: Target mail server
|
|
|
26 |
mailTo: mail account on target system
|
|
|
27 |
mailSubject: Subject header
|
|
|
28 |
|
|
|
29 |
For Authenticated SMTP
|
|
|
30 |
smtpUser: Authenticated user on target system
|
|
|
31 |
smtpPass: Authenticated user on target system
|
|
|
32 |
|
|
|
33 |
Optional:
|
|
|
34 |
mailFrom
|
|
|
35 |
mailCC
|
|
|
36 |
mailBCC
|
|
|
37 |
logFile
|
|
|
38 |
attachment
|
|
|
39 |
tls
|
|
|
40 |
|
|
|
41 |
== upload_http
|
|
|
42 |
|
|
|
43 |
script uploads output to an cgi script (sample included as upload_file.php with test_upload.html to test script manually)
|
|
|
44 |
|
|
|
45 |
Parameters include:
|
|
|
46 |
URL: url of upload script to send file to
|
|
|
47 |
|
|
|
48 |
keys which are matched to <INPUT> on upload form for sample script
|
|
|
49 |
'key for client': client
|
|
|
50 |
'key for date': report_date
|
|
|
51 |
'key for hostname': hostname
|
|
|
52 |
'key for report': report
|
|
|
53 |
'key for serial number': serialnumber
|