Removed /usr/local from CDPATH
[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 notificationsTables
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   'Clearcase Storage',
79   'Email admin',
80   'Clearcase Failure',
81   'Once a day'
82 );
83
84 insert into notification (
85   name,
86   alert,
87   cond,
88   nomorethan
89 ) values (
90   'System checkin',
91   'Email admin',
92   'Not respoding',
93   'Once an hour'
94 );
95
96 insert into notification (
97   name,
98   alert,
99   cond,
100   nomorethan
101 ) values (
102   'Update systems',
103   'Email admin',
104   'Non zero return',
105   'Once an hour'
106 );
107
108 -- Predefined tasks
109 insert into task (
110   name,
111   system,
112   description,
113   command
114 ) values (
115   'Loadavg',
116   'localhost',
117   'Obtain a loadavg snapshot on all systems',
118   'updatela.pl'
119 );
120
121 insert into task (
122   name,
123   system,
124   description,
125   command
126 ) values (
127   'Filesystem',
128   'localhost',
129   'Obtain a filesystem snapshot on all systems/filesystems',
130   'updatefs.pl'
131 );
132
133 insert into task (
134   name,
135   system,
136   description,
137   command
138 ) values (
139   'Scrub',
140   'localhost',
141   'Scrub Clearadm database',
142   'clearadmscrub.pl'
143 );
144
145 insert into task (
146   name,
147   system,
148   description,
149   command
150 ) values (
151   'System checkin',
152   'localhost',
153   'Checkin from all systems',
154   'default'
155 );
156
157 insert into task (
158   name,
159   system,
160   description,
161   command
162 ) values (
163   'Update systems',
164   'localhost',
165   'Update all systems',
166   'updatesystem.pl -host all'
167 );
168
169 insert into task (
170   name,
171   system,
172   description,
173   command
174 ) values (
175   'Clearcase Storage',
176   'localhost',
177   'Update Clearcase VOB/View storage',
178   'updateccfs.pl'
179 );
180
181 -- Predefined schedule
182 insert into schedule (
183   name,
184   task,
185   notification,
186   frequency
187 ) values (
188   'Loadavg',
189   'Loadavg',
190   'LoadAvg',
191   '5 Minutes'
192 );
193
194 insert into schedule (
195   name,
196   task,
197   notification,
198   frequency
199 ) values (
200   'Filesystem',
201   'Filesystem',
202   'Filesystem',
203   '5 Minutes'
204 );
205
206 insert into schedule (
207   name,
208   task,
209   notification,
210   frequency
211 ) values (
212   'Scrub',
213   'Scrub',
214   'Scrub',
215   '1 day'
216 );
217
218 insert into schedule (
219   name,
220   task,
221   notification,
222   frequency
223 ) values (
224   'Clearcase Storage',
225   'Clearcase Storage',
226   'Clearcase Storage',
227   '1 day'
228 );
229
230