Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

Discoveries are preprepared data items that enable you to run a discovery upon a network in a single click, without entering the details of that network each and every time.

How Does it Work?

...


Excerpt

Creating a Discovery

A discovery can be created using the web interface if a user has a role that contains the discoveries::create permission. Go to menu: Discover ->

...

Discoveries -> Create Discoveries. There is also a

...

"+" button on the collection page.

Image Added

Image Added


View Discovery Details

Go to menu: Discover ->

...

Discoveries -> List Discoveries.

You will see a list of

...

attributes. You can view

...

an attribute by clicking on the

...

blue view button. You can also edit or delete

...

Discovery.


Image Added

Insert excerpt
ex_ discoveries execute
ex_ discoveries execute
nopaneltrue

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

...

Code Block
languagesql
CREATE TABLE `discoveries` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `description` varchar(100) NOT NULL DEFAULT '',
  `type` varchar(100) NOT NULL DEFAULT '',
  `devices_assigned_to_org` int(10) unsigned DEFAULT NULL,
  `devices_assigned_to_location` int(10) unsigned DEFAULT NULL,
  `network_address` varchar(100) NOT NULL DEFAULT '',
  `system_id` int(10) unsigned NOT NULL DEFAULT '0',
  `other` text NOT NULL,
  `device_count` int(10) unsigned NOT NULL DEFAULT '0',
  `discard` enum('y','n') NOT NULL DEFAULT 'n',
  `created_by` varchar(200) NOT NULL DEFAULT '',
  `created_on` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  `last_run` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  `complete` enum('y','n') NOT NULL DEFAULT 'n',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Example Database Entry

Connections are stored in the database in the "connections" table. A typical entry will look as below. 

Code Block
languagesql
                          id: 1
                        name: My Home Network
                      org_id: 1
                 description: 192.168.1.0/24
                        type: subnet
     devices_assigned_to_org: NULL
devices_assigned_to_location: NULL
             network_address: http://192.168.1.20/open-audit/
                   system_id: 0
                       other: {"subnet":"192.168.1.0\/24"}
                device_count: 0
                     discard: n
                  created_by: Administrator
                  created_on: 2016-12-05 14:31:24
                    last_run: 2000-01-01 00:00:00
                    complete: y

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.

...

API Routes

Request Method
ID
Action
Resulting Function
Permission Required
URL Example
Notes
Example Response
POSTn creatediscoveries::create/discoveriesInsert a new discoveries entry. 
GETy readdiscoveries::read/discoveries/{id}Returns a discovery's details. 
PATCHy updatediscoveries::update/discoveries/{id}Update an attribute of a discoveries entry. 
DELETEy deletediscoveries::delete/discoveries/{id}Delete a discoveries entry. 
GETn collectiondiscoveries::read/discoveriesReturns a list of discoveries. 

Web Application Routes

Request Method
ID
Action
Resulting Function
Permission Required
URL Example
Notes
GETncreatecreate_formdiscoveries::create/discoveries/createDisplays a standard web form for submission to POST /discoveries.
GETyupdateupdate_formdiscoveries::update/discoveries/{id}/updateShow the discovery's details with the option to update attributes using PATCH to /discoveries/{id}
GETnimportimport_formdiscoveries::create/discoveries/importDisplays a standard web form for submission to POST /discoveries/import.
POSTnimportimportdiscoveries::create/discoveries/importImport multiple discoveries using a CSV.

 

 

 

 

 

...