root/src/stratcon.conf.in

Revision 47a77d02f1268e637a4807266064909be566e1f7, 6.0 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

flag-day(stratcond,webconsole,database) get realtime graphs working on uuids

  • Property mode set to 100644
Line 
1 <stratcon>
2   <eventer/>
3
4   <logs>
5     <console_output>
6       <outlet name="stderr"/>
7       <log name="error"/>
8       <log name="debug"/>
9       <log name="error/iep"/>
10       <log name="error/eventer" disabled="true"/>
11       <log name="error/datastore" disabled="true"/>
12       <log name="debug/eventer" disabled="true"/>
13     </console_output>
14   </logs>
15
16   <noits>
17     <config>
18       <!--
19         If we have a connection failure, attempt to reconnect
20         immediately.  Upon failure wait 1000ms (1s) and
21         exponentially backoff up to 900000ms (900s or 15m)
22       -->
23       <reconnect_initial_interval>1000</reconnect_initial_interval>
24       <reconnect_maximum_interval>15000</reconnect_maximum_interval>
25     </config>
26     <sslconfig>
27       <key_file>%sysconfdir%/%PKIPREFIX%stratcon.key</key_file>
28       <certificate_file>%sysconfdir%/%PKIPREFIX%stratcon.crt</certificate_file>
29       <ca_chain>%sysconfdir%/%PKIPREFIX%ca.crt</ca_chain>
30     </sslconfig>
31     <noit address="127.0.0.1" port="43191" />
32   </noits>
33
34   <iep disabled="true"> <!-- false the default -->
35     <start directory="%iepdbdir%"
36            command="%iepbindir%/run-iep.sh" />
37     <queries>
38       <statement id="6cc613a4-7f9c-11de-973f-db7e8ccb2e5c" provides="CheckDetails-ddl">
39         <epl>create window CheckDetails.std:unique(uuid).win:keepall() as NoitCheck</epl>
40       </statement>
41       <statement id="76598f5e-7f9c-11de-9f5b-ebb4dcb2494e" provides="CheckDetails">
42         <requires>CheckDetails-ddl</requires>
43         <epl>insert into CheckDetails select * from NoitCheck</epl>
44       </statement>
45       <statement id="ba189f08-7f99-11de-9013-733772d37479" provides="UnavailableStream">
46         <requires>CheckDetails</requires>
47         <epl>insert into UnavailableStream
48              select p.* as delta, cds.target as target, cds.module as module,
49                     cds.name as name, p.s.uuid as uuid
50              from pattern [ every
51                             s=NoitStatus(availability='A') ->
52                             ( n0 = NoitStatus(uuid=s.uuid, availability='U')
53                               and not NoitStatus(uuid=s.uuid, availability='A'))
54                           ].std:lastevent() as p
55              inner join CheckDetails as cds on cds.uuid = p.s.uuid
56         </epl>
57       </statement>
58       <query id="ce6bf8d2-3dd7-11de-a45c-a7df160cba9e" topic="status">
59         <epl>select * from NoitStatus</epl>
60       </query>
61     </queries>
62   </iep>
63
64   <database>
65     <journal>
66       <path>/var/log/stratcon.persist</path>
67     </journal>
68     <dbconfig>
69       <host>localhost</host>
70       <dbname>reconnoiter</dbname>
71       <user>stratcon</user>
72       <password>unguessable</password>
73     </dbconfig>
74     <statements>
75       <!-- These are optional and used for stuff like setting search paths -->
76       <!--
77       <metanodepostconnect><![CDATA[
78         SELECT do_some_magic();
79       ]]></metanodepostconnect>
80       <storagepostconnect><![CDATA[
81         SELECT do_some_magic($1,$2);
82       ]]></storagepostconnect>
83       -->
84       <allchecks><![CDATA[
85         SELECT remote_address, id, target, module, name
86           FROM check_currently
87       ]]></allchecks>
88       <findcheck><![CDATA[
89         SELECT remote_address, id, target, module, name
90           FROM check_currently
91          WHERE sid = $1
92       ]]></findcheck>
93       <allstoragenodes><![CDATA[
94         SELECT storage_node_id, fqdn, dsn
95           FROM stratcon.storage_node
96       ]]></allstoragenodes>
97       <findstoragenode><![CDATA[
98         SELECT fqdn, dsn
99           FROM stratcon.storage_node
100          WHERE storage_node_id = $1
101       ]]></findstoragenode>
102       <mapallchecks><![CDATA[
103         SELECT id, sid, noit as remote_cn, storage_node_id, fqdn, dsn
104           FROM stratcon.map_uuid_to_sid LEFT JOIN stratcon.storage_node USING (storage_node_id)
105       ]]></mapallchecks>
106       <mapchecktostoragenode><![CDATA[
107         SELECT o_storage_node_id as storage_node_id, o_sid as sid,
108                o_fqdn as fqdn, o_dsn as dsn
109           FROM stratcon.map_uuid_to_sid($1,$2)
110       ]]></mapchecktostoragenode>
111       <check><![CDATA[
112         INSERT INTO check_archive
113                     (remote_address, whence, sid, id, target, module, name)
114              VALUES ($1, 'epoch'::timestamptz + ($2 || ' seconds')::interval,
115                      $3, $4, $5, $6, $7)
116       ]]></check>
117       <status><![CDATA[
118         INSERT INTO check_status_archive
119                     (whence, sid, state, availability, duration, status)
120              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
121                      $2, $3, $4, $5, $6)
122       ]]></status>
123       <metric_numeric><![CDATA[
124         INSERT INTO metric_numeric_archive
125                     (whence, sid, name, value)
126              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
127                      $2, $3, $4)
128       ]]></metric_numeric>
129       <metric_text><![CDATA[
130         INSERT INTO metric_text_archive
131                     ( whence, sid, name,value)
132              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
133                      $2, $3, $4)
134       ]]></metric_text>
135       <config><![CDATA[
136         SELECT stratcon.update_config
137                ($1, $2,
138                 'epoch'::timestamptz + ($3 || ' seconds')::interval,
139                 $4 )
140       ]]></config>
141     </statements>
142   </database>
143
144   <listeners>
145     <sslconfig>
146       <key_file>%sysconfdir%/%PKIPREFIX%stratcon.key</key_file>
147       <certificate_file>%sysconfdir%/%PKIPREFIX%stratcon.crt</certificate_file>
148       <ca_chain>%sysconfdir%/%PKIPREFIX%ca.crt</ca_chain>
149     </sslconfig>
150     <consoles type="noit_console">
151       <listener address="/tmp/stratcon">
152         <config><line_protocol>telnet</line_protocol></config>
153       </listener>
154     </consoles>
155     <realtime type="http_rest_api">
156       <listener address="*" port="80">
157         <config>
158           <hostname>stratcon.noit.example.com</hostname>
159           <document_domain>noit.example.com</document_domain>
160         </config>
161       </listener>
162     </realtime>
163     <listener type="control_dispatch" address="*" port="43191" ssl="on" />
164   </listeners>
165
166 </stratcon>
Note: See TracBrowser for help on using the browser.