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

Compare with Current View Page History

« Previous Version 8 Next »


Introduction

With the 3.3.0 release of Open-AudIT we have introduced the concept of a Cluster. This intuitively maps to the idea of a web, database, file (or one of several other purposes) cluster in a given type (high availability, redundancy, scaling, etc).

Depending on the purpose of cluster chosen, the reporting will be slightly different.

For example, if you create a Cluster with a purpose of virtualisation, when you have added devices to it you will also see the virtual machines on those devices. An example is below.



Clusters are just another collection, like any other. An entry for them in Roles-Permissions has been created. You can Create, Read, Update and Delete them using the API like any other collection.

In the future we hope to be able to automatically detect Microsoft SQL and File clusters along with ESXi clusters.


Database Schema

CREATE TABLE `clusters` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `description` text NOT NULL,
  `type` enum('high availability','load balancing','performance','storage','other','') NOT NULL DEFAULT '',
  `purpose` enum('application','compute','database','storage','virtualisation','web','other','') NOT NULL DEFAULT '',
  `status` enum('active','inactive','other','') NOT NULL DEFAULT '',
  `configuration` enum('active/active','active/passive','N+1','N+M','N-to-1','N-to-N','other','') NOT NULL DEFAULT '',
  `environment` varchar(100) NOT NULL DEFAULT 'production',
  `scaling` enum('auto','fixed','other','') NOT NULL DEFAULT 'fixed',
  `retrieved_name` varchar(200) NOT NULL DEFAULT '',
  `retrieved_ident` varchar(200) NOT NULL DEFAULT '',
  `edited_by` varchar(200) NOT NULL DEFAULT '',
  `edited_date` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

And the table that stores the cluster ↔ device relationships.

In this regard, it's similar to the files and file tables and their relationship.

CREATE TABLE `cluster` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `system_id` int(10) unsigned DEFAULT NULL,
  `clusters_id` int(10) unsigned NOT NULL DEFAULT '0',
  `role` enum('head','node','storage','network','other','') NOT NULL DEFAULT '',
  `current` enum('y','n') NOT NULL DEFAULT 'y',
  `edited_by` varchar(200) NOT NULL DEFAULT '',
  `edited_date` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  PRIMARY KEY (`id`),
  KEY `system_id` (`system_id`),
  KEY `cluster_clusters_id` (`clusters_id`),
  CONSTRAINT `cluster_clusters_id` FOREIGN KEY (`clusters_id`) REFERENCES `clusters` (`id`) ON DELETE CASCADE,
  CONSTRAINT `cluster_system_id` FOREIGN KEY (`system_id`) REFERENCES `system` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


Example database entry

             id: 2
           name: Virtual
         org_id: 1
    description: 
           type: load balancing
        purpose: virtualisation
         status: active
  configuration: active/active
    environment: production
        scaling: fixed
 retrieved_name: 
retrieved_ident: 
      edited_by: Administrator
    edited_date: 2020-02-03 13:15:18

Example Device entry

         id: 2
  system_id: 353
clusters_id: 2
       role: node
    current: y
  edited_by: Administrator
edited_date: 2020-02-03 13:15:28


API / Web Access

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

API Routes


Request MethodIDActionResulting FunctionURL ExampleNotes
GETncollectionclusters::read/clustersReturns a list of clusters.
GETyreadclusters::read/clusters/{id}Returns a clusters details.
PATCHyupdateclusters::update/clusters/{id}Update an attribute of a clusters entry.
POSTncreateclusters::create/clustersInsert a new clusters entry.
DELETEydeleteclusters::delete/clusters/{id}Delete a clusters entry.


Web Application Routes

Request MethodIDActionResulting FunctionURL ExampleNotes
GETncreatecreate_form/clusters/createDisplays a standard web form for submission to POST /clusters.
GETyupdateupdate_form/clusters/{id}/updateShow the networks details with the option to update attributes using PATCH to /clusters/{id}







  • No labels