Subversion Repositories computer_asset_manager_v1

Rev

Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11 Rev 12
Line 39... Line 39...
39
// end of the nowdoc, now on to the regular stuff 
39
// end of the nowdoc, now on to the regular stuff 
40
 
40
 
41
// Configuration file for getSysinfoMail.php, parse_sysinfo.php and other files
41
// Configuration file for getSysinfoMail.php, parse_sysinfo.php and other files
42
$configuration = array( 
42
$configuration = array( 
43
      // set this to where the files parsed from mail should be placed.
43
      // set this to where the files parsed from mail should be placed.
-
 
44
      // note, outpath will be removed in the future. It should be 'datapath/unprocessed_path'
-
 
45
      // until that is done.
-
 
46
      // in the future, datapath will define a root, then everything will be a subdirectory
-
 
47
      // of that; unprocessed, duplicate, and all processed files
-
 
48
      // processed files will be in datapath/YYYY/MM/filename
44
      'outpath' => '/home/rodolico/temp/sysinfo_reports/unprocessed',
49
      'outpath' => '/path/to/unprocessed/email', // this should be 'datapath/unprocessed_path'
45
      'logFile' => '/home/rodolico/temp/sysinfo_reports/errors.log',
50
      'logFile' => '/path/to/log/file/errors.log', // full path to an error file
46
      'datapath' => '/home/rodolico/temp/sysinfo_reports',
51
      'datapath' => '/path/to/root/of/reports', // the root of all files
47
      'unprocessed_path' => 'unprocessed',
52
      'unprocessed_path' => 'unprocessed', // subdirectory of datapath
48
      'getMailScript' => 'getSysinfoMail.php',
53
      'getMailScript' => 'getSysinfoMail.php', // name of the mail getter script
49
      'processMailScript' => 'parse_sysinfo.php',
54
      'processMailScript' => 'parse_sysinfo.php', // name of the report parser
50
      
55
      'reportScript' => 'sendReport.pl', // name of the report script
51
 
56
 
52
      // server connection information
57
      // server connection information
53
 
-
 
-
 
58
      // you can check multiple servers, accounts and mailboxes (folders)
-
 
59
      // only two are listed here, but it can be from one to however many you want
54
      'servers' => array( 
60
      'servers' => array( 
55
                        array ( 
61
                        array ( 
56
                           'servername'      => 'book.dailydata.net', 
-
 
57
                           'port'            => 143,
-
 
58
                           'ssl'             => false,
-
 
59
                           'mailbox'         => '.Processed',
-
 
60
                           'username'        => 'serverstats',
-
 
61
                           'password'        => 'sachemic',
-
 
62
                           'deleteProcessed' => false,
-
 
63
                           'enabled'         => false
-
 
64
                           ),
-
 
65
                        array ( 
-
 
66
                           'servername'      => 'book.dailydata.net', 
-
 
67
                           'port'            => 143,
-
 
68
                           'ssl'             => false,
-
 
69
                           'mailbox'         => 'Processed.2011',
-
 
70
                           'username'        => 'serverstats',
-
 
71
                           'password'        => 'sachemic',
-
 
72
                           'deleteProcessed' => true,
-
 
73
                           'enabled'         => false
-
 
74
                           ),
-
 
75
 
-
 
76
                        array ( 
-
 
77
                           'servername'      => 'book.dailydata.net', 
-
 
78
                           'port'            => 143,
-
 
79
                           'ssl'             => false,
-
 
80
                           'mailbox'         => 'Processed.2012',
-
 
81
                           'username'        => 'serverstats',
-
 
82
                           'password'        => 'sachemic',
-
 
83
                           'deleteProcessed' => true,
-
 
84
                           'enabled'         => false
-
 
85
                           ),
-
 
86
 
-
 
87
                        array ( 
-
 
88
                           'servername'      => 'book.dailydata.net', 
-
 
89
                           'port'            => 143,
-
 
90
                           'ssl'             => false,
-
 
91
                           'mailbox'         => 'Processed.2013',
-
 
92
                           'username'        => 'serverstats',
-
 
93
                           'password'        => 'sachemic',
-
 
94
                           'deleteProcessed' => true,
-
 
95
                           'enabled'         => false
-
 
96
                           ),
-
 
97
 
-
 
98
                        array ( 
-
 
99
                           'servername'      => 'book.dailydata.net', 
62
                           'servername'      => 'smtp.server.or.ip', 
100
                           'port'            => 143,
63
                           'port'            => 143,
101
                           'ssl'             => false,
64
                           'ssl'             => false,
102
                           'mailbox'         => 'Processed.2014',
65
                           'mailbox'         => 'mailbox.name',
103
                           'username'        => 'serverstats',
66
                           'username'        => 'username',
104
                           'password'        => 'sachemic',
67
                           'password'        => 'password',
105
                           'deleteProcessed' => true,
68
                           'deleteProcessed' => false,  // true will delete once they are downloaded
106
                           'enabled'         => false
69
                           'enabled'         => false   // false means this entry will be ignored
107
                           ),
70
                           ),
108
 
-
 
109
                        array ( 
71
                        array ( 
110
                           'servername'      => 'book.dailydata.net', 
72
                           'servername'      => 'smtp.server.or.ip', 
111
                           'port'            => 143,
73
                           'port'            => 143,
112
                           'ssl'             => false,
74
                           'ssl'             => false,
113
                           'mailbox'         => 'Processed.2015',
75
                           'mailbox'         => 'mailbox.name',
114
                           'username'        => 'serverstats',
76
                           'username'        => 'username',
115
                           'password'        => 'sachemic',
77
                           'password'        => 'password',
116
                           'deleteProcessed' => true,
78
                           'deleteProcessed' => false,  // true will delete once they are downloaded
117
                           'enabled'         => false
79
                           'enabled'         => false   // false means this entry will be ignored
118
                           ),
80
                           ),
119
 
-
 
120
                        array (
-
 
121
                           'servername'      => 'smtp.dailydata.net',
-
 
122
                           'port'            => 143,
-
 
123
                           'ssl'             => false,
-
 
124
                           'mailbox'         => 'INBOX',
-
 
125
                           'username'        => 'stats@dailydata.net',
-
 
126
                           'password'        => 'los,vce', 
-
 
127
                           'deleteProcessed' => false,
-
 
128
                           'enabled'         => false
-
 
129
                        ),
-
 
130
 
-
 
131
                        array (
-
 
132
                           'servername'      => 'smtp.dailydata.net',
-
 
133
                           'port'            => 143,
-
 
134
                           'ssl'             => false,
-
 
135
                           'mailbox'         => 'INBOX',
-
 
136
                           'username'        => 'test@dailydata.net',
-
 
137
                           'password'        => 'los,vce', 
-
 
138
                           'deleteProcessed' => true,
-
 
139
                           'enabled'         => true
-
 
140
                        )
-
 
141
                     ),
81
                     ),
-
 
82
      // your database connection information
-
 
83
      'datase' => array(
-
 
84
         'databaseServer' => 'localhost',
-
 
85
         'databaseUsername' => 'dbuser',
-
 
86
         'databasePassword' => 'dbpass',
-
 
87
         'database' => 'dbname',
-
 
88
      ),
-
 
89
      // you really need sendEmail.pl for this to work, as I've really written this around that
-
 
90
      // see README.txt. This sends the report at the end of the processing. You can comment out
-
 
91
      // the call to sendReport.pl in doReports.pl or rewrite the former.
-
 
92
      'sendReport' => array(
-
 
93
         'emailScript'=>'/opt/sendEmail/sendEmail.pl',
-
 
94
         'mailTo'=> 'who@gets.mail',
-
 
95
         'mailServer' => 'smtp.server.com:587',
-
 
96
         'mailSubject' => 'Sysinfo Report',
-
 
97
         'mailFrom' => 'sysinfo@mydomain.org',
-
 
98
         'logFile' => '/tmp/mail.log',
-
 
99
         'tls' => "'auto'",
-
 
100
         'smtpUser' => 'smtp@user.com', // for authenticated SMTP
-
 
101
         'smtpPass' => 'password',      // for authenticated SMTP
-
 
102
      ),
-
 
103
 
-
 
104
      // You really should not modify the following unless you know what you are doing
142
 
105
 
143
      // these are regex's that define what we want to capture. Everything between startKey and endKey, inclusive
106
      // these are regex's that define what we want to capture. Everything between startKey and endKey, inclusive
144
      // we then process it with eval, which is an anonymous function accepting one paramter (body) and returning
107
      // we then process it with eval, which is an anonymous function accepting one paramter (body) and returning
145
      // the array represented by the associated data definition
108
      // the array represented by the associated data definition
146
      'bodyContents' => array( 
109
      'bodyContents' => array( 
Line 161... Line 124...
161
                            'endTag' => '',
124
                            'endTag' => '',
162
                            'eval' => $eval_ini,
125
                            'eval' => $eval_ini,
163
                            )
126
                            )
164
                    ),
127
                    ),
165
 
128
 
166
      'datase' => array(
-
 
167
         'databaseServer' => 'localhost',
-
 
168
         'databaseUsername' => 'camp',
-
 
169
         'databasePassword' => 'camp',
-
 
170
         'database' => 'camp',
-
 
171
      ),
-
 
172
      'sendReport' => array(
-
 
173
         'emailScript'=>'/opt/sendEmail/sendEmail.pl',
-
 
174
         'mailTo'=> 'rodo@dailydata.net',
-
 
175
         'mailServer' => 'smtp.dailydata.net:587',
-
 
176
         'mailSubject' => 'Sysinfo Report',
-
 
177
         'mailFrom' => 'sysinfo@dailydata.net',
-
 
178
         'logFile' => '/tmp/mail.log',
-
 
179
         'tls' => "'auto'",
-
 
180
         'smtpUser' => 'stats@dailydata.net',
-
 
181
         'smtpPass' => 'UrLnuCp@G85',
-
 
182
      ),
-
 
183
 
-
 
184
   );
129
   );
185
   
130
   
186
   // here is where we actually generate the YAML
131
   // here is where we actually generate the YAML
187
   print yaml_emit( $configuration );
132
   print yaml_emit( $configuration );
188
   
133