Skip to content

Instantly share code, notes, and snippets.

View ltudury's full-sized avatar

Leila Tudury ltudury

View GitHub Profile
@ltudury
ltudury / gist:1636489
Created January 18, 2012 23:24
Loggly Search: JSON output
{
"data": [
{
"timestamp": "2010-02-17 02:08:45.912-0700",
"inputname": "solrclient",
"ip": "127.0.0.1",
"text": "btpool0-87 SolrCore.execute INFO: [repo_6] webapp=/solr path=/select/ params={sort=timestamp+desc&start=0&q=404&version=2.2&rows=100} hits=7182 status=0 QTime=0 \n",
},
{
"timestamp": "2010-02-17 02:08:29.123-0700",
@ltudury
ltudury / inputDiscovery.py
Created January 18, 2012 00:55
Automatic Device Discovery
import json
import sys
import urllib2
'''
Auto-authenticate Syslog TCP inputs.
Usage: python inputs.py -u user -p pass -s subdomain
'''
state = None
@ltudury
ltudury / LogglySenderv0.1.sh
Created January 14, 2012 00:23
LogglySender
#!/usr/local/bin/perl
#---------
# LogglySender v0.1
# Sends log lines from Apache to Loggly via an HTTP input
# http://wiki.loggly.com/
#---------
# IMPORTANT: Be sure to make this script executable!
# (e.g. "chmod +x logglysender.pl")
#---------
use LWP::UserAgent;