Skip to content

Commit 3a1f4c6

Browse files
committed
Add support for cluster status
1 parent d8fa426 commit 3a1f4c6

File tree

14 files changed

+973
-480
lines changed

14 files changed

+973
-480
lines changed

README.md

Lines changed: 37 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,60 +3,54 @@
33
> **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.
44
55

6-
76
## What is DBTop Monitoring ?
87

98
DBTop Monitoring is evolution of [RDSTop Monitoring Solution](https://github.com/aws-samples/rds-top-monitoring) initiative.
109

11-
DBTop Monitoring is lightweight application to perform real-time monitoring for AWS Database Resources.
10+
DBTop Monitoring is lightweight application to perform realtime monitoring for AWS Database Resources.
1211
Based on same simplicity concept of Unix top utility, provide quick and fast view of database performance, just all in one screen.
1312

14-
<img width="1089" alt="image" src="./images/image01.png">
1513

14+
<img width="1089" alt="image" src="./images/image01.png">
1615

1716

18-
## How does DBTop Monitoring look like?
17+
## How looks like DBTop Monitoring ?
1918

2019
<img width="1089" alt="image" src="./images/image02.png">
2120

2221
<img width="1089" alt="image" src="./images/image03.png">
2322

2423
<img width="1089" alt="image" src="./images/image04.png">
2524

26-
27-
### [Visit the YouTube channel for videos](https://www.youtube.com/@DBTopMonitoringSolution)
28-
29-
30-
3125
## How it works?
3226

3327
<img width="1089" alt="image" src="./images/image05.png">
3428

3529

3630

31+
3732
## Database engine support
3833

3934
DBTop Monitoring Solution currently supports following database engines:
4035

41-
- [Amazon Relational Database Service (RDS)](https://aws.amazon.com/rds/)
42-
- [Amazon RDS for MySQL](https://aws.amazon.com/rds/mysql/)
43-
- [Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/)
44-
- [Amazon RDS for MariaDB](https://aws.amazon.com/rds/mariadb/)
45-
- [Amazon RDS for Oracle](https://aws.amazon.com/rds/oracle/)
46-
- [Amazon RDS for SQLServer](https://aws.amazon.com/rds/sqlserver/)
47-
- [Amazon Aurora Instance (MySQL-Compatible Edition)](https://aws.amazon.com/rds/aurora/)
48-
- [Amazon Aurora Instance (MySQL-Compatible Edition)](https://aws.amazon.com/rds/aurora/)
49-
- [Amazon Aurora Instance (PostgreSQL-Compatible Edition)](https://aws.amazon.com/rds/aurora/)
50-
- [Amazon Aurora Clusters (MySQL-Compatible Edition)](https://aws.amazon.com/rds/aurora/)
51-
- [Amazon Aurora Clusters (PostgreSQL-Compatible Edition)](https://aws.amazon.com/rds/aurora/)
52-
- [Amazon In-Memory Databases](https://aws.amazon.com/elasticache/)
53-
- [Amazon ElastiCache for Redis](https://aws.amazon.com/elasticache/redis/)
54-
- [Amazon MemoryDB for Redis](https://aws.amazon.com/memorydb/)
55-
- [Amazon DocumentDB (with MongoDB compatibility)](https://aws.amazon.com/documentdb/)
36+
- AWS RDS for MySQL
37+
- AWS RDS for PostgreSQL
38+
- AWS RDS for MariaDB
39+
- AWS RDS for Oracle
40+
- AWS RDS for SQLServer
41+
- Amazon Aurora Instance (MySQL-Compatible Edition)
42+
- Amazon Aurora Instance (PostgreSQL-Compatible Edition)
43+
- Amazon ElastiCache for Redis
44+
- Amazon MemoryDB for Redis
45+
- Amazon Aurora Clusters (MySQL-Compatible Edition)
46+
- Amazon Aurora Clusters (PostgreSQL-Compatible Edition)
47+
- Amazon DocumentDB Clusters
5648

5749
Additional expanded support coming later to :
5850

59-
- [Amazon OpenSearch Service](https://aws.amazon.com/opensearch-service/)
51+
- Amazon OpenSearch
52+
53+
6054

6155

6256

@@ -67,13 +61,11 @@ Additional expanded support coming later to :
6761
- **Backend.** NodeJS API Component to gather performance information from database engines, AWS CloudWatch and Enhanced Monitoring.
6862

6963

70-
7164
## Architecture
7265

7366
<img width="1023" alt="image" src="./images/image06.png">
7467

7568

76-
7769
## Use cases
7870

7971
- **Monitor instance performance.**
@@ -89,25 +81,18 @@ Additional expanded support coming later to :
8981

9082
## Solution Requirements
9183

92-
#### [Amazon RDS](https://aws.amazon.com/rds/) Enhanced Monitoring
84+
#### Amazon RDS Enhanced Monitoring
9385

94-
[Amazon RDS](https://aws.amazon.com/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. Follow procedure below to turn on Enhanced Monitoring.
86+
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.
87+
Follow procedure below to turn on Enhanced Monitoring.
9588

96-
[Setting up and enabling Enhanced Monitoring](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.Enabling.html)
89+
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Monitoring.OS.Enabling.html
9790

9891

9992
#### VPC Network Access to AWS Database Instances
10093

10194
DBTop Monitoring Solution needs to access privately AWS Database resources, grant inboud access for security groups used by database resources.
10295

103-
_First, you need to take a note of the Cloudformation resources created by the stack_
104-
105-
<img width="1023" alt="Cloudformation Security Group Id" src="./images/image07.png">
106-
107-
108-
_Second, you need to edit the Security Group that allows access to your Database resources, in this case to ElastiCache_
109-
110-
<img width="1023" alt="Edit Security Group Id to Allow Redis" src="./images/image08.png">
11196

11297

11398
## Resource Usage and Cost
@@ -126,30 +111,29 @@ DBTop Monitoring Solution will use following resources:
126111

127112
## Solution Deployment
128113

114+
115+
129116
> **Time to deploy:** Approximately 10 minutes.
130117
131118

132119
### Create database monitoring users
133120

134121
Database credentials are needed to connect to the database engine and gather real-time metrics, use following statements to create the monitoring users.
135122

136-
137-
#### [Amazon RDS for MySQL](https://aws.amazon.com/rds/mysql/)
138-
```sql
123+
#### MySQL
124+
```
139125
CREATE USER 'monitor'@'%' IDENTIFIED BY '<PASSWORD>';
140126
GRANT PROCESS ON *.* TO 'monitor'@'%' ;
141127
```
142128

143-
144-
#### [Amazon RDS for PostgreSQL](https://aws.amazon.com/rds/postgresql/)
145-
```sql
129+
#### PostgreSQL
130+
```
146131
CREATE USER monitor WITH PASSWORD '<PASSWORD>';
147132
GRANT pg_read_all_stats TO monitor;
148133
```
149134

150-
151-
#### [Amazon RDS for SQLServer](https://aws.amazon.com/rds/sqlserver/)
152-
```sql
135+
#### MS SQLServer
136+
```
153137
USE [master]
154138
GO
155139
CREATE LOGIN [monitor] WITH PASSWORD=N'<PASSWORD>', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=ON, CHECK_POLICY=ON
@@ -162,15 +146,14 @@ GRANT VIEW SERVER STATE TO [monitor]
162146
GO
163147
```
164148

165-
166-
#### [Amazon RDS for Oracle](https://aws.amazon.com/rds/oracle/)
167-
```sql
149+
#### Oracle
150+
```
168151
CREATE USER monitor IDENTIFIED BY '<PASSWORD>';
169152
GRANT CREATE SESSION,SELECT ANY DICTIONARY TO monitor;
170153
```
171154

172155

173-
#### [Amazon DocumentDB (with MongoDB compatibility)](https://aws.amazon.com/documentdb/)
156+
#### Amazon DocumentDB
174157
```
175158
db.createUser(
176159
{
@@ -186,16 +169,16 @@ db.createUser(
186169
Follow the step-by-step instructions to configure and deploy the DBTop Monitoring Solution into your account.
187170

188171
1. Make sure you have sign in AWS Console already.
189-
2. Download AWS Cloudformation Template ([DBMonitoringSolution.template](https://raw.githubusercontent.com/aws-samples/db-top-monitoring/main/conf/DBTopMonitoringSolution.template)) located into conf folder.
172+
2. Download AWS Cloudformation Template (DBMonitoringSolution.template) located into conf folder.
190173
3. [**Open AWS CloudFormation Console**](https://console.aws.amazon.com/cloudformation/home#/stacks/create/template?stackName=DBTopMonitoringSolution)
191-
4. Create an stack using Cloudformation template ([DBMonitoringSolution.template](/conf/DBMonitoringSolution.template)) already downloaded on step 2.
174+
4. Create an stack using Cloudformation template (DBMonitoringSolution.template) already downloaded on step 2.
192175
5. Input **Stack name** parameter.
193176
6. Acknowledge **Application Updates - Disclaimer** parameter.
194177
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.
195178
8. Input **AWS Linux AMI** parameter, this parameter specify AWS AMI to build App EC2 Server. Keep default value.
196179
9. Select **Instance Type** parameter, indicate what instance size is needed.
197180
10. Select **VPC Name** parameter, indicate VPC to be used to deploy application server.
198-
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 Amazon RDS security groups to allow network connections.
181+
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.
199182
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.
200183
13. Input **CIDR** parameter, specify CIDR inbound access rule, this will grant network access for the application.
201184
14. Click **Next**, Click **Next**, select **acknowledge that AWS CloudFormation might create IAM resources with custom names**. and Click **Submit**.
@@ -208,14 +191,8 @@ CA-signed certificate that not only encrypts, but also publicly authenticates yo
208191

209192

210193

211-
## Security
212-
213-
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
214-
215194

216195

217-
## License
218196

219-
This library is licensed under the MIT-0 License. See the [LICENSE](LICENSE.txt) file.
220197

221198

frontend/src/components/CompAuroraNode01.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
103103
{ nodeStats.role === "R" &&
104104
<Badge color="red"> R </Badge>
105105
}
106+
{ nodeStats.role === "-" &&
107+
<Badge>-</Badge>
108+
}
106109
&nbsp;
107110
<Link fontSize="body-s" onFollow={() => onClickNode()}>{nodeStats.name}</Link>
108111
</td>

frontend/src/components/CompDocumentDBNode01.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
104104
{ nodeStats.role === "R" &&
105105
<Badge color="red"> R </Badge>
106106
}
107+
{ nodeStats.role === "-" &&
108+
<Badge>-</Badge>
109+
}
107110
&nbsp;
108111
<Link fontSize="body-s" onFollow={() => onClickNode()}>{nodeStats.name}</Link>
109112
</td>
@@ -117,6 +120,7 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
117120
{nodeStats.az}
118121
</td>
119122
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
123+
{ nodeStats.role !== "-" &&
120124
<CompMetric04
121125
value={ (nodeStats.opsInsert + nodeStats.opsQuery + nodeStats.opsUpdate + nodeStats.opsDelete + nodeStats.opsCommand ) || 0}
122126
precision={0}
@@ -129,8 +133,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
129133
fontColorValue={configuration.colors.fonts.metric100}
130134
chartColorLine={"#D69855"}
131135
/>
136+
}
132137
</td>
133138
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
139+
{ nodeStats.role !== "-" &&
134140
<CompMetric01
135141
value={ (nodeStats.docsDeleted + nodeStats.docsInserted + nodeStats.docsReturned + nodeStats.docsUpdated ) || 0}
136142
title={""}
@@ -139,8 +145,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
139145
fontSizeValue={"14px"}
140146
fontColorValue={configuration.colors.fonts.metric100}
141147
/>
148+
}
142149
</td>
143150
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
151+
{ nodeStats.role !== "-" &&
144152
<CompMetric01
145153
value={nodeStats.connectionsCurrent}
146154
title={""}
@@ -149,8 +157,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
149157
fontSizeValue={"14px"}
150158
fontColorValue={configuration.colors.fonts.metric100}
151159
/>
160+
}
152161
</td>
153162
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
163+
{ nodeStats.role !== "-" &&
154164
<CompMetric01
155165
value={nodeStats.connectionsCreated}
156166
title={""}
@@ -159,8 +169,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
159169
fontSizeValue={"14px"}
160170
fontColorValue={configuration.colors.fonts.metric100}
161171
/>
172+
}
162173
</td>
163174
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
175+
{ nodeStats.role !== "-" &&
164176
<CompMetric01
165177
value={nodeStats.cpu}
166178
title={""}
@@ -169,8 +181,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
169181
fontSizeValue={"14px"}
170182
fontColorValue={configuration.colors.fonts.metric100}
171183
/>
184+
}
172185
</td>
173186
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
187+
{ nodeStats.role !== "-" &&
174188
<CompMetric01
175189
value={nodeStats.memory}
176190
title={""}
@@ -179,8 +193,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
179193
fontSizeValue={"14px"}
180194
fontColorValue={configuration.colors.fonts.metric100}
181195
/>
196+
}
182197
</td>
183198
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
199+
{ nodeStats.role !== "-" &&
184200
<CompMetric01
185201
value={nodeStats.ioreads + nodeStats.iowrites}
186202
title={""}
@@ -189,8 +205,10 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
189205
fontSizeValue={"14px"}
190206
fontColorValue={configuration.colors.fonts.metric100}
191207
/>
208+
}
192209
</td>
193210
<td style={{"width":"9%", "text-align":"center", "border-top": "1pt solid " + configuration.colors.lines.separator100}}>
211+
{ nodeStats.role !== "-" &&
194212
<CompMetric01
195213
value={ (nodeStats.netin + nodeStats.netout) }
196214
title={""}
@@ -199,10 +217,11 @@ const ComponentObject = memo(({ sessionId, clusterId, nodeStats }) => {
199217
fontSizeValue={"14px"}
200218
fontColorValue={configuration.colors.fonts.metric100}
201219
/>
220+
}
202221
</td>
203222
</tr>
204223

205-
{ detailsVisible === true &&
224+
{ (detailsVisible === true && nodeStats.role !== "-" ) &&
206225
<tr>
207226
<td></td>
208227
<td colspan="11" style={{"width":"10%", "padding-left": "1em"}}>

0 commit comments

Comments
 (0)