NOTE - As at Open-AudIT Enterprise 1.5.3, this feature has been depreciated. You can still get to the configuration via /omk/configuration/oae/reports, however there is no longer a link in the GUI to this. You should now use Scheduled Tasks for all Report Scheduling.

NOTE - This has been made redundant by the inclusion of  Scheduled Task setup in Open-AudIT Enterprise v1.5.1.

Introduction

Open-AudIT Enterprise brings additional features to leverage your Open-AudIT installation - Dashboard, Map and Scheduled Reports. Schedule Reports are designed to run on a schedule and send the output in desired format to either an email address or file store.

Scheduling is ideally designed to be run at most once per day. The (Windows) Scheduled Task or (Linux) cron job is usually designed to run at 2am. By running at this time you will capture the complete data for the previous day.

Running the job

In Windows you should create a Scheduled Task to schedule the script c:\omk\conf\oae.vbs to run at 2am each day using cscript.

In Linux you should create a cron schedule to run /usr/local/omk/conf/oae.cron at 2am each day.

Email Configuration

NEW - Now in v1.0.4 we have a web front end for configuring email. In Open-AudIT Enterprise, you can click on the menu bar System -> Email. The configuration items have help buttons to inform you of what that attribute is for.


The next section on editing the file should no longer be required. It is left here in the case that manual editing is required for some unforeseen reason.

If a report is to be emailed, the section of the configuration file (Linux) /usr/local/omk/conf/opCommon.nmis or (Windows) c:\omk\conf\opCommon.nmis dealing with email should be completed. The initial config is below. 

'email' => {
'mail_domain' => 'yourdomain.com',
'mail_from' => ',
'mail_password' => 'your_password',
'mail_server' => 'smtp.yourdomain.com',
'mail_server_port' => 25,
'mail_use_sasl' => 'false',
'mail_user' => '
},

You should edit this config to reflect your particular environment. This is for sending email containing reports from the Open-AudIT Enterprise server. Users receiving emailed reports are configured in the next section.

The conf/oae_reports.json file.

NEW - Now in v1.0.4 we have a web front end for configuring the report schedule. In Open-AudIT Enterprise, you can click on the menu bar System -> Report Schedule. The configuration items have help buttons to inform you of what that attribute is for.


The next section on editing the file should no longer be required. It is left here in the case that manual editing is required for some unforeseen reason.

The reports for Scheduled reports are configured in the file conf/oae_reports.json. For any reports to be run as part of the Scheduled Reports feature, this file is where you need to work. The following is an example from the file for a single report. We shall examine the options for each attribute in details below.

{
"schedule_id": "2",
"user_id": "OAE-Dashboard",
"report_id": "",
"report_name": "Daily Discovered Devices",
"report_filename": "DailyDiscoveredDevices.xml",
"group_id": "1",
"group_name": "All Devices",
"first_attribute": "<CURRENT_DATE>",
"format": "table_formatted",
"destination": "dashboard", 
"destination_address": "",
"schedule": "daily",
"schedule_hour": "11",
"schedule_from": "2013-06-05",
"last_run": "2013-06-10 09:00:01",
"last_run_status": "success",
"enabled": "y"
},

schedule_id: This should be a unique incrementing integer.

user_id: In the present code, this should always be set to the default value of OAE-Dashboard. The program will retrieve the access credentials from the opCommon.nmis file as described in the Open-AudIT Enterprise - Install Guide (alpha 1).

report_id: If running a report that is already in the Open-AudIT database, you can specify the report's id here. This will prevent the need to supply a report definition XML file as below.

report_name: The human readable name of the report. Will be used to title the report.

report_filename: If you are running a report that is not present in the Open-AudIT database, you can supply a report definition file in XML format. The format of these files are the same as 'normal' Open-AudIT reports. Creating reports using report definition XML files is detailed on the How to create a Query definition page.

group_id: If you wish to restrict a report to a certain group, use the group id from the Open-AudIT database here. To run a report against all production status devices in the Open-AudIT database, a value of 1 should be used. This is always the Open-AudIT group id for "All Production Devices" group.

group_name: Used as a title in the filename or email subject. Typically for a filename or email subject it will be titled thus: $report_name . " for " . $group_name . " on " . $date with the correct filename extension if being saved.

first_attribute: Is an optional attribute. Used for adding additional information to a report query. Special values are <CURRENT_DATE> and <CURRENT_DATE>-30. When used, CURRENT_DATE will have the actual date of the request substituted and (if specified) 30 days removed.

format: Valid values are csv, excel, xml, json, html, html_formatted. The difference between html and html_formatted being the former is a straight dump of the columns into table format where-as html_formatted results in a table formatted as per the Open-AudIT web interface and is typically prettier to view.

destination: Valid values are file and email.

destination_address: A file path on the file system or a valid email address.

schedule: Permitted values are daily, weekly, monthly, quarterly, yearly.

schedule_hour: The hour of the day in zero padded 24hour format that you wish the report to run.

schedule_from: The first date the report should run from if it matches the schedule. This should be a zero padded date of the form YYYY-MM-DD. You may wish to use this to create scheduled reports and start them running at a date in the future.

last_run: Not used at present. Leave as default.

last_run_status: Not used at present. Leave as default.

enabled: This should be set to y to show that this report should be run if it matches the schedule. Set it to n to prevent the report from running.

  • No labels