{"id":21069254,"url":"https://github.com/abalbekov/dba_hist_sysmetric_viewer","last_synced_at":"2026-05-09T13:33:41.273Z","repository":{"id":223547663,"uuid":"168456646","full_name":"abalbekov/dba_hist_sysmetric_viewer","owner":"abalbekov","description":"A single page web application to view timeseries data from Oracle's DBA_HIST_SYSMETRIC_HISTORY and DBA_HIST_SYSMETRIC_SUMMARY ","archived":false,"fork":false,"pushed_at":"2019-02-12T21:50:03.000Z","size":418,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-20T21:42:10.308Z","etag":null,"topics":["flask","javascript","oracle-database","python"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abalbekov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-01-31T03:30:25.000Z","updated_at":"2019-02-15T03:19:03.000Z","dependencies_parsed_at":"2024-02-20T20:51:30.904Z","dependency_job_id":null,"html_url":"https://github.com/abalbekov/dba_hist_sysmetric_viewer","commit_stats":null,"previous_names":["abalbekov/dba_hist_sysmetric_viewer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abalbekov%2Fdba_hist_sysmetric_viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abalbekov%2Fdba_hist_sysmetric_viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abalbekov%2Fdba_hist_sysmetric_viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abalbekov%2Fdba_hist_sysmetric_viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abalbekov","download_url":"https://codeload.github.com/abalbekov/dba_hist_sysmetric_viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243510256,"owners_count":20302329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","javascript","oracle-database","python"],"created_at":"2024-11-19T18:33:45.042Z","updated_at":"2026-05-09T13:33:36.245Z","avatar_url":"https://github.com/abalbekov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Oracle Sysmetric History Viewer\n\nThis is a single page web application to diplay timeseries data from Oracle's \nDBA_HIST_SYSMETRIC_HISTORY and DBA_HIST_SYSMETRIC_SUMMARY views.\n\nExample screenshot:\n\n![alt text](https://github.com/abalbekov/dba_hist_sysmetric_viewer/blob/master/screenshot1.png \"Oracle Sysmetric History Viewer\")\n\nLeft side is a scrollable sysmetrics chart.\n\nRight side shows v$sqlmonitor table content with sqlid executions falling within sysmetrics chart window.\n\nA specific sqlid line on the v$sqlmonitor table can be expanded to open a SQLTUNE sqlmonitor report:\n\n![alt text](https://github.com/abalbekov/dba_hist_sysmetric_viewer/blob/master/screenshot2.png)\n\nApplication architecture consists of following components:\n\n- Javacript and CSS in client browser\n- Server side Python Flask application \n- Target database(s)  \n\n### Deployment options\n1. Application can be run on a laptop: \nPyhon Flask is run from CMD prompt and then web page is opened in a browser.\nTarget Database connections are set via environment variables.\nSee \u003chere\u003e for instructions.\n\n2. Application can also run in Docker container.\nSee \u003chere\u003e for instructions.\n\n3. Application can also be deployed severless onto AWS Lambda and S3 bucket.\nRunning example is located at \u003chere\u003e\nSee \u003chere\u003e for instructions.\n\n### Browser side implementation details\n  \nJavascript code in browser uses several jQuery plugins.\n\n- Database connection selection dropdown and metrics selection dropdown \nuses \u003chere\u003e plugin which shortens dropdown selection list as you type.\nThis greatly helps with long selection lists which would otherwise require\nlots of scrolling. \n\n\t\n![alt text](https://github.com/abalbekov/dba_hist_sysmetric_viewer/blob/master/screenshot3-4.png)\n\n- Charts are built with \"dyGraph\" object.\nThis provides highly performant interactive charts capable of handling \nlarge amounts of timeseries data. dyGraph provides built-in scrolling, \npanning and range selector among other features.\n\nTimeseries data is received asynchronously from the server side Python Flask application using Ajax.\nTo reduce database workload only portion of timeseries data is requested, enough to fill\nselected time window plus some buffer. Then when user does scrolling and panning, additional \ndata is asynchronously requested and spliced with already downloaded data. \n\t\n### Server side implementation details\n\nServer side is using Python Flask to expose endpoint URL supplying timeseries data.\nPython uses cx_Oracle module to connect to target database and extract data \nfrom DBA_SYSMETRIC_HISTORY and DBA_SYSMETRIC_SUMMARY views.\n\nWhen making database connections, the connection objects are preserved in a top-level \ndictionary so that established connections can be reused by subsequent browser requests.\n\nWhen sending data, Python code is using streaming technique so that browser \ndoes not wait until complete dataset is retrieved from database.\n\t\nBoth Flask and cx_Oracle are running with threading option so that multiple async \nrequests can be processed at the same time and multiple browsers can make requests.\n\nWhen retrieving data from database, database timestamps are converted to browser time zone in SQL.\n\nWhen retrieving sysmetrics data, SQL also generates \"derived\" timeseries for cases\nwhen \"per sec\" metrics is not available. The derived data are based on \navailable \"Per Txn\" metrics multiplied by \"User Transactions Per Sec\" metrics. \nSee details here ...\n\nFor RAC targets, client browser can request data either combined across all instances\nor per-instance data. See formulas here ...\n\n### Serverless AWS Lambda and S3 deployment\n\nApplication Python/Flask code can be deployed in AWS Lambda. \nZappa project \u003chere\u003e greatly simplifies Flask deployment to AWS Lambda.\n\nThe Lambda endpoint URL is exposed via API Gateway.\nStatic HTML, CSS and Javascript files are stored in S3 bucket.\nS3 bucket is configured with Static Web Hosting.\n\nWhen client browser accesses S3 URL, HTML/CSS/Javascript are sent to the browser \nand then browser javascript retrieves data from API gateway endpoint.\nSee details here ...\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabalbekov%2Fdba_hist_sysmetric_viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabalbekov%2Fdba_hist_sysmetric_viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabalbekov%2Fdba_hist_sysmetric_viewer/lists"}