Commits

Benjamin Smith committed c5ca5a9

reorg

Comments (0)

Files changed (2)

presentation/index.rst

 Fabulous application deployment with Fabric
 ===========================================
 
-More deployment tools in Python
--------------------------------
-
-As the README says:
+`What is Fabric?  Well, as the README says:`
 
 `Fabric is a Python library and command-line tool for streamlining the
 use of SSH for application deployment or systems.`
 
 `Automation, FTMFW`
 
+Deploy a site quickly with Fabric
+=================================
 
+`I have a new repository and I want to deploy it to my canonical server.`
+
+`Showing you an example fab file.`
+
+Wow, pretty simple, but why?
+============================
+
+`You may not have 1 gagillion servers to manage like I do.`
+
+`Automation is full of win.  Why would you want to repeat yourself?`
+
+`Also, I was searching for filler.`
+
+The Final Cut
+=============
+
+`Seriously, I'm done this time..`
+
+`Benjamin W. Smith
+@benjaminws
+http://just-another.net`

pysp/splunk_examples.py

 
     def __init__(self):
         self._key = splunk_auth.getSessionKey('admin', 'changeme')
+        self.args = {'search': 'search sourcetype="syslog"',
+                     'latest_time': 'rt',
+                     'status_buckets': '300',
+                     'earliest_time': 'rt'}
 
     def tail_syslog(self, number=10):
         """Tail the last 'n' events"""
 
-        args = {'search': 'search sourcetype="syslog"',
-                'max_count': '%d' % number,
-                'latest_time': 'rt',
-                'status_buckets': '300',
-                'earliest_time': 'rt'}
+        self.args['max_count'] = number
 
-        search_job = splunk_search.dispatch(**args)
+        search_job = splunk_search.dispatch(**self.args)
 
         for index, event in enumerate(search_job.events):
             yield event
 
     def report_from_syslog(self):
         """Create basic report from syslog data"""
-        pass
+        self.args['earliest_time'] = '-1h'
+        self.args['latest_time'] = 'now'
+
+        search_job = splunk_search.dispatch(**self.args)
+
+        print search_job.events
+
+        search_job.cancel()
 
     def alert_from_syslog(self):
         """Create alert for nagios from syslog data"""