Skip to content

Instantly share code, notes, and snippets.

View IngussNeilands's full-sized avatar

Inguss Neilands IngussNeilands

View GitHub Profile
@IngussNeilands
IngussNeilands / vagrant.md
Created November 23, 2015 21:49 — forked from dypsilon/vagrant.md
Result of the vagrant research
@IngussNeilands
IngussNeilands / ALTERNATIVES.adoc
Created December 2, 2015 11:47 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@IngussNeilands
IngussNeilands / ansible-bootstrap-ubuntu-16.04.yml
Created December 9, 2016 15:08 — forked from gwillem/ansible-bootstrap-ubuntu-16.04.yml
Get Ansible to work on bare Ubuntu 16.04 without python 2.7
# Add this snippet to the top of your playbook.
# It will install python2 if missing (but checks first so no expensive repeated apt updates)
# [email protected]
- hosts: all
gather_facts: False
tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
@IngussNeilands
IngussNeilands / logstash_indexer.conf
Created December 13, 2016 13:06 — forked from fairchild/logstash_indexer.conf
Logstash config example
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
message_format => "json_event"
}
@IngussNeilands
IngussNeilands / linode_fog.rb
Created December 16, 2016 14:32 — forked from nesquena/linode_fog.rb
Linode and Fog Samples
## DNS
@dns = Fog::DNS.new(:provider => 'Linode', :linode_api_key => LINODE_KEY)
if @zone = @dns.zones.all.find { |z| z.domain == ZONE }
puts "Found zone #{@zone.inspect}"
else
@zone = @dns.zones.create(:domain => ZONE, :email => ZONE_EMAIL)
puts "Creating zone #{@zone.inspect}"
end
@IngussNeilands
IngussNeilands / play.yml
Created January 5, 2017 16:34 — forked from halberom/play.yml
ansible - example of command and with_items
---
- hosts: foo
vars:
gems:
libxml-ruby: { version: 2.6.0, state: present, include_dependencies: yes, user_install: no }
shenzhen: { version: 0.13.1, state: present, include_dependencies: yes, user_install: no }
gem_executable: /usr/local/rvm/ruby/blah/blah/1.2/gem
tasks:
- name: install a bunch of gems - warning, use the right executable and run as the right user!
gem:
@IngussNeilands
IngussNeilands / beats-logstash-tls.md
Created February 21, 2017 09:55 — forked from andrewkroh/beats-logstash-tls.md
Using TLS between Beats and Logstash

Using TLS between Beats and Logstash

Beats to Logstash over TLS

The purpose of this document is to help with configuring and troubleshooting using TLS on the connection between Beats and Logstash.

Configuration

You must configure TLS on both the client and server to make this work. This

@IngussNeilands
IngussNeilands / post_to_slack.rb
Created May 2, 2017 14:07 — forked from jlecour/post_to_slack.rb
How to post alerts from Monit to Slack
# encoding: UTF-8
require 'optparse'
require 'net/http'
require 'json'
def parse_options(argv)
opts = {}
@parser = OptionParser.new do |o|
#host running out of memory!
ALERT HighMem
IF 100 -(node_memory_MemFree + node_memory_Buffers + node_memory_Cached) / node_memory_MemTotal* 100 > 80
FOR 1m
WITH {
severity="page"
}
SUMMARY "Instance {{$labels.host}} has high memory consumption"
DESCRIPTION "{{$labels.host}} of job {{$labels.job}} has less than 40% of memory available for more than 1 minutes."
@IngussNeilands
IngussNeilands / gist:0550a1916ac97bf1f18028d78744af98
Created May 29, 2017 16:40 — forked from drkarl/gist:739a864b3275e901d317
Ask HN: Best Linux server backup system?

Linux Backup Solutions

I've been looking for the best Linux backup system, and also reading lots of HN comments.

Instead of putting pros and cons of every backup system I'll just list some deal-breakers which would disqualify them.

Also I would like that you, the HN community, would add more deal breakers for these or other backup systems if you know some more and at the same time, if you have data to disprove some of the deal-breakers listed here (benchmarks, info about something being true for older releases but is fixed on newer releases), please share it so that I can edit this list accordingly.

  • It has a lot of management overhead and that's a problem if you don't have time for a full time backup administrator.