X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;f=clients%2FGD%2FFSMon%2FFsmonDB.sql;fp=clients%2FGD%2FFSMon%2FFsmonDB.sql;h=0d0e0911376c4398f00219f4b66ed00f9c2bf8a2;hb=a8c84d2892f07a6863b68a11eb0a4a79ffd71fb5;hp=0000000000000000000000000000000000000000;hpb=95384f94f88aceeb5eef2d322210ba4a438b6512;p=clearscm.git diff --git a/clients/GD/FSMon/FsmonDB.sql b/clients/GD/FSMon/FsmonDB.sql new file mode 100644 index 0000000..0d0e091 --- /dev/null +++ b/clients/GD/FSMon/FsmonDB.sql @@ -0,0 +1,81 @@ +-------------------------------------------------------------------------------- +-- +-- File: FsmonDB.sql +-- Revision: 0.1 +-- Description: Database definition for fsmon +-- Author: Andrew@ClearSCM.com +-- Created: Thu Dec 11 13:43:06 MST 2008 +-- Modified: +-- Language: SQL +-- +-- Copyright (c) 2008, General Dynamics, all rights reserved +-- +-------------------------------------------------------------------------------- +-- Warning: The following line will delete the old database! +drop database if exists fsmon; + +-- Create a new database +create database fsmon; + +-- Now let's focus on this new database +use fsmon; + +-- system: Contains information about the various machines that we are +-- monitoring file systems on + +create table system ( + name varchar(255) not null, + owner tinytext, + description text, + ostype enum ( + "Linux", + "Unix", + "Windows" + ) not null, + osversion tinytext, + username tinytext, + password tinytext, + prompt tinytext, + shellstyle enum ( + "sh", + "csh" + ) not null, + + primary key (name) +) engine = InnoDB; + +-- filesystems: Describes the filesystems for a system +create table filesystems ( + sysname varchar(255) not null, + mount varchar(255) not null, + fs tinytext not null, + + primary key (sysname, mount) +) engine = InnoDB; + +-- fs: Contains a snapshot reading of a filesystem at a given date and time +create table fs ( + sysname varchar(255) not null, + mount varchar(255) not null, + timestamp datetime not null, + size bigint, + used bigint, + free bigint, + reserve bigint, + + primary key (sysname, mount, timestamp), + foreign key (sysname, mount) + references filesystems (sysname, mount) + on delete cascade + on update cascade +) engine = InnoDB; + +grant all privileges + on fsmon.* + to fsmonadm@"%" + identified by "fsmonadm" with grant option; + +grant select + on fsmon.* + to fsmon@"%" + identified by "fsmon";