Skip to content

Instantly share code, notes, and snippets.

View zarnovican's full-sized avatar

Brano Zarnovican zarnovican

View GitHub Profile
@zarnovican
zarnovican / tf_aws_cloudfront_response_headers_policy_issue.out
Created September 5, 2022 14:11
Terraform aws_cloudfront_response_headers_policy issue
2022-09-05T16:09:23.974+0200 [INFO] Terraform version: 1.1.2
2022-09-05T16:09:23.974+0200 [INFO] Go runtime version: go1.17.2
2022-09-05T16:09:23.974+0200 [INFO] CLI args: []string{"terraform", "apply", "-auto-approve", "-no-color"}
2022-09-05T16:09:23.974+0200 [DEBUG] Attempting to open CLI config file: /home/zarnovic/.terraformrc
2022-09-05T16:09:23.974+0200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-09-05T16:09:23.974+0200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-09-05T16:09:23.974+0200 [DEBUG] ignoring non-existing provider search directory /home/zarnovic/.terraform.d/plugins
2022-09-05T16:09:23.974+0200 [DEBUG] ignoring non-existing provider search directory /home/zarnovic/.local/share/terraform/plugins
2022-09-05T16:09:23.974+0200 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2022-09-05T16:09:23.974+0200 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
@zarnovican
zarnovican / debug.txt
Created October 22, 2019 08:35
terraform auto-minor-version-upgrade
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: 2019/10/22 10:29:51 [DEBUG] DB Instance Replica create configuration: {
ca_cert_identifier: "" => "<computed>"
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: AutoMinorVersionUpgrade: true,
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: CopyTagsToSnapshot: false,
character_set_name: "" => "<computed>"
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: DBInstanceClass: "db.m5.xlarge",
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: DBInstanceIdentifier: "slido-eu-crm2",
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: DeletionProtection: false,
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraform-provider-aws_v2.33.0_x4: EnableCloudwatchLogsExports: ["audit","error","slowquery"],
2019-10-22T10:29:51.359+0200 [DEBUG] plugin.terraf
@zarnovican
zarnovican / debug.out
Created August 2, 2018 13:09
aws_opsworks_application: environment var value is not refreshed
2018/08/02 15:02:00 [WARN] Invalid log level: "1". Defaulting to level: TRACE. Valid levels are: [TRACE DEBUG INFO WARN ERROR]
2018/08/02 15:02:00 [INFO] Terraform version: 0.11.7 41e50bd32a8825a84535e353c3674af8ce799161
2018/08/02 15:02:00 [INFO] Go runtime version: go1.10.1
2018/08/02 15:02:00 [INFO] CLI args: []string{"/home/zarnovic/bin/terraform", "apply"}
2018/08/02 15:02:00 [DEBUG] Attempting to open CLI config file: /home/zarnovic/.terraformrc
2018/08/02 15:02:00 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2018/08/02 15:02:00 [INFO] CLI command args: []string{"apply"}
2018/08/02 15:02:00 [INFO] command: empty terraform config, returning nil
2018/08/02 15:02:00 [DEBUG] command: no data state file found for backend config
2018/08/02 15:02:00 [DEBUG] New state was assigned lineage "768621c1-2d14-eb91-e6e0-9f134099a8bb"
@zarnovican
zarnovican / crash 2016-09-29
Last active October 4, 2016 10:53
Telegraf related
2016/09/29 21:07:07 Output [influxdb] buffer fullness: 221 / 10000 metrics. Total gathered metrics: 2511678. Total dropped metrics: 0.
2016/09/29 21:07:08 Output [influxdb] wrote batch of 221 metrics in 95.903655ms
unexpected fault address 0x0
fatal error: fault
[signal 0x7 code=0x80 addr=0x0 pc=0x40dcb5]
goroutine 1668450 [running]:
runtime.throw(0x14cbe48, 0x5)
/usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc82090b0c8 sp=0xc82090b0b0
runtime.sigpanic()
from __future__ import print_function
import json
import re
import sys
def snake_case(name):
name = name.replace('/', '_')
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
@zarnovican
zarnovican / telegraf.log
Created July 19, 2016 08:40
telegraf crash
2016/07/17 09:31:36 Output [influxdb] wrote batch of 18 metrics in 9.206671ms
2016/07/17 09:32:43 Output [influxdb] buffer fullness: 18 / 10000 metrics. Total gathered metrics: 468618. Total dropped metrics: 0.
2016/07/17 09:32:43 Output [influxdb] wrote batch of 18 metrics in 17.840049ms
2016/07/17 09:33:50 Output [influxdb] buffer fullness: 18 / 10000 metrics. Total gathered metrics: 468636. Total dropped metrics: 0.
2016/07/17 09:33:50 Output [influxdb] wrote batch of 18 metrics in 7.921341ms
2016/07/17 09:34:57 Output [influxdb] buffer fullness: 18 / 10000 metrics. Total gathered metrics: 468654. Total dropped metrics: 0.
2016/07/17 09:34:57 Output [influxdb] wrote batch of 18 metrics in 7.272336ms
unexpected fault address 0x0
fatal error: fault
[signal 0xb code=0x80 addr=0x0 pc=0x4aa5de]
@zarnovican
zarnovican / sumproc.sh
Last active December 16, 2020 12:22
Telegraf plugin to get summary CPU/mem usage for a tree of processes
#!/bin/bash
#
# Telegraf input plugin to get summary cpu/mem/io usage for
# a tree of processes. Identify top process(es) by
# pid file, pgrep pattern or owner.
#
# Note: it requires root to be able to read 'smaps'.
# Note: pattern match (-p) can catch the plugins itself
#
# Output fields: