Giter VIP home page Giter VIP logo

rds_slow_query_log_examiner's People

Contributors

daxbert avatar

Watchers

 avatar  avatar

rds_slow_query_log_examiner's Issues

500 error on /stream/data page when zero results

See error below

2018-08-13 15:05:43,121 - rds_slow_query_log_examiner - INFO - Key: ..._1534197600000_1534197265000
2018-08-13 15:05:51,791 - rds_slow_query_log_examiner - INFO - Event Count: 0
2018-08-13 15:05:51,805 - rds_slow_query_log_examiner - INFO - Budget Left: 20000
[2018-08-13 15:05:51,813] ERROR in app: Exception on /us-west-2/stream/data/arn:aws:logs:us-west-2:.../slowquery:log-stream:.../ [GET]
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/apps/rds_slow_query_log_examiner/www/app.py", line 210, in stream_page
    logEntries = getLogEntries(stream['logGroup'], stream['logStreamName'], start_timestamp, end_timestamp)
  File "/apps/rds_slow_query_log_examiner/www/app.py", line 343, in getLogEntries
    logger.info('TOTAL Queries Parsed: {}'.format(logEntries['METRICS']['TOTAL_QUERY_COUNT']))
KeyError: 'METRICS'

Add support for Windows

adding .ps1 files for Powershell on Windows.

This should allow Windows 8+ users who also have Docker installed on Windows to work with this project

Adjust fingerprint to collapse all VALUES (...) into a common hash

Here's an example where we really should have just collapsed the VALUES to VALUES ( {VALUE_LIST} )

INSERT INTO table ( ... ) VALUES (####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####,{STRING},{STRING},{STRING},{STRING}),(####... );

Empty date in UI throws 500

Set start date, clear end date, click submit.

[2018-08-02 10:23:22,636] ERROR in app: Exception on /us-west-2/stream/data/... [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File "/apps/rds_slow_query_log_examiner/www/app.py", line 208, in stream_page
endDateTimestamp = int(datetime.datetime.strptime(endDateString, "%Y/%m/%d %H:%M:%S").timestamp() * 1000)
File "/usr/lib64/python3.6/_strptime.py", line 565, in _strptime_datetime
tt, fraction = _strptime(data_string, format)
File "/usr/lib64/python3.6/_strptime.py", line 362, in _strptime
(data_string, format))
ValueError: time data '' does not match format '%Y/%m/%d %H:%M:%S'

Test framework

Need to get a test framework in place

  • we should be able to run tests after all commits
  • do we auto-merge to master with success?
  • how to mock AWS?
  • enhance existing DockerHub integration? or another web build pipeline?

Allow for AWS credentials to be provided in the web UI

Right now the credentials are expected to be provided by the command line via environment variables.

Add feature to support credentials via the web UI.

Considerations:

  • Session Management
  • Layout changed to support login
  • SSL ( while this is intended to be used locally, however dumb crap happens, insure SSL when localhost is not in use )

Provide slowest view for various queries

All metrics are currently aggregated over the given query's fingerprint/hash. Provide a slowest / worst view for those queries within a given fingerprint/hash.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.