Tools for batch monitoring of the MySQLdb layer in Linux are relatively scarce, and SSISDIY is used. use the SSIS package to read the configuration table information to monitor MySQL. Then, send an email to DBA1 to sort out a global information table, including ip addresses and monitoring dimensions. the table creation statement is as follows: CREAT monitoring tool mysql management tool
Tools for batch monitoring MySQL db layers in Linux are relatively scarce, and SSIS is used for DIY.
Use the SSIS package to read the configuration table information to monitor MySQL and send feedback to DBA By email according to the actual situation.
1. sort out a global information table, including ip addresses and monitoring dimensions.
498) this. width = 498; "/>
The table creation statement is as follows:
- CREATE TABLE [dbo].[all_host_info](
- [ip] [varchar](20) NULL,
- [isactive] [tinyint] NULL,
- [ishost] [tinyint] NULL,
- [isslave] [tinyint] NULL,
- [isjob] [tinyint] NULL,
- [isobject] [tinyint] NULL,
- [isprivileges] [tinyint] NULL
- ) ON [PRIMARY]
2. create an ssis package named mysqlmonitor and create the following variables.
498) this. width = 498; "/>
3. create the TSQL_SLAVE SQL task component in the control flow
Link oledb to the SQL Server where all_host_info is located. enter the following code in sqlsourcetype:
- select count(1) as j from all_host_info where isslave=1;
Select a single row in result set.
498) this. width = 498; "/>
Enter the following result name in the result set and specify the variable j.
498) this. width = 498; "/>
4. create a TSQL_SLAVE_ID tsql task component.
Link to the ole link used by the TSQL_SLAVE component
498) this. width = 498; "/>
5. the content of the new SCRIPT component is as follows:
498) this. width = 498; "/>
498) this. width = 498; "/>
6. create a FOR loop as follows:
498) this. width = 498; "/>
7. drag a data stream in the FOR loop to write the read ip information to the object variable as follows.
498) this. width = 498; "/>
8. drag a FOReach_VAR foreach component into the for component. the content of the component is as follows:
498) this. width = 498; "/>
9 drag data flow components
498) this. width = 498; "/>
10 Mail
498) this. width = 498; "/>
The final components of package 11 are as follows:
498) this. width = 498; "/>
12. load the package into the job and send emails one hour. the monitoring principles of other dimensions are the same.
498) this. width = 498; "/>
Practice one skill and practice a hundred arts, and become a natural.