Some of the practices described in this HOWTO are considered to be illegal as they often break internal corporate policies. Anything you do, you do at your own risk.
| #!/bin/bash | |
| # Interval of calculation in seconds | |
| INTERVAL="1" | |
| if [ -z "$1" ]; then | |
| echo | |
| echo usage: $0 [network-interface] | |
| echo | |
| echo e.g. $0 eth0 |
sensu | May 8, 2013
Redundancy. Availability. Scalability. Should sound familiar to you if you work in the web. Every system I build has to fit those 3 main criterias. I would also throw in manageability. If I can’t use Chef with it, I’m probably trying to use the wrong tool for the job.
There’s always been one exception though: my monitoring tool. Nagios. Zabbix. Zenoss. Shinken. Used them all. Each of them have shortcomings when it comes to the four criterias listed above. Different ones for each.
So, that said, a few months back, I was searching for something fresh. Something I could easily manage with Chef. Because I tend to forget things, and I wanted to automate as much as possible our monitoring solution. Don’t get me wrong, there’s nothing as good as developers to monitor your stuff, but I tend to like to know there’s something wrong before they show up at my desk. Even if it’s only 1-2 minutes ;)
| FROM golang:1.5.2 | |
| MAINTAINER Lucas Käldström <[email protected]> | |
| # Enable cgo cross-compilation for armel | |
| RUN echo "deb http://emdebian.org/tools/debian/ jessie main" > /etc/apt/sources.list.d/crosstools.list \ | |
| && curl -s http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add - \ | |
| && dpkg --add-architecture armel \ | |
| && apt-get update \ | |
| && apt-get install -y build-essential crossbuild-essential-armel rsync upx |
| <section data-transition="linear"> | |
| <section id='Securing-Containers-on-OpenShift' data-markdown> | |
| ## Securing | |
| ## Containers | |
| on | |
| # OpenShift | |
| [bit.ly/devconf-containersec](http://bit.ly/devconf-containersec) |
| #!/usr/bin/env python | |
| from __future__ import print_function | |
| import sys | |
| import datetime | |
| import sensors | |
| import time | |
| config = {} |
| # The following lines were added by compinstall | |
| zstyle ':completion:*' completer _expand _complete _ignored | |
| zstyle ':completion:*' list-colors '' | |
| zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-`'\'',.]=** r:|=**' 'l:|=* r:|=*' | |
| zstyle ':completion:*' original true | |
| zstyle ':completion:*' verbose true | |
| zstyle :compinstall filename '/home/meskarune/.zshrc' | |
| autoload -Uz compinit |
| get_latest_release() { | |
| curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
| grep '"tag_name":' | # Get tag line | |
| sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
| } | |
| # Usage | |
| # $ get_latest_release "creationix/nvm" | |
| # v0.31.4 |