Skip to end of banner
Go to start of banner

Devices

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Introduction

Devices are the core item of interest to Open-AudIT.

How Does it Work?

A device in Open-AudIT has an Open-AudIT specific name. This is distinct from its hostname, dns hostname, sysName or any other retrieved attribute. Open-AudIT will populate the name attribute based on the information it has determined about a device. The name can be overwritten by the user at any time. Where possible, the first option will be chosen and where possible on subsequent audits, will be changed to the first option: hostname, sysName, dns_hostname, IP address.

Creating a Devices Entry

Open-AudIT can have devices created directly from the web interface. This is useful for devices that 1 - Will not respond to a network scan, 2 - are not on the network, 3 - are not network capable (think ID Access Tokens).

A device can be created using the web interface if a user has a role that contains the devices::create permission. Go to menu: Manage-> Devices -> Create Devices. There is also a create button on the collection page.



Open-AudIT automatically populates attributes of devices that have been found during the audit process. However, it is possible to add devices manually in 3 different ways: 

  1. Manual input.
    Filling in the relevant attributes for the device.




  2. Copy and paste an audit report.
    We can add devices by pasting the text found in an audit report.



  3. Upload an audit report file.
    Upload a report file containing devices information.


View Device Details

Go to menu:  Manage -> Devices -> List Devices.

You will see a list of devices. This view allows you export the list of devices in CSV and JSON format.



You can view all the device's details by clicking on the purple view icon.



Import Multiple Devices

It is possible to import one or many devices using a CSV file, Audit Script Result, or a NMIS Nodes file.

Go to menu:  Manage -> Devices -> Import Devices from CSV (can also choose Audit Script Result or NMIS Nodes file.)

Below is an example of the required CSV format:

The minimum required attributes for attributes are 'name' and 'org_id'.

You should not include the edited_by and edited_date fields. These will be automatically set.

If you include the "id" field and set it with a number, that item will be updated rather than created.

You should use a header line containing the names of the columns you wish to populate, then your data lines below that.

"name","org_id","type","ip"
"mail","1","computer","192.168.1.110"
"router","1","router","192.168.1.1"
"laser","1","printer","192.168.1.10"

Export Devices

Go to menu:  Manage -> Devices -> Export Devices.

It is possible to export the devices details in generated CSV format files. 

Firstly,  we have to find the devices that we want to export, this can be done from search box, we can specify the IP address or hostname, the search function accepts partial matching. It can be left blank if you want to list all the devices.

The devices that match with the criteria will be listed in the second box. Select the device or devices (multiple selection is available) that we want to export.

Once we have the list of devices that we want to export, we select the relevant details of the devices from the 4 different sections (Devices, Software, Hardware and Settings).

Finally, we obtain a CSV file with our results by pressing the "Export" button. 

 

Database Schema

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

CREATE TABLE `system` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(100) NOT NULL DEFAULT '',
  `name` varchar(200) NOT NULL DEFAULT '',
  `ip` varchar(45) NOT NULL DEFAULT '',
  `hostname` varchar(100) NOT NULL DEFAULT '',
  `dns_hostname` varchar(100) NOT NULL DEFAULT '',
  `domain` varchar(100) NOT NULL DEFAULT '',
  `dns_domain` varchar(100) NOT NULL DEFAULT '',
  `dbus_identifier` varchar(255) NOT NULL DEFAULT '',
  `fqdn` text NOT NULL,
  `description` text NOT NULL,
  `type` varchar(50) NOT NULL DEFAULT '',
  `comments` text NOT NULL,
  `icon` varchar(50) NOT NULL DEFAULT '',
  `os_group` varchar(50) NOT NULL DEFAULT '',
  `os_family` varchar(50) NOT NULL DEFAULT '',
  `os_name` varchar(100) NOT NULL DEFAULT '',
  `os_version` varchar(50) NOT NULL DEFAULT '',
  `attached_system_id` int(10) DEFAULT NULL,
  `manufacturer` varchar(100) NOT NULL DEFAULT '',
  `model` varchar(200) NOT NULL DEFAULT '',
  `serial` varchar(200) NOT NULL DEFAULT '',
  `uptime` varchar(50) NOT NULL DEFAULT '',
  `form_factor` varchar(50) NOT NULL DEFAULT '',
  `os_bit` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `memory_count` int(10) unsigned NOT NULL DEFAULT '0',
  `processor_count` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `os_installation_date` date NOT NULL DEFAULT '2000-01-01',
  `printer_port_name` varchar(50) NOT NULL DEFAULT '',
  `printer_shared` varchar(50) NOT NULL DEFAULT '',
  `printer_shared_name` varchar(50) NOT NULL DEFAULT '',
  `printer_color` enum('y','n','') NOT NULL DEFAULT '',
  `printer_duplex` enum('y','n','') NOT NULL DEFAULT '',
  `status` varchar(100) NOT NULL DEFAULT '',
  `environment` enum('production','dev','dr','eval','pre-prod','test','train','uat') NOT NULL DEFAULT 'production',
  `class` enum('desktop','laptop','tablet','workstation','server','virtual server','virtual desktop','hypervisor','') NOT NULL DEFAULT '',
  `function` varchar(100) NOT NULL DEFAULT '',
  `owner` varchar(100) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `location_id` int(10) unsigned NOT NULL DEFAULT '1',
  `location_level` varchar(100) NOT NULL DEFAULT '',
  `location_suite` varchar(100) NOT NULL DEFAULT '',
  `location_room` varchar(100) NOT NULL DEFAULT '',
  `location_rack` varchar(100) NOT NULL DEFAULT '',
  `location_rack_position` varchar(100) NOT NULL DEFAULT '',
  `location_rack_size` int(10) unsigned NOT NULL DEFAULT '0',
  `location_latitude` float(10,6) NOT NULL,
  `location_longitude` float(10,6) NOT NULL,
  `asset_number` varchar(50) NOT NULL DEFAULT '',
  `vm_server_name` varchar(150) NOT NULL DEFAULT '',
  `vm_system_id` int(10) unsigned DEFAULT NULL,
  `vm_group` varchar(150) NOT NULL DEFAULT '',
  `cluster_name` varchar(150) NOT NULL DEFAULT '',
  `cluster_type` varchar(150) NOT NULL DEFAULT '',
  `invoice_id` int(10) unsigned DEFAULT NULL,
  `purchase_invoice` varchar(50) NOT NULL DEFAULT '',
  `purchase_order_number` varchar(50) NOT NULL DEFAULT '',
  `purchase_cost_center` varchar(50) NOT NULL DEFAULT '',
  `purchase_vendor` varchar(100) NOT NULL DEFAULT '',
  `purchase_date` date NOT NULL DEFAULT '2000-01-01',
  `purchase_service_contract_number` varchar(255) NOT NULL DEFAULT '',
  `lease_expiry_date` date NOT NULL DEFAULT '2000-01-01',
  `purchase_amount` varchar(50) NOT NULL DEFAULT '',
  `warranty_duration` int(5) unsigned NOT NULL DEFAULT '0',
  `warranty_expires` date NOT NULL DEFAULT '2000-01-01',
  `warranty_type` enum('','24x7x365','9x5x5','Next Business Day') NOT NULL DEFAULT '',
  `switch_system_id` int(10) DEFAULT NULL,
  `switch_port` int(10) unsigned NOT NULL DEFAULT '0',
  `patch_panel` varchar(45) NOT NULL DEFAULT '',
  `patch_panel_port` int(10) unsigned NOT NULL DEFAULT '0',
  `wall_port` varchar(100) NOT NULL DEFAULT '',
  `contact_name` varchar(50) NOT NULL DEFAULT '',
  `service_number` varchar(100) NOT NULL DEFAULT '',
  `service_provider` varchar(100) NOT NULL DEFAULT '',
  `service_type` varchar(100) NOT NULL DEFAULT '',
  `service_plan` varchar(100) NOT NULL DEFAULT '',
  `service_network` varchar(100) NOT NULL DEFAULT '',
  `unlock_pin` varchar(100) NOT NULL DEFAULT '',
  `serial_imei` varchar(100) NOT NULL DEFAULT '',
  `serial_sim` varchar(100) NOT NULL DEFAULT '',
  `nmis_group` varchar(50) NOT NULL DEFAULT '',
  `nmis_name` varchar(50) NOT NULL DEFAULT '',
  `nmis_role` varchar(50) NOT NULL DEFAULT '',
  `nmis_export` enum('y','n') NOT NULL DEFAULT 'n',
  `oae_manage` enum('y','n') NOT NULL DEFAULT 'y',
  `snmp_oid` text NOT NULL,
  `sysDescr` text NOT NULL,
  `sysObjectID` varchar(255) NOT NULL DEFAULT '',
  `sysUpTime` varchar(255) NOT NULL DEFAULT '',
  `sysContact` varchar(255) NOT NULL DEFAULT '',
  `sysName` varchar(255) NOT NULL DEFAULT '',
  `sysLocation` varchar(255) NOT NULL DEFAULT '',
  `first_seen` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  `last_seen` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  `last_seen_by` varchar(150) NOT NULL DEFAULT '',
  `last_user` varchar(150) NOT NULL DEFAULT '',
  `omk_uuid` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ip` (`ip`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;

A typical entry looks as below.

                              id: 2
                            uuid: 564D1270-6466-3F26-5A0C-CEA092593A6C
                            name: centos66
                              ip: 192.168.001.128
                        hostname: centos66
                    dns_hostname: centos66
                          domain: open-audit.lan
                      dns_domain: open-audit.lan
                 dbus_identifier: 
                            fqdn: centos66.open-audit.lan
                     description: 
                            type: computer
                        comments: 
                            icon: centos
                        os_group: Linux
                       os_family: CentOS
                         os_name: CentOS release 6.8 (Final)
                      os_version: 6.8
              attached_system_id: NULL
                    manufacturer: VMware
                           model: VMware Virtual Platform
                          serial: VMware-56 4d 12 70 64 66 3f 26-5a 0c ce a0 92 59 3a 6c
                          uptime: 960
                     form_factor: Virtual
                          os_bit: 64
                    memory_count: 1004136
                 processor_count: 1
            os_installation_date: 2016-05-19
               printer_port_name: 
                  printer_shared: 
             printer_shared_name: 
                   printer_color: 
                  printer_duplex: 
                          status: production
                     environment: production
                           class: 
                        function: 
                           owner: 
                          org_id: 1
                     location_id: 0
                  location_level: 
                  location_suite: 
                   location_room: 
                   location_rack: 
          location_rack_position: 
              location_rack_size: 0
               location_latitude: 0.000000
              location_longitude: 0.000000
                    asset_number: 
                  vm_server_name: 
                    vm_system_id: NULL
                        vm_group: 
                    cluster_name: 
                    cluster_type: 
                      invoice_id: NULL
                purchase_invoice: 
           purchase_order_number: 
            purchase_cost_center: 
                 purchase_vendor: 
                   purchase_date: 2000-01-01
purchase_service_contract_number: 
               lease_expiry_date: 2000-01-01
                 purchase_amount: 
               warranty_duration: 0
                warranty_expires: 2000-01-01
                   warranty_type: 
                switch_system_id: NULL
                     switch_port: 0
                     patch_panel: 
                patch_panel_port: 0
                       wall_port: 
                    contact_name: 
                  service_number: 
                service_provider: 
                    service_type: 
                    service_plan: 
                 service_network: 
                      unlock_pin: 
                     serial_imei: 
                      serial_sim: 
                      nmis_group: 
                       nmis_name: 
                       nmis_role: 
                     nmis_export: n
                      oae_manage: y
                        snmp_oid: 
                        sysDescr: 
                     sysObjectID: 
                       sysUpTime: 
                      sysContact: 
                         sysName: 
                     sysLocation: 
                      first_seen: 2017-04-25 22:12:32
                       last_seen: 2017-04-25 22:12:32
                    last_seen_by: audit
                       last_user: 
                        omk_uuid:           

API / Web Access

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

Access is provided as part of a roles permissions. Summaries is a standard resource and can have create, read, update and delete permissions.

The API routes below are usable from both a JSON Restful API and the web interface. The Web application routes are specifically designed to be called from the web interface (a browser).

API Routes

Request Method
ID
Action
Resulting Function
Permission Required
URL Example
Notes
Example Response
POSTn
createdevices::create/devicesInsert a new (manual) devices entry.
GETy
readdevices::read/devices/{id}Returns a devices details.
PATCHy
updatedevices::update/devices/{id}Update an attribute of a devices entry.
DELETEy
deletedevices::delete/devices/{id}Delete a devices entry.
GETn
collectiondevices::read/devicesReturns a list of devices.
POSTnimportimportdevices::create/devices/importImport multiple devices using a CSV.

Web Application Routes

Request Method
ID
Action
Resulting Function
Permission Required
URL Example
Notes
GETncreatecreate_formdevices::create/devices/createDisplays a standard web form for submission to POST /devices.
GETyupdateupdate_formdevices::update/devices/{id}Show the devices details with the option to update attributes using PATCH to /devices/{id}
GETnimportimport_formdevices::create/devices/importDisplays a standard web form for submission to POST /devices/import.





  • No labels