root/src/stratcon.conf.in

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

followup on the shim, last commit was incomplete

  • 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="debug/eventer" disabled="true"/>
12     </console_output>
13   </logs>
14
15   <noits>
16     <config>
17       <!--
18         If we have a connection failure, attempt to reconnect
19         immediately.  Upon failure wait 1000ms (1s) and
20         exponentially backoff up to 900000ms (900s or 15m)
21       -->
22       <reconnect_initial_interval>1000</reconnect_initial_interval>
23       <reconnect_maximum_interval>15000</reconnect_maximum_interval>
24     </config>
25     <sslconfig>
26       <key_file>%sysconfdir%/%PKIPREFIX%stratcon.key</key_file>
27       <certificate_file>%sysconfdir%/%PKIPREFIX%stratcon.crt</certificate_file>
28       <ca_chain>%sysconfdir%/%PKIPREFIX%ca.crt</ca_chain>
29     </sslconfig>
30     <noit address="127.0.0.1" port="43191" />
31   </noits>
32
33   <iep disable="false"> <!-- false the default -->
34     <start directory="%iepdbdir%"
35            command="%iepbindir%/run-iep.sh" />
36     <queries>
37       <statement id="6cc613a4-7f9c-11de-973f-db7e8ccb2e5c" provides="CheckDetails-ddl">
38         <epl>create window CheckDetails.std:unique(uuid).win:keepall() as NoitCheck</epl>
39       </statement>
40       <statement id="76598f5e-7f9c-11de-9f5b-ebb4dcb2494e" provides="CheckDetails">
41         <requires>CheckDetails-ddl</requires>
42         <epl>insert into CheckDetails select * from NoitCheck</epl>
43       </statement>
44       <statement id="ba189f08-7f99-11de-9013-733772d37479" provides="UnavailableStream">
45         <requires>CheckDetails</requires>
46         <epl>insert into UnavailableStream
47              select p.* as delta, cds.target as target, cds.module as module,
48                     cds.name as name, p.s.uuid as uuid
49              from pattern [ every
50                             s=NoitStatus(availability='A') ->
51                             ( n0 = NoitStatus(uuid=s.uuid, availability='U')
52                               and not NoitStatus(uuid=s.uuid, availability='A'))
53                           ].std:lastevent() as p
54              inner join CheckDetails as cds on cds.uuid = p.s.uuid
55         </epl>
56       </statement>
57       <query id="ce6bf8d2-3dd7-11de-a45c-a7df160cba9e" topic="status">
58         <epl>select * from NoitStatus</epl>
59       </query>
60     </queries>
61   </iep>
62
63   <database>
64     <dbconfig>
65       <host>localhost</host>
66       <dbname>reconnoiter</dbname>
67       <user>stratcon</user>
68       <password>unguessable</password>
69     </dbconfig>
70     <statements>
71       <allchecks><![CDATA[
72         SELECT remote_address, id, target, module, name
73           FROM stratcon.mv_loading_dock_check_s
74       ]]></allchecks>
75       <findcheck><![CDATA[
76         SELECT remote_address, id
77           FROM stratcon.mv_loading_dock_check_s
78          WHERE sid = $1
79       ]]></findcheck>
80       <check><![CDATA[
81         INSERT INTO stratcon.loading_dock_check_s
82                     (remote_address, whence, sid, id, target, module, name)
83              VALUES ($1, 'epoch'::timestamptz + ($2 || ' seconds')::interval,
84                      stratcon.generate_sid_from_id($3), $3, $4, $5, $6)
85       ]]></check>
86       <status><![CDATA[
87         INSERT INTO stratcon.loading_dock_status_archive_%Y%m
88                     ( whence,sid, state, availability,
89                      duration, status)
90              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
91                      stratcon.generate_sid_from_id($2), $3, $4, $5, $6)
92       ]]></status>
93       <metric_numeric><![CDATA[
94         INSERT INTO stratcon.loading_dock_metric_numeric_archive_%Y%m
95                     (whence, sid, name, value)
96              VALUES ( 'epoch'::timestamptz + ($1 || ' seconds')::interval,
97                      stratcon.generate_sid_from_id($2), $3, $4)
98       ]]></metric_numeric>
99       <metric_text><![CDATA[
100         INSERT INTO stratcon.loading_dock_metric_text_archive_%Y%m
101                     ( whence, sid, name,value)
102              VALUES ('epoch'::timestamptz + ($1 || ' seconds')::interval,
103                      stratcon.generate_sid_from_id($2), $3, $4)
104       ]]></metric_text>
105       <config><![CDATA[
106         SELECT stratcon.update_config
107                ($1, $2,
108                 'epoch'::timestamptz + ($3 || ' seconds')::interval,
109                 $4 )
110       ]]></config>
111     </statements>
112   </database>
113
114   <listeners>
115   <consoles type="noit_console">
116     <listener address="/tmp/stratcon">
117       <config><line_protocol>telnet</line_protocol></config>
118     </listener>
119   </consoles>
120   <realtime type="http_rest_api">
121     <listener address="*" port="80">
122       <config>
123         <hostname>stratcon.noit.example.com</hostname>
124         <document_domain>noit.example.com</document_domain>
125       </config>
126     </listener>
127   </realtime>
128   </listeners>
129
130 </stratcon>
Note: See TracBrowser for help on using the browser.