Skip to main content

Opsy type tools I use everyday that you might find useful

Project description


Silly ops things you do repeatedly, but can't be bothered to script :)


pip3 install opstools


The --help should suffice in most cases, but searching with lblogs command could use some explanation.

To get a list of loadbalancers, run the command without options:

opstools lblogs

Prints out the logs from the last 2 logfiles by default, but you can go further back with the --last option:

opstools lblogs --lb mylb --last 5

Search functionality is greedy AND — i.e. the string "foo" will also match "foobar", and if multiple search items are given, then all must match. Items are space separated, and must be formatted like this: key=value:

opstools lblogs --lb mylb -s 'target_port= request_verb=GET'

The above example will only return results that match both target_port with the substring "" and request_verb with the substring "GET".


  • Add time of any events to output

  • Catch this:

    Traceback (most recent call last):
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/", line 917, in _bootstrap_inner
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/", line 865, in run
      self._target(*self._args, **self._kwargs)
    File "/Users/afraz/repos/", line 39, in send_requests
      this_request = this_session.get(url, verify=False, headers=these_headers)
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/site-packages/requests/", line    543, in get
      return self.request('GET', url, **kwargs)
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/site-packages/requests/", line    530, in request
      resp = self.send(prep, **send_kwargs)
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/site-packages/requests/", line    643, in send
      r = adapter.send(request, **kwargs)
    File "/Users/afraz/.pyenv/versions/3.7.2/lib/python3.7/site-packages/requests/", line    498, in send
      raise ConnectionError(err, request=request)
    requests.exceptions.ConnectionError: ('Connection aborted.', OSError("(60, 'ETIMEDOUT')"))

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opstools-0.2.1.tar.gz (22.2 kB view hashes)

Uploaded source

Built Distribution

opstools-0.2.1-py3-none-any.whl (24.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page