root/src/stratcon.conf.in

Revision 3b10c6f0333fbc5ff3a7f220b5249c42083e1768, 7.1 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 3 years ago)

add watchdog stanza in config, as a comment to let people know it is ithere

  • 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       <!-- (for RabbitMQ, leave type="stomp" in the line above, but set the following)
46       <username>guest</username>
47       <password>guest</password>
48       <exchange>noit.firehose</exchange>
49       -->
50     </mq>
51     <!-- For RabbitMQ
52     <broker adapter="rabbitmq" />
53     -->
54     <queries master="iep">
55       <statement id="6cc613a4-7f9c-11de-973f-db7e8ccb2e5c" provides="CheckDetails-ddl">
56         <epl>create window CheckDetails.std:unique(uuid).win:keepall() as NoitCheck</epl>
57       </statement>
58       <statement id="76598f5e-7f9c-11de-9f5b-ebb4dcb2494e" provides="CheckDetails">
59         <requires>CheckDetails-ddl</requires>
60         <epl>insert into CheckDetails select * from NoitCheck</epl>
61       </statement>
62       <statement id="ba189f08-7f99-11de-9013-733772d37479" provides="UnavailableStream">
63         <requires>CheckDetails</requires>
64         <epl>insert into UnavailableStream
65              select p.* as delta, cds.target as target, cds.module as module,
66                     cds.name as name, p.s.uuid as uuid
67              from pattern [ every
68                             s=NoitStatus(availability='A') ->
69                             ( n0 = NoitStatus(uuid=s.uuid, availability='U')
70                               and not NoitStatus(uuid=s.uuid, availability='A'))
71                           ].std:lastevent() as p
72              inner join CheckDetails as cds on cds.uuid = p.s.uuid
73         </epl>
74       </statement>
75       <query id="ce6bf8d2-3dd7-11de-a45c-a7df160cba9e" topic="status">
76         <epl>select * from NoitStatus</epl>
77       </query>
78     </queries>
79   </iep>
80
81   <database>
82     <journal>
83       <path>/var/log/stratcon.persist</path>
84     </journal>
85     <dbconfig>
86       <host>localhost</host>
87       <dbname>reconnoiter</dbname>
88       <user>stratcon</user>
89       <password>unguessable</password>
90     </dbconfig>
91     <statements>
92       <!-- These are optional and used for stuff like setting search paths -->
93       <!--
94       <metanodepostconnect><![CDATA[
95         SELECT do_some_magic();
96       ]]></metanodepostconnect>
97       <storagepostconnect><![CDATA[
98         SELECT do_some_magic($1,$2);
99       ]]></storagepostconnect>
100       -->
101       <allchecks><![CDATA[
102         SELECT remote_address, id, target, module, name
103           FROM check_currently
104       ]]></allchecks>
105       <findcheck><![CDATA[
106         SELECT remote_address, id, target, module, name
107           FROM check_currently
108          WHERE sid = $1
109       ]]></findcheck>
110       <allstoragenodes><![CDATA[
111         SELECT storage_node_id, fqdn, dsn
112           FROM stratcon.storage_node
113       ]]></allstoragenodes>
114       <findstoragenode><![CDATA[
115         SELECT fqdn, dsn
116           FROM stratcon.storage_node
117          WHERE storage_node_id = $1
118       ]]></findstoragenode>
119       <mapallchecks><![CDATA[
120         SELECT id, sid, noit as remote_cn, storage_node_id, fqdn, dsn
121           FROM stratcon.map_uuid_to_sid LEFT JOIN stratcon.storage_node USING (storage_node_id)
122       ]]></mapallchecks>
123       <mapchecktostoragenode><![CDATA[
124         SELECT o_storage_node_id as storage_node_id, o_sid as sid,
125                o_fqdn as fqdn, o_dsn as dsn, o_noit as remote_cn
126           FROM stratcon.map_uuid_to_sid($1,$2)
127       ]]></mapchecktostoragenode>
128       <check><![CDATA[
129         INSERT INTO check_archive_%Y%m%d
130                     (remote_address, whence, sid, id, target, module, name)
131              VALUES ($1, 'epoch'::timestamptz + ($2 || ' seconds')::interval,
132                      $3, $4, $5, $6, $7)
133       ]]></check>
134       <status><![CDATA[
135         INSERT INTO check_status_archive_%Y%m%d
136                     (whence, sid, state, availability, duration, status)
137              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
138                      $2, $3, $4, $5, $6)
139       ]]></status>
140       <metric_numeric><![CDATA[
141         INSERT INTO metric_numeric_archive_%Y%m%d
142                     (whence, sid, name, value)
143              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
144                      $2, $3, $4)
145       ]]></metric_numeric>
146       <metric_text><![CDATA[
147         INSERT INTO metric_text_archive_%Y%m%d
148                     ( whence, sid, name,value)
149              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
150                      $2, $3, $4)
151       ]]></metric_text>
152       <config><![CDATA[
153         SELECT stratcon.update_config
154                ($1, $2, $3,
155                 'epoch'::timestamptz + ($4 || ' seconds')::interval,
156                 $5)
157       ]]></config>
158       <findconfig><![CDATA[
159         SELECT config FROM stratcon.current_node_config WHERE remote_cn = $1
160       ]]></findconfig>
161     </statements>
162   </database>
163
164   <listeners>
165     <sslconfig>
166       <key_file>%sysconfdir%/%PKIPREFIX%stratcon.key</key_file>
167       <certificate_file>%sysconfdir%/%PKIPREFIX%stratcon.crt</certificate_file>
168       <ca_chain>%sysconfdir%/%PKIPREFIX%ca.crt</ca_chain>
169     </sslconfig>
170     <consoles type="noit_console">
171       <listener address="/tmp/stratcon">
172         <config><line_protocol>telnet</line_protocol></config>
173       </listener>
174     </consoles>
175     <realtime type="http_rest_api">
176       <listener address="*" port="80">
177         <config>
178           <hostname>stratcon.noit.example.com</hostname>
179           <document_domain>noit.example.com</document_domain>
180         </config>
181       </listener>
182     </realtime>
183     <listener type="control_dispatch" address="*" port="43191" ssl="on" />
184   </listeners>
185
186   <rest>
187     <acl type="deny">
188       <rule type="deny" url="/\.svn"/>
189       <rule type="allow" cn="^admin$"/>
190       <rule type="allow" cn="^nagios$" url="^/noits/show$"/>
191       <rule type="allow" url="^/noits/config$"/>
192       <rule type="allow" url="^/data/"/>
193       <rule type="allow" url="^/$"/>
194     </acl>
195   </rest>
196
197 </stratcon>
Note: See TracBrowser for help on using the browser.