Skip to content

Commit ff3bc49

Browse files
committed
v.2023.10.13.14.39.49
1 parent f02e81f commit ff3bc49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+30594
-35
lines changed

CODE_OF_CONDUCT.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## Code of Conduct
1+
# Code of Conduct
2+
23
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
34
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4-
opensource-codeofconduct@amazon.com with any additional questions or comments.
5+
opensource-codeofconduct@amazon.com with any additional questions or comments.

CONTRIBUTING.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ documentation, we greatly value feedback and contributions from our community.
66
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
77
information to effectively respond to your bug report or contribution.
88

9-
109
## Reporting Bugs/Feature Requests
1110

1211
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
@@ -19,8 +18,8 @@ reported the issue. Please try to include as much information as you can. Detail
1918
* Any modifications you've made relevant to the bug
2019
* Anything unusual about your environment or deployment
2120

22-
2321
## Contributing via Pull Requests
22+
2423
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2524

2625
1. You are working against the latest source on the *main* branch.
@@ -39,21 +38,20 @@ To send us a pull request, please:
3938
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4039
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
4140

42-
4341
## Finding contributions to work on
44-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
4542

43+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
4644

4745
## Code of Conduct
46+
4847
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
4948
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
5049
opensource-codeofconduct@amazon.com with any additional questions or comments.
5150

52-
5351
## Security issue notifications
54-
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
5552

53+
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
5654

5755
## Licensing
5856

59-
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
57+
See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution.

LICENSE

-17
This file was deleted.

LICENSE.txt

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this
4+
software and associated documentation files (the "Software"), to deal in the Software
5+
without restriction, including without limitation the rights to use, copy, modify,
6+
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
7+
permit persons to whom the Software is furnished to do so.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
10+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
11+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
12+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
13+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

NOTICE.txt

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
DBTop Monitoring
2+
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
4+
**********************
5+
THIRD PARTY COMPONENTS
6+
**********************
7+
This software includes third party software subject to the following copyrights:
8+
9+
aws-amplify/ui-react under the Apache License 2.0
10+
cloudscape-design/components under the Apache License 2.0
11+
cloudscape-design/design-tokens under the Apache License 2.0
12+
cloudscape-design/global-styles under the Apache License 2.0
13+
awsui/components-react under the Apache License 2.0
14+
testing-library/jest-dom under the Massachusetts Institute of Technology (MIT) license
15+
testing-library/react under the Massachusetts Institute of Technology (MIT) license
16+
testing-library/user-event under the Massachusetts Institute of Technology (MIT) license
17+
axios under the Massachusetts Institute of Technology (MIT) license
18+
crypto-js under the Massachusetts Institute of Technology (MIT) license
19+
react under the Massachusetts Institute of Technology (MIT) license
20+
react-apexcharts under the Massachusetts Institute of Technology (MIT) license
21+
react-dom under the Massachusetts Institute of Technology (MIT) license
22+
react-router-dom under the Massachusetts Institute of Technology (MIT) license
23+
react-scripts under the Massachusetts Institute of Technology (MIT) license
24+
web-vitals under the Apache License 2.0
25+
aws-sdk under the Apache License 2.0
26+
request under the Apache License 2.0
27+
cors under the Massachusetts Institute of Technology (MIT) license
28+
express under the Massachusetts Institute of Technology (MIT) license
29+
jsonwebtoken under the Massachusetts Institute of Technology (MIT) license
30+
jwk-to-pem under the Apache License 2.0
31+
mysql2 under the Massachusetts Institute of Technology (MIT) license
32+
mssql under the Massachusetts Institute of Technology (MIT) license
33+
oracledb under the Apache License 2.0
34+
pg under the Massachusetts Institute of Technology (MIT) license
35+
redis under the Massachusetts Institute of Technology (MIT) license
36+
redis-info under the Massachusetts Institute of Technology (MIT) license
37+
uuid under the Massachusetts Institute of Technology (MIT) license
38+
39+

README.md

+187-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,195 @@
1-
## My Project
1+
# DBTop Monitoring Solution for AWS Database Services
2+
3+
> **Disclaimer:** The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances, using Amazon CloudWatch or Amazon Cognito.
4+
5+
6+
## What is DBTop Monitoring ?
7+
8+
DBTop Monitoring is evolution of [RDSTop Monitoring Solution](https://github.com/aws-samples/rds-top-monitoring) initiative.
9+
10+
DBTop Monitoring is lightweight application to perform realtime monitoring for AWS Database Resources.
11+
Based on same simplicity concept of Unix top utility, provide quick and fast view of database performance, just all in one screen.
12+
13+
14+
<img width="1089" alt="image" src="./images/img01.png">
15+
16+
17+
## How looks like DBTop Monitoring ?
18+
19+
<img width="1089" alt="image" src="./images/img04.png">
20+
21+
22+
## How it works?
23+
24+
<img width="1089" alt="image" src="./images/img02.png">
25+
26+
27+
28+
29+
## Database engine support
30+
31+
DBTop Monitoring Solution currently supports following database engines:
32+
33+
- AWS RDS for MySQL
34+
- AWS RDS for PostgreSQL
35+
- AWS RDS for MariaDB
36+
- AWS RDS for Oracle
37+
- AWS RDS for SQLServer
38+
- Amazon Aurora Instance (MySQL-Compatible Edition)
39+
- Amazon Aurora Instance (PostgreSQL-Compatible Edition)
40+
- Amazon ElastiCache for Redis
41+
- Amazon MemoryDB for Redis
42+
- Amazon Aurora Clusters (MySQL-Compatible Edition)
43+
- Amazon Aurora Clusters (PostgreSQL-Compatible Edition)
44+
- Amazon DocumentDB Clusters
45+
46+
Additional expanded support coming later to :
47+
48+
- Amazon OpenSearch
49+
50+
51+
52+
53+
54+
## Solution Components
55+
56+
- **Frontend.** React Developed Application to provide user interface to visualize performance database information.
57+
58+
- **Backend.** NodeJS API Component to gather performance information from database engines, AWS CloudWatch and Enhanced Monitoring.
59+
60+
61+
## Architecture
62+
63+
<img width="1023" alt="image" src="./images/img03.png">
64+
65+
66+
## Use cases
67+
68+
- **Monitor instance performance.**
69+
Visualize performance data on realtime, and correlate data to understand and resolve the root cause of performance issues in your database instances.
70+
71+
- **Perform root cause analysis.**
72+
Analyze database and operating system metrics to speed up debugging and reduce overall mean time to resolution.
73+
74+
- **Optimize resources proactively.**
75+
Identify top consumer sessions, gather SQL statements and resource usages.
76+
77+
78+
79+
## Solution Requirements
80+
81+
#### Amazon RDS Enhanced Monitoring
82+
83+
Amazon RDS provides metrics in real time for the operating system (OS) that your DB instance runs on. DBTop Monitoring solution integrate metrics from Enhanced Monitoring and it has to be enabled.
84+
Follow procedure below to turn on Enhanced Monitoring.
85+
86+
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.Enabling.html
87+
88+
89+
#### VPC Network Access to AWS Database Instances
90+
91+
DBTop Monitoring Solution needs to access privately AWS Database resources, grant inboud access for security groups used by database resources.
92+
93+
94+
95+
## Resource Usage and Cost
96+
97+
DBTop Monitoring Solution will use following resources:
98+
99+
- **AWS EC2 instance.**
100+
The cost of this resource will depend of size selected during the deployment process. AWS EC2 instance pricing can be review [here](https://aws.amazon.com/ec2/pricing/).
101+
102+
- **AWS CloudWatch API Calls.**
103+
The cost of this resource will depend how much time the application is being used and modules as well.
104+
DBTop Monitoring Solution uses data extracted from DBEngine itself and only extract information on demand from AWS CloudWatch (GetMetricData API) in case the module is selected.
105+
AWS CloudWatch API Calls pricing can be review [here](https://aws.amazon.com/cloudwatch/pricing/).
106+
107+
108+
109+
## Solution Deployment
110+
111+
112+
113+
> **Time to deploy:** Approximately 10 minutes.
114+
115+
116+
### Create database monitoring users
117+
118+
Database credentials are needed to connect to the database engine and gather real-time metrics, use following statements to create the monitoring users.
119+
120+
#### MySQL
121+
```
122+
CREATE USER 'monitor'@'%' IDENTIFIED BY '<PASSWORD>';
123+
GRANT PROCESS ON *.* TO 'monitor'@'%' ;
124+
```
125+
126+
#### PostgreSQL
127+
```
128+
CREATE USER monitor WITH PASSWORD '<PASSWORD>';
129+
GRANT pg_read_all_stats TO monitor;
130+
```
131+
132+
#### MS SQLServer
133+
```
134+
USE [master]
135+
GO
136+
CREATE LOGIN [monitor] WITH PASSWORD=N'<PASSWORD>', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
137+
GO
138+
use [master]
139+
GO
140+
GRANT CONNECT SQL TO [monitor]
141+
GO
142+
GRANT VIEW SERVER STATE TO [monitor]
143+
GO
144+
```
145+
146+
#### Oracle
147+
```
148+
CREATE USER monitor IDENTIFIED BY '<PASSWORD>';
149+
GRANT CREATE SESSION,SELECT ANY DICTIONARY TO monitor;
150+
```
151+
152+
153+
#### Amazon DocumentDB
154+
```
155+
db.createUser(
156+
{
157+
user: "monitor",
158+
pwd: "<PASSWORD>",
159+
roles: [ "clusterMonitor" ]
160+
}
161+
)
162+
```
163+
164+
### Launch CloudFormation Stack
165+
166+
Follow the step-by-step instructions to configure and deploy the DBTop Monitoring Solution into your account.
167+
168+
1. Make sure you have sign in AWS Console already.
169+
2. Download AWS Cloudformation Template (DBMonitoringSolution.template) located into conf folder.
170+
3. [**Open AWS CloudFormation Console**](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=DBTopMonitoringSolution)
171+
4. Create an stack using Cloudformation template (DBMonitoringSolution.template) already downloaded on step 2.
172+
5. Input **Stack name** parameter.
173+
6. Acknowledge **Application Update - Disclaimer** parameter.
174+
7. Input **Username** parameter, this username will be used to access the application. An email will be sent with temporary password from AWS Cognito Service.
175+
8. Input **AWS Linux AMI** parameter, this parameter specify AWS AMI to build App EC2 Server. Keep default value.
176+
9. Select **Instance Type** parameter, indicate what instance size is needed.
177+
10. Select **VPC Name** parameter, indicate VPC to be used to deploy application server.
178+
11. Select **Subnet Name** parameter, indicate subnet to be used to deploy application server, this subnet needs to have outbound internet access to reach AWS APIs. Also application server needs to be able to reach AWS Database Resources, add appropiate inboud rules on AWS RDS security groups to allow network connections.
179+
12. Select **Public IP Address** parameter, the deployment will assign private IP Address by default to access the application, you can assign Public IP Address to access the application in case you need it, Select (true) to assign Public IP Address.
180+
13. Input **CIDR** parameter, specify CIDR inbound access rule, this will grant network access for the application.
181+
14. Click **Next**, Click **Next**, select **acknowledge that AWS CloudFormation might create IAM resources with custom names**. and Click **Submit**.
182+
15. Once Cloudformation has been deployed, gather application URL from output stack section. Username will be same you introduce on step 7 and temporary password will be sent by AWS Cognito Service.
183+
16. Application deployment will take around 5 minutes to be completed.
184+
185+
> **Note:** Because you are connecting to a site with a self-signed, untrusted host certificate, your browser may display a series of security warnings.
186+
Override the warnings and proceed to the site. To prevent site visitors from encountering warning screens, you must obtain a trusted,
187+
CA-signed certificate that not only encrypts, but also publicly authenticates you as the owner of the site.
2188

3-
TODO: Fill this README out!
4189

5-
Be sure to:
6190

7-
* Change the title in this README
8-
* Edit your repository description on GitHub
9191

10-
## Security
11192

12-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
13193

14-
## License
15194

16-
This library is licensed under the MIT-0 License. See the LICENSE file.
17195

0 commit comments

Comments
 (0)