ClusterDefine the replica set configuration variable, here _id: "Repset" and the above parameters--replset Repset consistentconfig={_id: "Repset", Members:[{_id:0,host: "132.232.47.139"},{_id:1,host: "45.40.199.46"},{_id:2,host: " 132.232.40.31 "}]}Enter the above variables and enter the following description no problemRs.initiate (config)Execute the above statement if the output below shows no problem1.8.5 View cluster statusRs.status (){"Set": "Repset", "date": Isodate ("2018-08-05t12:20:02.0
.nemongo.com:27017","OK": 0,"ErrMsg": "No host described in new configuration 1 for replica set ne_aws_01 maps to this node","Code": 93}Ne_aws_01:primary> Rs.add ("node0002.nemongo.com:27017"){"OK": 1}Ne_aws_01:primary> Rs.add ("node0003.nemongo.com"){"OK": 1}Ne_aws_01:primary> Rs.status (){"Set": "Ne_aws_01","Date": Isodate ("2015-05-08t04:49:30.768z"),"MyState": 1,"Members": [{"_id": 0,"Name": "node0001.nemongo.com:27017","Health": 1,"State": 1,"Statestr": "PRIMARY","
:06:42.270+0800 I CONTROL [initandlisten] * * We suggest setting it to ' never '2015-05-08t09:06:42.270+0800 I CONTROL [Initandlisten]#使用admin数据库> Use admin;Switched to DB admin#定义副本集配置变量并初始化, here's _id: "Replset" and the above command parameter "--replset repl" to keep the same> Db.runcommand ({"replsetinitiate": {"_id": "Repl", "members": [{"_id": 1, "host": "192.168.66.89:40144"},{"_id": 2, "Host": "192.168.66.89:50144"},{"_id": 3, "host": "192.168.66.89:60144"}]});{"OK": 1}#查看副本集信息Repl:othe
://www.badpenguin.co.uk# Licensed under the GNU GPL Version 2.# * * * * Version 0.2 * * * *# TODO--Create CSV parsing rules for the netstat.# * * * * * Configuration# set LOG to the directory of your want to write the performance data to.# set SLEEP to the number of seconds want to SLEEP between samples# set HDD to the number of had disks in your machine.Log=/home/mark/perfmon/livesleep=10hdd=2htype=$ (uname-s)Genstat (){now=$ (Date +%s)While ["$now"-ne "30"]DoSleep 1now=$ (Date +%s)DoneWhile:;D
Zabbix enterprise monitoring-MySQL monitoring
1 Preface
Zabbix does not seem to provide a clear configuration method for MySQL monitoring official tutorials. The following is the configuration method I have sorted out by referring to some documents. I will share it with you.
2 Theory
2.1 How Key values are obtained
2.1.1 Key definition of Zabbix Server
View the template's Items
The template defines the following Items:
Take Items "MySQL uptime" as
TPS-Transactions Per Second (number of Transactions processed Per Second) refers to the number of Transactions processed by the server Per Second. the storage engine that supports Transactions, such as InnoDB, has a unique performance indicator.
Calculation method:
TPS = (COM_COMMIT + COM_ROLLBACK)/UPTIME
Use information_schema; select VARIABLE_VALUE into @ num_com from GLOBAL_STATUS where VARIABLE_NAME = 'com _ COMMIT '; select VARIABLE_VALUE in
to the mysql server to analyze the problem.
2. check the mysql server on the monitored end
2.1. when calling the local check_nrpe service, the same error is reported as follows:
[Root @ mysqldb~] #/Usr/lib/nagios/plugins/check_nrpe-Hlocalhost-c check_mysql_status
NRPE: Unable to read output
[Root @Mysqldb~] #
Run the check_mysql_status command in/etc/nagios/nrpe. cfg.
First use cat to find the check_mysql command line
[Root @Mysqldb~] # Cat/etc/nagios/nrpe. cfg | grep check_mysql_status
Comm
Memory information/meminfo
Return dict
#!/usr/bin/env pythondef memory_stat(): mem = {} f = open("/proc/meminfo") lines = f.readlines() f.close() for line in lines: if len(line)
CPU information/cpuinfoReturns a list with a dict per core.
#!/usr/bin/env pythondef cpu_stat(): cpu = [] cpuinfo = {} f = open("/proc/cpuinfo") lines = f.readlines() f.close() for line in lines: if line == '\n': cpu.append(cpuinfo) cpuinfo = {}
default configuration file. In addition, the program supports dynamic registration.
[Oracle @ aaalife admin] $ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0-Production on 07-SEP-2015 01:08:10
Copyright (c) 1991,201 3, Oracle. All rights reserved.
Starting/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0-Production
Log messages written to/u01/app/oracle/diag/tnslsnr/aaalife/listener/alert/log. xml
Listening on: (DESCRIPTION = (ADDRESS
to go to the mysql server to analyze the problem.
2. check the mysql server on the monitored end
2.1. when calling the local check_nrpe service, the same error is reported as follows:
[Root @ mysqldb~] #/Usr/lib/nagios/plugins/check_nrpe-Hlocalhost-c check_mysql_status
NRPE: Unable to read output
[Root @Mysqldb~] #
Run the check_mysql_status command in/etc/nagios/nrpe. cfg.
First use cat to find the check_mysql command line
[Root @Mysqldb~] # Cat/etc/nagios/nrpe. cfg | grep check_mysql_status
@ mysqlvm2 ~] #
It is proved that the nagios process is normal and other monitoring items such as check_users can be detected. However, if the check_mysql fault reports an error, you still need to go to the mysql server to analyze the problem.
2. check the mysql server on the monitored end
2.1. when calling the local check_nrpe service, the same error is reported as follows:
[Root @ mysqldb ~] #/Usr/lib/nagios/plugins/check_nrpe-Hlocalhost-c check_mysql_status NRPE: Unable to read output
[Roo
The idea is to get the system start-up time by reading/proc/uptime.Using the command cat/proc/uptimeThe following information can be seen through the man proc:/proc/uptime:this file contains, numbers:the uptime of the system (seconds), and the amount of time spent in idle proc ESS (seconds).The first is the system's startup time, and the second is the idle time of the system. Two units are in seconds.#include #include #include #include structTimeval T
Tags: mysqltps-transactions per Second (number of things transferred per second), which is the number of transactions per second that the server processes, and a performance metric that is unique to the storage engine that supports transactions such as InnoDB. Calculation method: TPS = (com_commit + com_rollback)/uptime Use Information_schema;
Select Variable_value into @num_com from global_status where variable_name = ' com_commit ';
Select Variable
Ignoring user Configuration file/root/.msmtprc:no such file ordirectory
Falling back to default account
Msmtp:account Default not found:no configuration file available
So copy the/USR/LOCAL/ETC/MSMTPRC as/ROOT/.MSMTPRC
Check the Mutt file installation directory
Copy Code code as follows:
RPM-QL Mutt
So copy/etc/muttrc as/root/.muttrc to send mail.
Second, monitor the server system load situation:
1, with the uptim
;: "Confignowsavedlocally.shouldcomeonlineinabout aminute. "," OK ":1} This step must be ready for the node and the MONGO of the quorum node to start, otherwise this step cannot be performed. >rs.status () {"Set" : "Testrs", "Date" :isodate ("2015-05-07t11:55:17z"), "MyState" :1, "members" :[{"_id" :0, "name" : "10.19.21.244:27017", "Health" :1, "state" :1, "Statestr" : "PRIMARY", "Uptime" :5737, "Optime" : timestamp (1430995665,1), "Optimedate" :is
. Experiments show that the average situation of the algorithm is much faster than the worst-case O (MN) time complexity.In this article, we rely on the howard[12] algorithm to find MMC. The Howard algorithm is more effective in practice. After using the point potential to fix the cost, it realizes the problem of calculating the shortest path of n single source points, in which the length is the minimum average length of the circle of nλ^*,λ^*. n points, the shortest-circuiting calculation of ea
A php update Problem
$ Conn = dbo. mssql_connect ("61.164.111.245", "yon", "123456 ");$ Dbname = mssql_select_db ("yong1", $ conn) or die ("the database does not exist or is unavailable ");?>I have not encountered any problems in the local testing of this generation.
$ Action = $ _ POST ["action"];If ($ action = "Submit "){$ Id = $ _ POST ["id"];$ Title = $ _ POST ["title"];$ Come = $ _ POST ["come"];$ Exitt = $ _ POST ["exitt"];$ Content = stripslashes (trim ($ _ POST ["content"]);$
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.