root/src/stratcon.conf.in

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

fixes #358

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