apache-frontend: Now monitor a re6St url (may be defined as a parameter)
[slapos.git] / software / apache-frontend / instance-apache-frontend.cfg
1 [buildout]
2 parts =
3   directory
4   configtest
5   logrotate
6   cron
7   cron-entry-logrotate
8   ca-frontend
9   certificate-authority
10   logrotate-entry-apache
11   logrotate-entry-apache-cached
12   apache-frontend
13   apache-cached
14   switch-apache-softwaretype
15   frontend-apache-graceful
16   cached-apache-graceful
17   dynamic-template-default-vh
18   not-found-html
19   promise-frontend-apache-configuration
20   promise-cached-apache-configuration
21   promise-apache-frontend-v4-https
22   promise-apache-frontend-v4-http
23   promise-apache-frontend-v6-https
24   promise-apache-frontend-v6-http
25   promise-apache-cached
26
27   trafficserver-launcher
28   trafficserver-reload
29   trafficserver-configuration-directory
30   trafficserver-records-config
31   trafficserver-remap-config
32   trafficserver-storage-config
33
34 ## Monitoring part
35 ###Parts to add for monitoring
36   certificate-authority
37   cron-entry-monitor
38   cron-entry-rss
39   deploy-index
40   deploy-settings-cgi
41   deploy-status-cgi
42   setup-static-files
43   certificate-authority
44   zero-parameters
45   public-symlink
46   cgi-httpd-wrapper
47   cgi-httpd-graceful-wrapper
48   monitor-promise
49   monitor-instance-log-access
50 ## Monitor for apache
51   monitor-current-log-access
52   monitor-backup-log-access
53   monitor-ats-cache-stats-wrapper
54   monitor-apache-configuration-verification
55   monitor-verify-re6st-connectivity
56
57 extends = ${monitor-template:output}
58
59
60 eggs-directory = ${buildout:eggs-directory}
61 develop-eggs-directory = ${buildout:develop-eggs-directory}
62 offline = true
63
64 # Create all needed directories
65 [directory]
66 recipe = slapos.cookbook:mkdirectory
67
68 bin = $${buildout:directory}/bin/
69 etc = $${buildout:directory}/etc/
70 srv = $${buildout:directory}/srv/
71 var = $${buildout:directory}/var/
72 template = $${buildout:directory}/template/
73
74 backup = $${:srv}/backup
75 log = $${:var}/log
76 run = $${:var}/run
77 service = $${:etc}/service
78 etc-run = $${:etc}/run
79 promise = $${:etc}/promise
80
81 logrotate-backup = $${:backup}/logrotate
82 logrotate-entries = $${:etc}/logrotate.d
83
84 cron-entries = $${:etc}/cron.d
85 crontabs = $${:etc}/crontabs
86 cronstamps = $${:etc}/cronstamps
87 ca-dir = $${:srv}/ssl
88
89
90 [switch-apache-softwaretype]
91 recipe = slapos.cookbook:softwaretype
92 single-default = $${dynamic-default-template-slave-list:rendered}
93 single-custom-personal = $${dynamic-custom-personal-template-slave-list:rendered}
94 single-custom-group = $${dynamic-custom-group-template-slave-list:rendered}
95
96 [instance-parameter]
97 # Fetches parameters defined in SlapOS Master for this instance.
98 # Always the same.
99 recipe = slapos.cookbook:slapconfiguration.serialised
100 computer = $${slap-connection:computer-id}
101 partition = $${slap-connection:partition-id}
102 url = $${slap-connection:server-url}
103 key = $${slap-connection:key-file}
104 cert = $${slap-connection:cert-file}
105 # Define default parameter(s) that will be used later, in case user didn't
106 # specify it
107 # All parameters are available through the configuration.XX syntax.
108 # All possible parameters should have a default.
109 configuration.domain = example.org
110 configuration.public-ipv4 =
111 configuration.port = 4443
112 configuration.plain_http_port = 8080
113 configuration.server-admin = admin@example.com
114 configuration.apache_custom_https = ""
115 configuration.apache_custom_http = ""
116 configuration.apache-key =
117 configuration.apache-certificate =
118 configuration.open-port = 80 443
119 configuration.extra_slave_instance_list =
120
121 [frontend-configuration]
122 template-log-access = ${template-log-access:target}
123 log-access-configuration = $${directory:etc}/apache-log-access.conf
124 apache-directory = ${apache-2.2:location}
125 apache-ipv6 = $${instance-parameter:ipv6-random}
126 apache-https-port = $${instance-parameter:configuration.port}
127
128 [jinja2-template-base]
129 recipe = slapos.recipe.template:jinja2
130 rendered = $${buildout:directory}/$${:filename}
131 extra-context =
132 context =
133     import json_module json
134     key eggs_directory buildout:eggs-directory
135     key develop_eggs_directory buildout:develop-eggs-directory
136     key slap_software_type instance-parameter:slap-software-type
137     key slapparameter_dict instance-parameter:configuration
138     section directory directory
139     $${:extra-context}
140
141 [dynamic-template-default-vh]
142 < = jinja2-template-base
143 template = ${template-default-virtualhost:target}
144 rendered = $${apache-directory:slave-configuration}/000.conf
145 extensions = jinja2.ext.do
146 extra-context =
147     key http_port instance-parameter:configuration.plain_http_port
148     key https_port instance-parameter:configuration.port
149
150 [dynamic-custom-personal-template-slave-list]
151 < = jinja2-template-base
152 template = ${template-slave-list:target}
153 filename = custom-personal-instance-slave-list.cfg
154 extensions = jinja2.ext.do
155 extra-context =
156     key apache_configuration_directory apache-directory:slave-configuration
157     key http_port instance-parameter:configuration.plain_http_port
158     key https_port instance-parameter:configuration.port
159     key public_ipv4 instance-parameter:configuration.public-ipv4
160     key slave_instance_list instance-parameter:slave-instance-list
161     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
162     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
163     key custom_ssl_directory apache-directory:vh-ssl
164     key apache_log_directory apache-directory:slave-log
165     key local_ipv4 instance-parameter:ipv4-random
166     key cache_port apache-configuration:cache-port
167     raw empty_template ${template-empty:target}
168     raw template_slave_configuration ${template-slave-configuration:target}
169     raw template_rewrite_cached ${template-rewrite-cached:target}
170     raw software_type single-custom-personal
171     section logrotate_dict logrotate
172     section frontend_configuration frontend-configuration
173     section apache_configuration apache-configuration
174     section connection_information_dict publish-connection-informations
175
176 [dynamic-custom-group-template-slave-list]
177 < = jinja2-template-base
178 template = ${template-custom-slave-list:target}
179 filename = custom-group-instance-slave-list.cfg
180 extensions = jinja2.ext.do
181 extra-context =
182     key apache_configuration_directory apache-directory:slave-configuration
183     key domain instance-parameter:configuration.domain
184     key http_port instance-parameter:configuration.plain_http_port
185     key https_port instance-parameter:configuration.port
186     key public_ipv4 instance-parameter:configuration.public-ipv4
187     key slave_instance_list instance-parameter:slave-instance-list
188     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
189     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
190     key custom_ssl_directory apache-directory:vh-ssl
191     key template_slave_configuration dynamic-virtualhost-template-slave:rendered
192     key apache_log_directory apache-directory:slave-log
193     key local_ipv4 instance-parameter:ipv4-random
194     key cache_port apache-configuration:cache-port
195     raw empty_template ${template-empty:target}
196     raw template_rewrite_cached ${template-rewrite-cached:target}
197     raw software_type single-custom-group
198
199 [dynamic-default-template-slave-list]
200 < = jinja2-template-base
201 template = ${template-custom-slave-list:target}
202 filename = default-instance-slave-list.cfg
203 extensions = jinja2.ext.do
204 extra-context =
205     key apache_configuration_directory apache-directory:slave-configuration
206     key domain instance-parameter:configuration.domain
207     key http_port instance-parameter:configuration.plain_http_port
208     key https_port instance-parameter:configuration.port
209     key public_ipv4 instance-parameter:configuration.public-ipv4
210     key slave_instance_list instance-parameter:slave-instance-list
211     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
212     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
213     key custom_ssl_directory apache-directory:vh-ssl
214     key apache_log_directory apache-directory:slave-log
215     key local_ipv4 instance-parameter:ipv4-random
216     key cache_port apache-configuration:cache-port
217     raw template_slave_configuration ${template-default-slave-virtualhost:target}
218     raw empty_template ${template-empty:target}
219     raw template_rewrite_cached ${template-rewrite-cached:target}
220     raw software_type single-default
221 # XXXX Hack to allow two software types
222
223 [dynamic-virtualhost-template-slave]
224 <= jinja2-template-base
225 template = ${template-slave-configuration:target}
226 rendered = $${directory:template}/slave-virtualhost.conf.in
227 extensions = jinja2.ext.do
228 extra-context =
229     key https_port instance-parameter:configuration.port
230     key http_port instance-parameter:configuration.plain_http_port
231     key apache_custom_https instance-parameter:configuration.apache_custom_https
232     key apache_custom_http instance-parameter:configuration.apache_custom_http
233
234 # Deploy Apache Frontend (new way, no recipe, jinja power)
235 [dynamic-apache-frontend-template]
236 < = jinja2-template-base
237 template = ${template-apache-frontend-configuration:target}
238 rendered = $${apache-configuration:frontend-configuration}
239 extra-context =
240     raw httpd_home ${apache-2.2:location}
241     key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
242     key domain instance-parameter:configuration.domain
243     key document_root apache-directory:document-root
244     key instance_home buildout:directory
245     key ipv4_addr instance-parameter:ipv4-random
246     key ipv6_addr instance-parameter:ipv6-random
247     key http_port instance-parameter:configuration.plain_http_port
248     key https_port instance-parameter:configuration.port
249     key server_admin instance-parameter:configuration.server-admin
250     key protected_path apache-configuration:protected-path
251     key access_control_string apache-configuration:access-control-string
252     key login_certificate ca-frontend:cert-file
253     key login_key ca-frontend:key-file
254     key ca_dir  certificate-authority:ca-dir
255     key ca_crl certificate-authority:ca-crl
256     key access_log apache-configuration:access-log
257     key error_log apache-configuration:error-log
258     key pid_file apache-configuration:pid-file
259     key slave_configuration_directory apache-directory:slave-configuration
260     section frontend_configuration frontend-configuration
261
262 [apache-frontend]
263 recipe = slapos.cookbook:wrapper
264 command-line = ${apache-2.2:location}/bin/httpd -f $${dynamic-apache-frontend-template:rendered} -DFOREGROUND
265 wrapper-path = $${directory:service}/frontend_apache
266 wait-for-files =
267                $${ca-frontend:cert-file}
268                $${ca-frontend:key-file}
269
270 # Deploy Apache for cached website
271 [dynamic-apache-cached-template]
272 < = jinja2-template-base
273 template = ${template-apache-cached-configuration:target}
274 rendered = $${apache-configuration:cached-configuration}
275 extra-context =
276     raw httpd_home ${apache-2.2:location}
277     key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
278     key domain instance-parameter:configuration.domain
279     key document_root apache-directory:document-root
280     key instance_home buildout:directory
281     key ipv4_addr instance-parameter:ipv4-random
282     key cached_port apache-configuration:cache-through-port
283     key server_admin instance-parameter:configuration.server-admin
284     key protected_path apache-configuration:protected-path
285     key access_control_string apache-configuration:access-control-string
286     key login_certificate ca-frontend:cert-file
287     key login_key ca-frontend:key-file
288     key ca_dir  certificate-authority:ca-dir
289     key ca_crl certificate-authority:ca-crl
290     key access_log apache-configuration:cache-access-log
291     key error_log apache-configuration:cache-error-log
292     key pid_file apache-configuration:cache-pid-file
293     key apachecachedmap_path apache-configuration:cached-rewrite-file
294
295 [apache-cached]
296 recipe = slapos.cookbook:wrapper
297 command-line = ${apache-2.2:location}/bin/httpd -f $${dynamic-apache-cached-template:rendered} -DFOREGROUND
298 wrapper-path = $${directory:service}/frontend_cached_apache
299 wait-for-files =
300                $${ca-frontend:cert-file}
301                $${ca-frontend:key-file}
302
303 [not-found-html]
304 recipe = slapos.cookbook:symbolic.link
305 target-directory = $${apache-directory:document-root}
306 link-binary =
307             ${template-not-found-html:target}
308
309 [apache-directory]
310 recipe = slapos.cookbook:mkdirectory
311 document-root = $${directory:srv}/htdocs
312 slave-configuration = $${directory:etc}/apache-slave-conf.d/
313 cache = $${directory:var}/cache
314 mod-ssl = $${:cache}/httpd_mod_ssl
315 vh-ssl = $${:slave-configuration}/ssl
316 slave-log = $${directory:log}/httpd
317
318 [apache-configuration]
319 frontend-configuration = $${directory:etc}/apache_frontend.conf
320 cached-configuration = $${directory:etc}/apache_frontend_cached.conf
321 access-log = $${directory:log}/frontend-apache-access.log
322 error-log = $${directory:log}/frontend-apache-error.log
323 pid-file = $${directory:run}/httpd.pid
324 protected-path = /
325 access-control-string = none
326 cached-rewrite-file = $${directory:etc}/apache_rewrite_cached.txt
327 frontend-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:frontend-configuration}
328 frontend-graceful-command = $${:frontend-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
329 cached-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:cached-configuration}
330 cached-graceful-command = $${:cached-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${apache-configuration:cache-pid-file}); fi
331
332 # Apache for cache configuration
333 cache-access-log = $${directory:log}/frontend-apache-access-cached.log
334 cache-error-log = $${directory:log}/frontend-apache-error-cached.log
335 cache-pid-file = $${directory:run}/httpd-cached.pid
336
337 # Comunication with ats
338 cache-port = $${trafficserver-variable:input-port}
339 cache-through-port = 26011
340
341 # Create wrapper for "apachectl conftest" in bin
342 [configtest]
343 recipe = slapos.cookbook:wrapper
344 command-line = ${apache-2.2:location}/bin/httpd -f $${directory:etc}/apache_frontend.conf -t
345 wrapper-path = $${directory:bin}/apache-configtest
346
347 [certificate-authority]
348 recipe = slapos.cookbook:certificate_authority
349 openssl-binary = ${openssl:location}/bin/openssl
350 ca-dir = $${directory:ca-dir}
351 requests-directory = $${cadirectory:requests}
352 wrapper = $${directory:service}/certificate_authority
353 ca-private = $${cadirectory:private}
354 ca-certs = $${cadirectory:certs}
355 ca-newcerts = $${cadirectory:newcerts}
356 ca-crl = $${cadirectory:crl}
357
358 [cadirectory]
359 recipe = slapos.cookbook:mkdirectory
360 requests = $${directory:ca-dir}/requests/
361 private = $${directory:ca-dir}/private/
362 certs = $${directory:ca-dir}/certs/
363 newcerts = $${directory:ca-dir}/newcerts/
364 crl = $${directory:ca-dir}/crl/
365
366 [ca-frontend]
367 <= certificate-authority
368 recipe = slapos.cookbook:certificate_authority.request
369 key-file = $${cadirectory:certs}/apache_frontend.key
370 cert-file = $${cadirectory:certs}/apache_frontend.crt
371 executable = $${directory:service}/frontend_apache
372 wrapper = $${directory:service}/frontend_apache
373 key-content = $${instance-parameter:configuration.apache-key}
374 cert-content = $${instance-parameter:configuration.apache-certificate}
375 # Put domain name
376 name = $${instance-parameter:configuration.domain}
377
378 [cron]
379 recipe = slapos.cookbook:cron
380 dcrond-binary = ${dcron:location}/sbin/crond
381 cron-entries = $${directory:cron-entries}
382 crontabs = $${directory:crontabs}
383 cronstamps = $${directory:cronstamps}
384 catcher = $${cron-simplelogger:wrapper}
385 binary = $${directory:service}/crond
386
387 [cron-simplelogger]
388 recipe = slapos.cookbook:simplelogger
389 wrapper = $${directory:bin}/cron_simplelogger
390 log = $${directory:log}/cron.log
391
392 [cron-entry-logrotate]
393 <= cron
394 recipe = slapos.cookbook:cron.d
395 name = logrotate
396 frequency = 0 0 * * *
397 command = $${logrotate:wrapper}
398
399 # Deploy Logrotate
400 [logrotate]
401 recipe = slapos.cookbook:logrotate
402 # Binaries
403 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
404 gzip-binary = ${gzip:location}/bin/gzip
405 gunzip-binary = ${gzip:location}/bin/gunzip
406 # Directories
407 wrapper = $${directory:bin}/logrotate
408 conf = $${directory:etc}/logrotate.conf
409 logrotate-entries = $${directory:logrotate-entries}
410 backup = $${directory:logrotate-backup}
411 state-file = $${directory:srv}/logrotate.status
412
413 [logrotate-entry-apache]
414 <= logrotate
415 recipe = slapos.cookbook:logrotate.d
416 name = apache
417 log = $${apache-configuration:error-log} $${apache-configuration:access-log}
418 frequency = daily
419 rotatep-num = 30
420 post = $${apache-configuration:frontend-graceful-command}
421 sharedscripts = true
422 notifempty = true
423 create = true
424
425 [logrotate-entry-apache-cached]
426 <= logrotate
427 recipe = slapos.cookbook:logrotate.d
428 name = apache-cached
429 log = $${apache-configuration:cache-error-log} $${apache-configuration:cache-access-log}
430 frequency = daily
431 rotatep-num = 30
432 post = $${apache-configuration:cached-graceful-command}
433 sharedscripts = true
434 notifempty = true
435 create = true
436
437 #################
438 # Trafficserver
439 #################
440 [trafficserver-directory]
441 recipe = slapos.cookbook:mkdirectory
442 configuration = $${directory:etc}/trafficserver
443 local-state = $${directory:var}/trafficserver
444 bin_path = ${trafficserver:location}/bin
445 log = $${directory:log}/trafficserver
446 cache-path = $${directory:srv}/ats_cache
447
448 [trafficserver-variable]
449 wrapper-path = $${directory:service}/trafficserver
450 reload-path = $${directory:etc-run}/trafficserver-reload
451 local-ip = $${instance-parameter:ipv4-random}
452 input-port = 23432
453 hostname = $${slap-parameter:frontend-name}
454 remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port}
455 disk-cache-config = $${trafficserver-directory:cache-path} 8G volume=$${slap-parameter:frontend-name}
456
457 [trafficserver-configuration-directory]
458 recipe = plone.recipe.command
459 command = cp -rn ${trafficserver:location}/etc/trafficserver/* $${:target}
460 target = $${trafficserver-directory:configuration}
461
462 [trafficserver-launcher]
463 recipe = slapos.cookbook:wrapper
464 command-line = ${trafficserver:location}/bin/traffic_cop
465 wrapper-path = $${trafficserver-variable:wrapper-path}
466 environment = TS_ROOT=$${buildout:directory}
467
468 [trafficserver-reload]
469 recipe = slapos.cookbook:wrapper
470 command-line = ${trafficserver:location}/bin/traffic_line -x
471 wrapper-path = $${trafficserver-variable:reload-path}
472 environment = TS_ROOT=$${buildout:directory}
473
474 [trafficserver-records-config]
475 < = jinja2-template-base
476 template = ${template-trafficserver-records-config:location}/${template-trafficserver-records-config:filename}
477 rendered = $${trafficserver-directory:configuration}/records.config
478 mode = 700
479 context =
480     import os_module os
481     section ats_directory trafficserver-directory
482     section ats_configuration trafficserver-variable
483
484 [trafficserver-remap-config]
485 < = jinja2-template-base
486 template = ${template-empty:target}
487 rendered = $${trafficserver-configuration-directory:target}/remap.config
488 mode = 700
489 context =
490     key content trafficserver-variable:remap
491
492 [trafficserver-storage-config]
493 < = jinja2-template-base
494 template = ${template-empty:target}
495 rendered = $${trafficserver-configuration-directory:target}/storage.config
496 mode = 700
497 context =
498     key content trafficserver-variable:disk-cache-config
499
500 ### End of ATS sections
501
502 ### Apaches Graceful and promises
503 [frontend-apache-graceful]
504 < = jinja2-template-base
505 template = ${template-wrapper:output}
506 rendered = $${directory:etc-run}/frontend-apache-safe-graceful
507 mode = 0700
508 extra-context =
509     key content apache-configuration:frontend-graceful-command
510
511 [cached-apache-graceful]
512 < = jinja2-template-base
513 template = ${template-wrapper:output}
514 rendered = $${directory:etc-run}/cached-apache-safe-graceful
515 mode = 0700
516 extra-context =
517     key content apache-configuration:cached-graceful-command
518
519 # Promises checking configuration:
520 [promise-frontend-apache-configuration]
521 < = jinja2-template-base
522 template = ${template-wrapper:output}
523 rendered = $${directory:promise}/frontend-apache-configuration-promise
524 mode = 0700
525 extra-context =
526     key content apache-configuration:frontend-configuration-verification
527
528 [promise-cached-apache-configuration]
529 < = jinja2-template-base
530 template = ${template-wrapper:output}
531 rendered = $${directory:promise}/cached-apache-configuration-promise
532 mode = 0700
533 extra-context =
534     key content apache-configuration:cached-configuration-verification
535
536 [promise-apache-frontend-v4-https]
537 recipe = slapos.cookbook:check_port_listening
538 path = $${directory:promise}/apache_frontend_ipv4_https
539 hostname = $${instance-parameter:ipv4-random}
540 port = $${instance-parameter:configuration.port}
541
542 [promise-apache-frontend-v4-http]
543 recipe = slapos.cookbook:check_port_listening
544 path = $${directory:promise}/apache_frontend_ipv4_http
545 hostname = $${instance-parameter:ipv4-random}
546 port = $${instance-parameter:configuration.plain_http_port}
547
548 [promise-apache-frontend-v6-https]
549 recipe = slapos.cookbook:check_port_listening
550 path = $${directory:promise}/apache_frontend_ipv6_https
551 hostname = $${instance-parameter:ipv6-random}
552 port = $${instance-parameter:configuration.port}
553
554 [promise-apache-frontend-v6-http]
555 recipe = slapos.cookbook:check_port_listening
556 path = $${directory:promise}/apache_frontend_ipv6_http
557 hostname = $${instance-parameter:ipv6-random}
558 port = $${instance-parameter:configuration.plain_http_port}
559
560 [promise-apache-cached]
561 recipe = slapos.cookbook:check_port_listening
562 path = $${directory:promise}/apache_cached
563 hostname = $${instance-parameter:ipv4-random}
564 port = $${apache-configuration:cache-through-port}
565
566 [slap_connection]
567 # Kept for backward compatiblity
568 computer_id = $${slap-connection:computer-id}
569 partition_id = $${slap-connection:partition-id}
570 server_url = $${slap-connection:server-url}
571 software_release_url = $${slap-connection:software-release-url}
572 key_file = $${slap-connection:key-file}
573 cert_file = $${slap-connection:cert-file}
574
575 [slap-parameter]
576 # Define default parameter(s) that will be used later, in case user didn't
577 # specify it
578 # All parameters are available through the configuration.XX syntax.
579 # All possible parameters should have a default.
580 domain = example.org
581 public-ipv4 =
582 port = 4443
583 plain_http_port = 8080
584 server-admin = admin@example.com
585 apache_custom_https = ""
586 apache_custom_http = ""
587 apache-key =
588 apache-certificate =
589 open-port = 80 443
590 extra_slave_instance_list =
591 frontend-name =
592
593
594 #######
595 # Monitoring sections
596 #
597
598 [monitor-current-log-access]
599 < = monitor-directory-access
600 source = $${directory:log}
601
602 [monitor-backup-log-access]
603 < = monitor-directory-access
604 source = $${directory:logrotate-backup}
605
606 # Produce ATS Cache stats
607 [monitor-ats-cache-stats-wrapper]
608 < = jinja2-template-base
609 template = ${template-wrapper:output}
610 rendered = $${monitor-directory:monitoring-cgi}/ats-cache-stats
611 mode = 0700
612 command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:location}/bin/traffic_shell $${monitor-ats-cache-stats-config:rendered})</pre>"
613 extra-context =
614   key content monitor-ats-cache-stats-wrapper:command
615
616 [monitor-ats-cache-stats-config]
617 < = jinja2-template-base
618 template = ${template-empty:target}
619 rendered = $${trafficserver-configuration-directory:target}/cache-config.stats
620 mode = 644
621 context =
622     raw content show:cache-stats
623
624 # Display result of apache configuration check
625 [monitor-apache-configuration-verification]
626 < = jinja2-template-base
627 template = ${template-wrapper:output}
628 rendered = $${monitor-directory:monitoring-cgi}/front-httpd-configuration
629 mode = 0700
630 command = echo "<pre>$($${apache-configuration:frontend-configuration-verification})</pre>"
631 extra-context =
632   key content :command
633
634 [monitor-verify-re6st-connectivity]
635 recipe = slapos.cookbook:check_url_available
636 path = $${monitor-directory:monitor-custom-scripts}/re6st-connectivity
637 url = $${public:re6st-verification-url}
638 dash_path = ${dash:location}/bin/dash
639 curl_path = ${curl:location}/bin/curl
640
641 [public]
642 re6st-verification-url = http://[2001:67c:1254:4::1]/index.html