Tasks

Introduction

As at version 2.0.6 of Open-AudIT we have rewritten the tasks functionality.

Tasks now offer full CRON type scheduling under both Linux and Windows. There is a single entry in either cron (/etc/cron.d/open-audit) or under Windows Task Manager (open-audit). This task runs every minute and checks the list of tasks within Open-AudIT for those that should be run. If there is a scheduled match, the task(s) is executed.

Tasks can be one of several distinct types: Baseline, Discovery, Report, Query, Summary or Collector.

Special Note - If you are using https for Open-AudIT, you will need to manually edit the files /usr/local/omk/bin/open-audit_tasks.[sh|vbs]. You will need to update the URL to reflect the https prefix. To use https, there is a line below that should be uncommented, and the regular line commented out. that's all there is to it.

Join Paul McClendon, an Opmantek Support Engineer, as he demonstrates how to schedule tasks to run automatically in Open-AudIT.

Listing Tasks

All scheduled tasks are listed in the Admin section of the Open-AudIT Enterprise menu.

Menu -> Admin -> Tasks -> List Tasks. From this screen, you can add, remove and edit tasks.

Creating

All tasks can be created the same in Windows and Linux. Tasks use the CRON method for scheduling execution.

Minute: (0-59)
Hour: (0-23)
Day of Month: (1-31)
Month: (1-12)
Day of Week: (0-6)

For a primer on cron, see this Wikipedia page:  https://en.wikipedia.org/wiki/Cron

On the Tasks List page, click the "Add New" button to configure a task.

Choose the "type" of the task from the first drop down. This will configure the additional fields required depending on the type of task. 

If the Open-AudIT Server has Collectors reporting to it, an additional drop down is provided. You can select this to specify which Collector the task should run on. Only Discovery tasks are supported for Collectors.

Baselines

Once you have generated a Baseline Definition you can schedule it to be run against a specified group of devices.

Collectors

Collector tasks are automatically setup when the collector feature is enabled. Collector tasks should not be created directly by users. Collector tasks can have their frequency edited after creation. If the Open-AudIT Server has Collectors reporting to it, an additional drop down is provided. You can select this to specify which Collector the task should run on. Only Discovery tasks are supported for Collectors.

Discoveries

Setting up Discovery on a subnet is almost identical to running a regular Discovery via the web interface. The only additional items are the scheduled hour and day(s) and a name for the Scheduled Task itself. You can take advantage of this to schedule multiple discoveries using different sets of credentials.

As per the Subnet Discovery, the Active Directory Discovery is also simply the same fields as a regular Active Directory Discovery with the addition of a day, hour(s) and name.

If the Open-AudIT Server has Collectors reporting to it, an additional drop down is provided. You can select this to specify which Collector the task should run on. Only Discovery tasks are supported for Collectors. Specify the same items as a regular Discovery, but provide the alternate Collector to run this task.

Reports

When you enable a Report to be run on a schedule, the report is emailed to your chosen address. You must have set up email via menu -> Admin -> Enterprise -> Email Config. We also have a "test email" button on that page. Input your details, save it and then test it. You should have a modal box that informs you if it successful or not and obviously a test email should arrive if it is successful. Once you have email configured, your scheduled reports can be configured.

Provide a name, optional description, choose 'Report' type, select the desired report, provide an email address, choose a format and set the schedule.

Provide an hour (hour only, no minutes as yet), give the task a name (this is not the name of the actual scheduled report itself), select which days you would like the report run, choose which report you would like run, supply an email address and choose a report format and you're done.

Reports will be sent with an email body of the report (in html format) and the report attached in the requested format.

Queries

Queries take the same arguments as Reports.

Summaries

Summaries take the same arguments as Reports.


Database Schema

The database schema can be found in the application is the user has database::read permission by going to menu: Admin -> Database -> List Tables, then clicking on the details button for the table.


API / Web Access

You can access the collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see The Open-AudIT API documentation for further details.


Default Items

Shipped are a set of default items. These can be found by going to menu: Help → Defaults → Discovery Scan Options.