root/src/stratcon.conf.in

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

sample config to power the rabbitmq stuff

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