Initial commit
[clearscm.git] / clearadm / lib / load.sql
1 -- -----------------------------------------------------------------------------
2 --
3 -- File:        $RCSfile: load.sql,v $
4 -- Revision:    $Revision: 1.10 $
5 -- Description: Create predefined data in the Clearadm database
6 -- Author:      Andrew@ClearSCM.com
7 -- Created:     Tue Nov 30 08:46:42 EST 2010
8 -- Modified:    $Date: 2012/07/04 20:51:34 $
9 -- Language:    SQL
10 --
11 -- Copyright (c) 2010, ClearSCM, Inc., all rights reserved
12 --
13 -- -----------------------------------------------------------------------------
14 -- Predefined alerts
15 insert into alert (
16   name,
17   type
18 ) values (
19   'Email admin',
20   'email'
21 );
22
23 -- Predefined notifications
24 insert into notification (
25   name,
26   alert,
27   cond,
28   nomorethan
29 ) values (
30   'Filesystem',
31   'Email admin',
32   'Filesystem over threshold',
33   'Once a day'
34 );
35
36 insert into notification (
37   name,
38   alert,
39   cond,
40   nomorethan
41 ) values (
42   'Heartbeat',
43   'Email admin',
44   'Heartbeat Failure',
45   'Once an hour'
46 );
47
48 insert into notification (
49   name,
50   alert,
51   cond,
52   nomorethan
53 ) values (
54   'Loadavg',
55   'Email admin',
56   'Loadavg over threshold',
57   'Once an hour'
58 );
59
60 insert into notification (
61   name,
62   alert,
63   cond,
64   nomorethan
65 ) values (
66   'Scrub',
67   'Email admin',
68   'Scrub Failure',
69   'Once a day'
70 );
71
72 insert into notification (
73   name,
74   alert,
75   cond,
76   nomorethan
77 ) values (
78   'System checkin',
79   'Email admin',
80   'Not respoding',
81   'Once an hour'
82 );
83
84 insert into notification (
85   name,
86   alert,
87   cond,
88   nomorethan
89 ) values (
90   'Update systems',
91   'Email admin',
92   'Non zero return',
93   'Once an hour'
94 );
95
96 -- Predefined tasks
97 insert into task (
98   name,
99   system,
100   description,
101   command,
102 ) values (
103   'Loadavg',
104   'Localhost',
105   'Obtain a loadavg snapshot on all systems',
106   'updatela.pl',
107 );
108
109 insert into task (
110   name,
111   system,
112   description,
113   command,
114 ) values (
115   'Filesystem',
116   'Localhost',
117   'Obtain a filesystem snapshot on all systems/filesystems',
118   'updatefs.pl',
119 );
120
121 insert into task (
122   name,
123   system,
124   description,
125   command
126 ) values (
127   'Scrub',
128   'Localhost',
129   'Scrub Clearadm database',
130   'clearadmscrub.pl',
131 );
132
133 insert into task (
134   name,
135   system,
136   description
137 ) values (
138   'System checkin',
139   'Localhost',
140   'Checkin from all systems',
141 );
142
143 insert into task (
144   name,
145   system,
146   description,
147   command
148 ) values (
149   'Update systems',
150   'Localhost',
151   'Update all systems',
152   'updatesystem.pl -host all',
153 );
154
155 -- Predefined schedule
156 insert into schedule (
157   name,
158   task,
159   notification,
160   frequency
161 ) values (
162   'Loadavg',
163   'Loadavg',
164   'LoadAvg',
165   '5 Minutes'
166 );
167
168 insert into schedule (
169   name,
170   task,
171   notification,
172   frequency
173 ) values (
174   'Filesystem',
175   'Filesystem',
176   'Filesystem',
177   '5 Minutes'
178 );
179
180 insert into schedule (
181   name,
182   task,
183   notification,
184   frequency
185 ) values (
186   'Scrub',
187   'Scrub',
188   'Scrub',
189   '1 day
190 );