root/src/stratcon.conf.in

Revision 7afb4e334fa8390d0543fc8d916d5c6b861511a9, 6.4 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 5 years ago)

fixes #219

This is "significant" as it requires adding a module section to
stratcon.conf and not using the <stomp> stanza, but instead using
<mq type="stomp">. I've tested it with ActiveMQ and RabbitMQ and
both work fine.

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