Skip to content

Instantly share code, notes, and snippets.

View gmas's full-sized avatar

George Masgras gmas

  • Barcelona
  • 04:27 (UTC +02:00)
View GitHub Profile
route:
group_by: ['alertname']
group_wait: 500ms
group_interval: 500ms
repeat_interval: 1h
routes:
- match:
severity: alert
receiver: 'slack-alerts'
repeat_interval: 15m
@gmas
gmas / perf-flame-graph-notes.md
Created October 24, 2017 18:28 — forked from trevnorris/perf-flame-graph-notes.md
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
@gmas
gmas / rbac-kops.md
Created October 18, 2017 21:18 — forked from chrislovecnm/rbac-kops.md
RBAC Notes

kops cluster config

kubeAPIServer:
  authorizationMode: RBAC
  authorizationRbacSuperUser: admin
  oidcCAFile: /srv/kubernetes/ca.crt
  oidcClientID: example
  oidcGroupsClaim: groups
  oidcIssuerURL: https://dex.example.com
  oidcUsernameClaim: email
@gmas
gmas / stack.yml
Created October 11, 2017 22:31 — forked from tomvachon/stack.yml
AWS IAM Policy for Tag Restricted EBS & EC2
Type: AWS::IAM::ManagedPolicy
Properties:
Description: AWS Policy for EC2 Instance, EBS Creation with Tagging required
PolicyDocument:
Version: "2012-10-17"
Statement:
# This allows the untaggable calls to work when RunInstances is the actor
-
Effect: Allow
Action:
@gmas
gmas / gist:00a7158fa781680bc28aa9e734b896ce
Created September 22, 2017 19:34
rsync to mounted FTP point
rsync -avz --stats --progress --no-group --inplace --no-owner --size-only --no-whole-file
global:
slack_api_url: <hidden>
templates:
- '/etc/alertmanager-templates/*.tmpl'
route:
group_by: ['alertname']
group_wait: 10s
# The root route on which each incoming alert enters.
route:
# The labels by which incoming alerts are grouped together. For example,
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
# be batched into a single group.
# group_by: ['alertname', 'cluster', 'service']
group_by: ['alertname']
# When a new group of alerts is created by an incoming alert, wait at
# least 'group_wait' to send the initial notification.
==> master: Complete!
==> master: Now waiting for the Salt provisioning process to complete on this machine.
==> master: This can take some time based on your network, disk, and cpu speed.
==> master: [WARNING ] Neither 'source' nor 'contents' nor 'contents_pillar' nor 'contents_grains' was defined, yet 'replace' was set to 'True'. As ther
e is no source to replace the file with, 'replace' has been set to 'False' to avoid reading the file unnecessarily
==> master: [ERROR ] Command 'systemctl status docker.service' failed with return code: 3
==> master: [ERROR ] output: * docker.service - Docker Application Container Engine
==> master: Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
==> master: Drop-In: /usr/lib/systemd/system/docker.service.d
==> master: `-flannel.conf
% which vagrant !6712
/usr/bin/vagrant
% vagrant version !6961
Installed Version: 1.9.0
Latest Version: 1.9.0
You're running an up-to-date version of Vagrant!
% vagrant plugin install vagrant-openstack-provider !6962
- aws_namespace: AWS/ES
aws_metric_name: FreeStorageSpace
aws_dimensions: [DomainName, ClientId]
aws_dimension_select:
DomainName: [api-proxy-logs]
ClientId: [XXXX]
aws_statistics: [Minimum]