From 16bce7768fde9794b8ee79d3bbfabd49fa2745f8 Mon Sep 17 00:00:00 2001 From: Joe Friedrich Date: Mon, 11 Jun 2012 17:34:09 -0700 Subject: [PATCH 1/4] Add Some Readme info --- README | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..fa38f76 --- /dev/null +++ b/README @@ -0,0 +1,79 @@ +Hoover +===== + +A python wrapper used to hit the Loggly API + +For more information on Hoover see + +Install +------- + + + +Using Hoover +------------ + +First you'll want to create a Loggly Session that will hold your subdomain, username, and password: + import hoover + . + . + . + i = hoover.LogglySession('','','') + + i.search(q='apache2 error', starttime='NOW-2DAYS', format='csv') + i.search(q='json.priority:err', starttime='NOW-15MINUTES') #Defaults to json if format is left out + + +Search Properties +----------------- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyDescription
rowsNumber of rows returned by your query. Defaults to 10.
startOffset for starting row. Defaults to 0.
starttime +
endtimeEnd time for the search. Defaults to NOW.
orderDirection of results returned, either 'asc' or 'desc'. Defaults to 'desc'.
callbackJSONP callback to receive a JSONP response.
formatOutput format, either 'json', 'xml', or 'text'. Defaults to 'json'
fieldsWhich fields should be output. One or more of the following separated by commas: 'id', 'timestamp', 'ip', 'inputname', 'text'.
+ + +Python Logging +-------------- + +Meta +---- + +Created and maintained by Mike Blume + +If you have questions contact support@loggly.com From 91ec3f521f98249d8d5bf5b7184b4953e323acb1 Mon Sep 17 00:00:00 2001 From: Joe Friedrich Date: Mon, 11 Jun 2012 17:39:43 -0700 Subject: [PATCH 2/4] add markdown syntax --- README => README.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README => README.md (100%) diff --git a/README b/README.md similarity index 100% rename from README rename to README.md From 9139b63417d1009974bcf7e32dcd32ccaa9671e9 Mon Sep 17 00:00:00 2001 From: Joe Friedrich Date: Mon, 11 Jun 2012 18:49:43 -0700 Subject: [PATCH 3/4] More additions --- README.md | 75 ++++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 63 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index fa38f76..69e026e 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,33 @@ -Hoover -===== +#Hoover + A python wrapper used to hit the Loggly API For more information on Hoover see -Install -------- +##Install + +With this git repo: + cd /hoover + sudo python setup.py install + + + +Easy Install: + $easy_install -U hoover + +Pypi: + + + + +##Using Hoover -Using Hoover ------------- +Enter your credentials in hoover.LogglySession after importing: -First you'll want to create a Loggly Session that will hold your subdomain, username, and password: + import hoover . . @@ -22,10 +36,10 @@ First you'll want to create a Loggly Session that will hold your subdomain, user i.search(q='apache2 error', starttime='NOW-2DAYS', format='csv') i.search(q='json.priority:err', starttime='NOW-15MINUTES') #Defaults to json if format is left out - -Search Properties ------------------ + +##Search Properties + @@ -67,9 +81,46 @@ Search Properties
+##Search Guide + + +Be Aware: + +* Does not support case-sensitive searches. Everything is case-insensitive. +* Punctuations are not search-able. For example, '[' or ']' are not indexed, so a search for: '[error]' is the same as a search for 'error' +* Right now, we break on case-changes or changes from numerical to alpha characters. So, a search for 'www' will find results containing 'www111' or 'www112ww'. + + +##More Functions + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FunctionDescription
*.config_inputs()
*.create_input()
*.facets()
*.http_inputs()
*.search()
-Python Logging --------------- Meta ---- From d8fa5e664c906bb1b3dc2ab0e0d02f232d9b3785 Mon Sep 17 00:00:00 2001 From: Joe Friedrich Date: Tue, 12 Jun 2012 13:24:17 -0700 Subject: [PATCH 4/4] Update master --- README.md | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 69e026e..55637f3 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ #Hoover -A python wrapper used to hit the Loggly API +A python wrapper used to hit the [Loggly](http://loggly.com "Loggly"). API For more information on Hoover see @@ -16,9 +16,7 @@ With this git repo: Easy Install: $easy_install -U hoover -Pypi: - - +Pypi: @@ -40,6 +38,7 @@ Enter your credentials in hoover.LogglySession after importing: ##Search Properties +For more details on using search within Loggly check out @@ -56,7 +55,7 @@ Enter your credentials in hoover.LogglySession after importing: - @@ -81,16 +80,6 @@ Enter your credentials in hoover.LogglySession after importing:
starttime + Start time for the search. Defaults to NOW-24HOURS.
endtime
-##Search Guide - - -Be Aware: - -* Does not support case-sensitive searches. Everything is case-insensitive. -* Punctuations are not search-able. For example, '[' or ']' are not indexed, so a search for: '[error]' is the same as a search for 'error' -* Right now, we break on case-changes or changes from numerical to alpha characters. So, a search for 'www' will find results containing 'www111' or 'www112ww'. - - ##More Functions @@ -101,23 +90,28 @@ Be Aware: - + - + - + - + - + + + + +
*.config_inputs()Configures each input in your loggly account, register a python logger + with the input's name logging to the input.
*.create_input()Creates a new input on your loggly account.
*.facets()Thin wrapper on Loggly's facet search API. facetby can be input, ip, or date
*.http_inputs()Lists all http inputs
*.search()See above "Search Properties"
*.inputsLists all inputs