For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
| # From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
| git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
| { | |
| "title": "Apache and Tomcat Logs", | |
| "services": { | |
| "query": { | |
| "list": { | |
| "0": { | |
| "query": "apache !tomcat !static", | |
| "alias": "", | |
| "color": "#7EB26D", | |
| "id": 0, |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| Problem: We have a log line that includes a perl class that we want to log the class | |
| and method in their respected fields. An example class and method in perl: | |
| Animal::Dog::bark | |
| In this example, "bark" is the method. "Animal::Dog" is the class. | |
| After some searching and hacking, I found a solution that works with Logstash 1.4.2 | |
| Assume the input is "Animal::Dog::bark". |
| const path = require("path") | |
| const fs = require("fs") | |
| // -- Webpack configuration -- | |
| const config = {} | |
| // Application entry point | |
| config.entry = "./src/server/index.js" |
| input { | |
| file { | |
| path => "/path/to/tomcat/logs/localhost_access_log*.txt" | |
| } | |
| } | |
| filter { | |
| grok { | |
| match => { | |
| "message" => "%{COMBINEDAPACHELOG} %{IPORHOST:serverip} %{NUMBER:serverport} %{NUMBER:elapsed_millis} %{NOTSPACE:sessionid} %{QS:proxiedip} %{QS:loginame}" |
| --- | |
| - hosts: all | |
| connection: paramiko | |
| vars: | |
| ansible_ssh_private_key_file: /path/to/private_key | |
| ansible_ssh_pass: passphrase_for_private_key | |
| tasks: | |
| - debug: | |
| msg: hello |