Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Python wrapper for Rapid7 Insight Logsearch API

License

NotificationsYou must be signed in to change notification settings

seamusc/lepy

Repository files navigation

Build Status

lepy is a Python library to enable access to the Rapid7Log Search API in an easy to use, programatic manner.

Install

python setup.py install

Example usage

>>> from logsearch.logsearch import LogSearch>>> ls = LogSearch(API_KEY)>>> web_log_id = 'e1dc8460-c28e-434e-b990-dd0faea894a8'>>> query = 'where(response_code=500) calculate(count)'>>> result = ls.search(log_ids=[web_log_id], query=query, time_range='Last 24 Hours')Progress |################################| 100% 4s 0:00:00>>> print result.display(){    "during": {        "from": 1548706511751,         "time_range": "last 24 hours",         "to": 1548792911751    },     "statement": "where(response_code=500) calculate(count)"}Statistics response calculate( count )Timestamp                   count------------------------  -------28/01/19 20:15:11.751000       9228/01/19 17:51:11.751000       3328/01/19 15:27:11.751000       1228/01/19 13:03:11.751000       1328/01/19 10:39:11.751000       1428/01/19 08:15:11.751000      13428/01/19 05:51:11.751000       8028/01/19 03:27:11.751000      10528/01/19 01:03:11.751000      38627/01/19 22:39:11.751000      101

About

Python wrapper for Rapid7 Insight Logsearch API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp