Subversion Repositories camp_sysinfo_client_3

Rev

Rev 244 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

the scripts directory contains scripts which transmit the YAML data file to "someplace else". The order and inclusion is
defined in the configuration file under the transports tag.

Scripts must be Perl, and must have a subroutine named 'doit' accepting two parameters; a hash reference with parameters needed by 
the transport script and a string containing the data to be transmitted.

If you write your own, put it in <confdir>/scripts to avoid overwriting on upgrade.

Scripts included are:

== save_local

Saves the output locally. 
Even on systems where another script is preferred, this should be defined in the config file with an index larger than everything else
Target directory is defined in the configuration file with the key 'output directory'
Target file name is calculated by concating 'report date', 'client name', 'host name' and 'serial number' separated by underscores

== sendEmailScript

Sends report as an attachment to an e-mail.
WARNING: Currently, this script requires sendEmail by Brandon Zehm (https://github.com/zehm/sendEmail)

Parameters include:

mailServer: Target mail server
mailTo: mail account on target system
mailSubject: Subject header

For Authenticated SMTP
smtpUser: Authenticated user on target system
smtpPass: Authenticated user on target system

Optional:
mailFrom
mailCC
mailBCC
logFile
attachment
tls

== upload_http

script uploads output to an cgi script (sample included as upload_file.php with test_upload.html to test script manually)

Parameters include: 
URL: url of upload script to send file to

keys which are matched to <INPUT> on upload form for sample script
'key for client': client
'key for date': report_date
'key for hostname': hostname
'key for report': report
'key for serial number': serialnumber