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