root/sql/tables/stratcon.event_criteria.sql

Revision 16e27d8b583833f08a7321bbf18cfa46a5341041, 2.0 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 4 years ago)

first whack at threshold configs

  • Property mode set to 100644
Line 
1 --
2 -- PostgreSQL database dump
3 --
4
5 SET client_encoding = 'UTF8';
6 SET standard_conforming_strings = off;
7 SET check_function_bodies = false;
8 SET client_min_messages = warning;
9 SET escape_string_warning = off;
10
11 SET search_path = stratcon, pg_catalog;
12
13 SET default_tablespace = '';
14
15 SET default_with_oids = false;
16
17 --
18 -- Name: event_criteria; Type: TABLE; Schema: stratcon; Owner: reconnoiter;
19 --
20
21 CREATE TABLE event_criteria_numeric (
22   check_id uuid not null,
23   metric_name text not null,
24   ordering integer not null,
25   event_criteria_id integer not null,
26   priority integer not null,
27   derive text,
28   minimum numeric,
29   maximum numeric,
30   absence boolean not null default true
31 );
32
33 CREATE UNIQUE INDEX event_criteria_numeric_cmo
34     ON event_criteria_numeric (check_id, metric_name, ordering);
35
36 CREATE INDEX event_criteria_numeric_cid
37     ON event_criteria_numeric (event_criteria_id);
38
39 CREATE TABLE event_criteria_text (
40   check_id uuid not null,
41   metric_name text not null,
42   ordering integer not null,
43   event_criteria_id integer not null,
44   priority integer not null,
45   match text,
46   onchange boolean not null default false,
47   absence boolean not null default true
48 );
49
50 CREATE UNIQUE INDEX event_criteria_text_cmo
51     ON event_criteria_text (check_id, metric_name, ordering);
52
53 CREATE UNIQUE INDEX event_criteria_text_cid
54     ON event_criteria_text (event_criteria_id);
55
56 REVOKE ALL ON TABLE event_criteria_numeric FROM PUBLIC;
57 REVOKE ALL ON TABLE event_criteria_numeric FROM reconnoiter;
58 GRANT ALL ON TABLE event_criteria_numeric TO reconnoiter;
59 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_numeric TO prism;
60 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_numeric TO stratcon;
61
62 REVOKE ALL ON TABLE event_criteria_text FROM PUBLIC;
63 REVOKE ALL ON TABLE event_criteria_text FROM reconnoiter;
64 GRANT ALL ON TABLE event_criteria_text TO reconnoiter;
65 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_text TO prism;
66 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE event_criteria_text TO stratcon;
67
Note: See TracBrowser for help on using the browser.