mperham / inspeqtor

Monitor your application infrastructure!
GNU General Public License v3.0
1.66k stars 72 forks source link

monitor mysql failed on Ubuntu 16.04 #157

Open CaliosD opened 5 years ago

CaliosD commented 5 years ago

I tried to install and config inspeqtor on my server, but when it comes to this error:

/usr/bin/inspeqtor -c /etc/inspeqtor -s /var/run/inspeqtor.sock -l verbose
Inspeqtor 2.0.0
Copyright © 2019 Contributed Systems LLC
Licensed under the GNU Public License 3.0
I 2019-03-28T09:20:37.615663Z 26018 Detected upstart in /etc/init
D 2019-03-28T09:20:37.615687Z 26018 runit not detected in /etc/service or /service
I 2019-03-28T09:20:37.615747Z 26018 Detected systemd in /etc/systemd
I 2019-03-28T09:20:37.615851Z 26018 Detected init.d in /etc/init.d/
D 2019-03-28T09:20:37.615867Z 26018 Parsing /etc/inspeqtor/inspeqtor.conf
V 2019-03-28T09:20:37.616001Z 26018 Global config: &{GlobalConfig:{CycleTime:15 ExposePort:4677 DeployLength:300 Variables:map[deploy_length:300 cycle_time:15 log_level:info]} AlertRoutes:map[:0xc42009be00]}
V 2019-03-28T09:20:37.616055Z 26018 Parsing /etc/inspeqtor/host.inq
V 2019-03-28T09:20:37.616423Z 26018 Rule: &{Entity:0xc4200a60c8 MetricFamily:swap MetricName: Op:greater than DisplayThreshold:20% Threshold:20 CurrentValue:0 PerSec:false CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016d770]}
V 2019-03-28T09:20:37.616473Z 26018 Rule: &{Entity:0xc4200a60c8 MetricFamily:load MetricName:5 Op:greater than DisplayThreshold:10 Threshold:10 CurrentValue:0 PerSec:false CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016d7a0]}
V 2019-03-28T09:20:37.616488Z 26018 Rule: &{Entity:0xc4200a60c8 MetricFamily:disk MetricName:/ Op:greater than DisplayThreshold:90% Threshold:90 CurrentValue:0 PerSec:false CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016d7d0]}
V 2019-03-28T09:20:37.616503Z 26018 Host: {Entity:0xc4200c5440}
D 2019-03-28T09:20:37.616511Z 26018 Parsing config in /etc/inspeqtor/services.d
V 2019-03-28T09:20:37.616548Z 26018 Parsing /etc/inspeqtor/services.d/mysql.inq
V 2019-03-28T09:20:37.616647Z 26018 Rule: {Entity:mysql [Unknown/0] MetricFamily:memory MetricName:rss Op:greater than DisplayThreshold:1g Threshold:1.073741824e+09 CurrentValue:0 PerSec:false CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016db00]}
V 2019-03-28T09:20:37.616698Z 26018 Rule: {Entity:mysql [Unknown/0] MetricFamily:mysql MetricName:Queries Op:greater than DisplayThreshold:5/sec Threshold:5 CurrentValue:0 PerSec:true CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016db30]}
V 2019-03-28T09:20:37.616716Z 26018 Rule: {Entity:mysql [Unknown/0] MetricFamily:mysql MetricName:Seconds_Behind_Master Op:greater than DisplayThreshold:3 Threshold:3 CurrentValue:0 PerSec:false CycleCount:1 TrippedCount:0 State:Ok Actions:[0xc42016db60]}
D 2019-03-28T09:20:37.616731Z 26018 Watching memory:rss
I 2019-03-28T09:20:37.616737Z 26018 Activating metrics for mysql
D 2019-03-28T09:20:37.616751Z 26018 Watching mysql:Queries
D 2019-03-28T09:20:37.616760Z 26018 Watching mysql:Seconds_Behind_Master
D 2019-03-28T09:20:37.616790Z 26018 Executing /usr/bin/mysql [mysql -B -h localhost -P 3306 -u root -e show status like 'Slave_running']
exit status 1

Here's some information that may help.

I'm not an expert in mysql, but I tried to run show status; in mysql and found no field like "Slave_running". I wonder how can I fix it, or what can I do about it.

Thanks in advance. :P