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
<html ng-app="app"> | |
<head> | |
<title>Hello Controllers in AngularJS</title> | |
</head> | |
<body> | |
<ng-view></ng-view> | |
<!-- Libraries --> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script> |
def _convert_java_millis(java_time_millis): | |
"""Provided a java timestamp convert it into python date time object""" | |
ds = datetime.datetime.fromtimestamp( | |
int(str(java_time_millis)[:10])) if java_time_millis else None | |
ds = ds.replace(hour=ds.hour,minute=ds.minute,second=ds.second,microsecond=int(str(java_time_millis)[10:]) * 1000) | |
return ds | |
def _convert_datetime_java_millis(st): | |
"""Provided a python datetime object convert it into java millis""" |
{ | |
"title": "Apache logs", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "*", | |
"alias": "", | |
"color": "#7EB26D", | |
"id": 0, |
Example -1 | |
===================== | |
input { | |
file { | |
path => [ "/usr/local/var/log/suricata/eve.json", "/var/log/ulogd.json" ] | |
codec => json | |
type => "json-log" | |
} | |
} |
input { | |
## WebLogic Server Log | |
file { | |
type => "weblogic" | |
path => [ "/var/log/weblogic/domain/managedserver.log" ] | |
codec => multiline { | |
pattern => "^####" | |
negate => true | |
what => previous | |
} |
def verify_sign(public_key_loc, signature, data): | |
''' | |
Verifies with a public key from whom the data came that it was indeed | |
signed by their private key | |
param: public_key_loc Path to public key | |
param: signature String signature to be verified | |
return: Boolean. True if the signature is valid; False otherwise. | |
''' | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 |
def sign_data(private_key_loc, data): | |
''' | |
param: private_key_loc Path to your private key | |
param: package Data to be signed | |
return: base64 encoded signature | |
''' | |
from Crypto.PublicKey import RSA | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.Hash import SHA256 | |
from base64 import b64encode, b64decode |
#!flask/bin/python | |
from flask import Flask, jsonify, abort, request, make_response, url_for | |
from flask_httpauth import HTTPBasicAuth | |
app = Flask(__name__, static_url_path = "") | |
auth = HTTPBasicAuth() | |
@auth.get_password | |
def get_password(username): | |
if username == 'miguel': |