This is a short step-by-step guide on installing ElasticSearch LogStash and Kibana Stack on a CentOS environment to gather and analyze logs.
rpm -ivh https://dl.dropboxusercontent.com/u/5756075/jdk-7u45-linux-x64.rpm
# if you are in python3.X env, you should run | |
sudo apt-get install python3-dev | |
sudo apt-get install libevent-dev | |
sudo apt-get install libncurses5-dev | |
# if you are in python2.x env, then sudo apt-get install python-dev | |
# install readline | |
pip install readline | |
# config $HOME/.bashrc |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: logstash | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |
#!/usr/bin/env bash | |
# create self-signed server certificate: | |
read -p "Enter your domain [www.example.com]: " DOMAIN | |
echo "Create server key..." | |
openssl genrsa -out $DOMAIN.key 2048 |
Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.
The following steps assume you've got a set-up like mine, where:
require 'faraday' | |
require 'faraday_middleware' | |
require 'json' | |
# Debug: | |
# require "pry" | |
country_code_src = "USD" |
#!groovy | |
@NonCPS | |
def getACIChangeSets() { | |
def aci = [] | |
currentBuild.rawBuild.getChangeSets().each { cs -> | |
cs.getItems().each { item -> | |
item.getAffectedFiles().each { f -> | |
if (f.path.endsWith(".yml")) { | |
aci << f.path | |
} |
#!/usr/bin/env python | |
""" | |
Read item history from zabbix, and plot as histogram | |
""" | |
import matplotlib | |
import numpy as np | |
import matplotlib.mlab as mlab | |
import matplotlib.pyplot as plt | |
import requests | |
import json |
PHANTOMJS_CDNURL=https://npm.taobao.org/dist/phantomjs npm install phantomjs --registry=https://registry.npm.taobao.org --no-proxy |