This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 2014-05-11 12:34:11,372 INFO amec.foobar.com 148.23.14.242 | action = accept | status = 200 | bytes = 235 | method = GET | request = /store/checkout?q=foo&var=123#test | custom_var = some string with a "|" in it | another_var = !@#$1234 | |
[my_sourcetype] | |
# index-time settings: | |
# http://regex101.com/r/fX9lB1 | |
LINE_BREAKER = ([\r\n]+)\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2},\d{3} [A-Z]+ | |
TRUNCATE = 1000 | |
SHOULD_LINEMERGE = false | |
# http://regex101.com/r/lK9xB8 | |
TIME_PREFIX = ^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Must run as root | |
NAME="my_server" | |
SSH_PORT=9922 | |
hostnamectl set-hostname $NAME | |
# SSH | |
echo -e "\nPort $SSH_PORT" >> /etc/ssh/sshd_config | |
service ssh restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# hobbes3 | |
import xml.etree.ElementTree as ET | |
import csv | |
from statistics import mean | |
KML_FILE = "sf_blocks.kml" | |
CSV_FILE = "sf_blocks_lat_lon.csv" | |
CSV_COLUMNS = ["BLKLOT", "lat", "lon"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TESTED in 7.3.x and 6.5.x (so should work in all other versions) | |
require([ | |
'jquery', | |
'underscore', | |
'splunkjs/mvc', | |
'splunkjs/mvc/simplexml/ready!' | |
], function( | |
$, | |
_, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Running as root | |
### PYENV | |
yum install -y git gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel zlib libffi-devel | |
# Switch to the user that will use pyenv | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile | |
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bash_profile | |
. ~/.bash_profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Updated ONLY for 6.3 (not tested on other Splunk versions) | |
* Known issue: Color ranges for Marker Gauge is all black because I can't distinguish between the different <rect> in the SVG | |
* - hobbes3 | |
*/ | |
/* BACKGROUND */ | |
body, | |
.dashboard-body, | |
.footer, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Provided by Gleb Esman --> | |
<html> | |
<div> | |
<a type="button" style="margin-bottom: 10px;" class="btn" href="/app/$env:app$/$env:page$">Reset dashboard</a> | |
</div> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# hobbes3 | |
# A way to handle indexing 2+ million XML files in a single directory (synced from a S3 bucket) | |
import glob | |
import time | |
import logging | |
import logging.handlers | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@version: 3.5.6 | |
# Typically placed as /etc/syslog-ng/conf.d/splunk.conf | |
options { | |
create-dirs(yes); | |
owner("splunk"); | |
group("splunk"); | |
dir-owner("splunk"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find /opt/splunk/etc/master-apps/ -name ".git" -exec dirname {} \; | xargs -I {} sh -c "echo {}; git -C {} pull;" |
NewerOlder