pmm-server was unable to connect pmm-client to collect linux:metrics. The follow is the output of pmm-admin check-network. I checked pmm-admin list and linux:metrics showing as running. I verified firewall issue also. There is no firewall issue between pmm-server and pmm-client for 42000 port.
Connection: Client ← Server
SERVICE TYPE NAME REMOTE ENDPOINT STATUS HTTPS/TLS PASSWORD
linux:metrics pmm-client client_ip_address::42000 DOWN YES -
mysql:metrics dbcrpmysqlsbxha2 client_ip_address:42002 OK YES -
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
So it looks like firewall or network configuration issue.
prometheus (on PMM Server side) fetches https://pmm-client-ip:42000/metrics url every second.
this url should be accessible from PMM Server.
can you open 42000, 42002 ports for PMM Server ?
[root@dbcrpmysqlsbxha2 ~]# wget [url]https://dbcrpmysqlsbxha2:42000/metrics[/url] --no-check-certificate
–2017-03-30 10:22:37-- [url]https://dbcrpmysqlsbxha2:42000/metrics[/url]
Resolving dbcrpmysqlsbxha2… 10.49.80.46
Connecting to dbcrpmysqlsbxha2|10.49.80.46|:42000… connected.
WARNING: cannot verify dbcrpmysqlsbxha2’s certificate, issued by “/O=PMM Client”:
Unable to locally verify the issuer’s authority.
WARNING: certificate common name “” doesn’t match requested host name “dbcrpmysqlsbxha2”.
HTTP request sent, awaiting response… 200 OK
Length: 17784427 (17M) [text/plain]
Saving to: “metrics”
100%[===========================================================================================================================================================>] 17,784,427 6.35M/s in 2.7s
And additional to this, how to configure SMTP options to set mail notification alerts. I am using followed options and unable to get notifications. Please let me know where I need to modify below SMTP configuration.
[root@dbcrpmysqlsbxha3 ~]# wget [url]https://dbcrpmysqlsbxha2:42000/metrics[/url] --no-check-certificate
–2017-03-31 10:10:09-- [url]https://dbcrpmysqlsbxha2:42000/metrics[/url]
Resolving dbcrpmysqlsbxha2… 10.49.80.46
Connecting to dbcrpmysqlsbxha2|10.49.80.46|:42000… connected.
WARNING: cannot verify dbcrpmysqlsbxha2’s certificate, issued by “/O=PMM Client”:
Unable to locally verify the issuer’s authority.
WARNING: certificate common name “” doesn’t match requested host name “dbcrpmysqlsbxha2”.
HTTP request sent, awaiting response… 200 OK
Length: 17784140 (17M) [text/plain]
Saving to: “metrics.1”
100%[===========================================================================================================================================================>] 17,784,140 2.41M/s in 7.0s
Thanks Mykola, The issue has resolved now. The problem is with interval timeout to connect pmm-server with pmm-client. Previously it was 1sec, Now I changed to 5 minutes. After that, everything seems fine.
These are present my configuration variables in /etc.prometheus.yml:
it is recommended to keep 1s because internal database performance debug requires high resolution.
if you want to keep it is needed to found found what kind of monitoring query is slow and disable query via mysqld_exporter options.
sometimes mysqld_exporter queries are ok, in this case it is needed place servers in one physical network or high performance network without delays.
How should I know the exact reasons for context deadline exceeded error? As you mentioned, I tried with scrape_interval 1s only. But I am seeing context deadlock error exceed error for some monitoring servers (Not for all servers) (Present I am monitoring 5 mysql instance from remote PMM server with 16 GB RAM and 4 CPU’s. In this, I am able to collect linux and mysql metrics for 2 instances without any issue and not able to collect linux metrics for remaining 3 instances.). Getting context deadline exceeded errors in prometheus/target page. How to control linux metrics monitoring more efficiently? No firewall issue.
context deadline exceeded means that mysqld_exporter works longer that prometheus expected (cannot finish work in 1 second).
so mysqld_exporter creates long additional load on database server.
mysqld_exporter runs many queries to database, so we can disable some checks to speedup it.
usually most long query is ‘tablestat’, it is possible to disable this query by the following commands.
Thanks Mykola for update. Here you mentioned all checks only for mysql (–disable-tablestats, --disable-userstats --disable-processlist --disable-binlogstats). We already disabled table-stats in my environment to improve performance and everything seems good. Is there any way to filter linux metrics like mysql metrics? Because I am seeing context deadline exceeded errors only for Linux metrics.
Thanks PMM team for providing beautiful monitoring tool for MySQL.
I also faced same type of issue which might be due to some latency between client node and server node. Same has been resolved by increasing value of scrape_timeout to 5s .
I also faced same type of issue which might be due to some latency between client node and server node. Same has been resolved by increasing value of scrape_timeout to 5s .