root/src/stratcon.conf.in

Revision 8c8aea6bc50ed2cc0619d0585a079dc9a4de6a16, 6.9 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 8 years ago)

lockfile as root node attribute in both noit.conf and stratcon.conf, closes #263

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