Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
consul-template --template foo.ctmpl -dry -log-level=trace -consul-addr=172.17.0.1:8500
2019/09/26 09:25:51.867140 [INFO] consul-template v0.22.0 (005b42eb)
2019/09/26 09:25:51.867153 [INFO] (runner) creating new runner (dry: true, once: false)
2019/09/26 09:25:51.867390 [DEBUG] (runner) final config: {"Consul":{"Address":"172.17.0.1:8500","Auth":{"Enabled":false,"Username":"","Password":""},"Retry":{"Attempts":12,"Backoff":250000000,"MaxBackoff":60000000000,"Enabled":true},"SSL":{"CaCert":"","CaPath":"","Cert":"","Enabled":false,"Key":"","ServerName":"","Verify":true},"Token":"","Transport":{"DialKeepAlive":30000000000,"DialTimeout":30000000000,"DisableKeepAlives":false,"IdleConnTimeout":90000000000,"MaxIdleConns":100,"MaxIdleConnsPerHost":9,"TLSHandshakeTimeout":10000000000}},"Dedup":{"Enabled":false,"MaxStale":2000000000,"Prefix":"consul-template/dedup/","TTL":15000000000},"Exec":{"Command":"","Enabled":false,"Env":{"Blacklist":[],"Custom":[],"Pristine":false,"Whitelist":[]},"KillSignal":2,"KillTimeout":30000000000,"ReloadSignal":null,"Splay":0,"Timeout":0},"KillSignal":2,"LogLevel":"trace","MaxStale":2000000000,"PidFile":"","ReloadSignal":1,"Syslog":{"Enabled":false,"Facility":"LOCAL0"},"Templates":[{"Backup":false,"Command":"","CommandTimeout":30000000000,"Contents":"","CreateDestDirs":true,"Destination":"","ErrMissingKey":false,"Exec":{"Command":"","Enabled":false,"Env":{"Blacklist":[],"Custom":[],"Pristine":false,"Whitelist":[]},"KillSignal":2,"KillTimeout":30000000000,"ReloadSignal":null,"Splay":0,"Timeout":30000000000},"Perms":0,"Source":"foo.ctmpl","Wait":{"Enabled":false,"Min":0,"Max":0},"LeftDelim":"","RightDelim":"","FunctionBlacklist":null,"SandboxPath":""}],"Vault":{"Address":"","Enabled":false,"Grace":15000000000,"Namespace":"","RenewToken":true,"Retry":{"Attempts":12,"Backoff":250000000,"MaxBackoff":60000000000,"Enabled":true},"SSL":{"CaCert":"","CaPath":"","Cert":"","Enabled":true,"Key":"","ServerName":"","Verify":true},"Transport":{"DialKeepAlive":30000000000,"DialTimeout":30000000000,"DisableKeepAlives":false,"IdleConnTimeout":90000000000,"MaxIdleConns":100,"MaxIdleConnsPerHost":9,"TLSHandshakeTimeout":10000000000},"UnwrapToken":false},"Wait":{"Enabled":false,"Min":0,"Max":0},"Once":false}
2019/09/26 09:25:51.867434 [INFO] (runner) creating watcher
2019/09/26 09:25:51.867544 [INFO] (runner) starting
2019/09/26 09:25:51.867555 [DEBUG] (runner) running initial templates
2019/09/26 09:25:51.867561 [DEBUG] (runner) initiating run
2019/09/26 09:25:51.867592 [DEBUG] (runner) checking template 4bee305d13b853b1496459c13d9a2823
2019/09/26 09:25:51.867793 [DEBUG] (runner) was not watching 1 dependencies
2019/09/26 09:25:51.867809 [DEBUG] (watcher) adding kv.block(redirects)
2019/09/26 09:25:51.867813 [TRACE] (watcher) kv.block(redirects) starting
2019/09/26 09:25:51.867819 [DEBUG] (runner) diffing and updating dependencies
2019/09/26 09:25:51.867824 [DEBUG] (runner) watching 1 dependencies
2019/09/26 09:25:51.867855 [TRACE] (view) kv.block(redirects) starting fetch
2019/09/26 09:25:51.867873 [TRACE] kv.block(redirects): GET /v1/kv/redirects?stale=true&wait=1m0s
2019/09/26 09:25:51.868795 [TRACE] kv.block(redirects): returned "{\n \"foo\": \"bar\",\n \"baz\": \"bazza\"\n}"
2019/09/26 09:25:51.868804 [TRACE] (view) kv.block(redirects) marking successful data response
2019/09/26 09:25:51.868823 [TRACE] (view) kv.block(redirects) successful contact, resetting retries
2019/09/26 09:25:51.888105 [DEBUG] (cli) receiving signal "window changed"
2019/09/26 09:25:51.975347 [TRACE] (view) kv.block(redirects) received data
2019/09/26 09:25:51.975374 [TRACE] (view) kv.block(redirects) starting fetch
2019/09/26 09:25:51.975410 [TRACE] kv.block(redirects): GET /v1/kv/redirects?index=15&stale=true&wait=1m0s
2019/09/26 09:25:51.975412 [DEBUG] (runner) receiving dependency kv.block(redirects)
2019/09/26 09:25:51.975427 [DEBUG] (runner) initiating run
2019/09/26 09:25:51.975432 [DEBUG] (runner) checking template 4bee305d13b853b1496459c13d9a2823
2019/09/26 09:25:51.975619 [DEBUG] (runner) rendering "foo.ctmpl" => ""
>
http-request redirect location http://bazza%[capture.req.uri] if { hdr(host) -i baz }
http-request redirect location http://bar%[capture.req.uri] if { hdr(host) -i foo }
2019/09/26 09:25:51.975639 [INFO] (runner) rendered "foo.ctmpl" => ""
2019/09/26 09:25:51.975644 [DEBUG] (runner) diffing and updating dependencies
2019/09/26 09:25:51.975649 [DEBUG] (runner) kv.block(redirects) is still needed
2019/09/26 09:25:51.975655 [DEBUG] (runner) watching 1 dependencies
2019/09/26 09:25:51.975661 [DEBUG] (runner) all templates rendered
# here I'm changing the JSON to be corrupt
2019/09/26 09:26:21.921247 [TRACE] kv.block(redirects): returned "{\n \"foo\": \"bar\",\n \"baz\": \"bazza\n}"
2019/09/26 09:26:21.921258 [TRACE] (view) kv.block(redirects) marking successful data response
2019/09/26 09:26:21.921269 [TRACE] (view) kv.block(redirects) successful contact, resetting retries
2019/09/26 09:26:21.921274 [TRACE] (view) kv.block(redirects) received data
2019/09/26 09:26:21.921294 [TRACE] (view) kv.block(redirects) starting fetch
2019/09/26 09:26:21.921295 [DEBUG] (runner) receiving dependency kv.block(redirects)
2019/09/26 09:26:21.921308 [DEBUG] (runner) initiating run
2019/09/26 09:26:21.921311 [TRACE] kv.block(redirects): GET /v1/kv/redirects?index=30&stale=true&wait=1m0s
2019/09/26 09:26:21.921311 [DEBUG] (runner) checking template 4bee305d13b853b1496459c13d9a2823
2019/09/26 09:26:21.921500 [ERR] (cli) foo.ctmpl: execute: template: :1:42: executing "" at <parseJSON>: error calling parseJSON: invalid character '\n' in string literal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.