Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

PMM can't scrape a Postgresql node

Hi,
I'm new to PMM and trying to monitor some Postgresql databases. I have installed PMM agents and ran "pmm-admin config ..." on 2 Postgresql nodes. One of them was monitored successfully. One of them was not, only node metrics were collected. Prometheus targets were showing that it got time out error when scraping the postgresql exporter.

Any idea what happened here? 

Answers

  • adivinhoadivinho Percona Percona Staff Role
    Hi Zaky,
    It looks like port 42001 is blocked on your second node. Pmm-server talks back to the postgresql exporter on this port.
  • ZakyZaky Current User Role Contributor
    Hi adivinho,
    Thanks for your reply.
    I think that's not the case, because I can telnet to that port.


    When I tried to curl to the port, the curl just stopped here. The server didn't send any reply even after some minutes had elapsed.


    On the other server, the one which was successfully monitored, the curl was almost instantly replied. 
  • adivinhoadivinho Percona Percona Staff Role
    Could you check if the provided curl command can fetch metrics if it's run directly on the node?
  • ZakyZaky Current User Role Contributor
    edited September 14
    After trying one more time, from the server, it got a reply after 4m39.916s. I guess that's why Prometheus always timed out when trying to scrape the node. That's very slow. Do you have any idea what can be the cause? 
  • adivinhoadivinho Percona Percona Staff Role
    Could you check if there is any error in /var/log/pmm-agent.log on the node?
  • ZakyZaky Current User Role Contributor
    edited September 15

    well, I don't even see any log file of the pmm-agent.
    there was no error in the journalctl logs (attached) though. 
  • adivinhoadivinho Percona Percona Staff Role
    It's hard to say what's going on there without any additional information.
    Are you able to fetch exporter metrics directly on the node by a curl command?
  • ZakyZaky Current User Role Contributor
    I can't because I don't know the APIs. I got that curl link from the prometheus dashboard.
    Can you help me how to fetch the exporter's metrics?
    and while at it, is it possible to change the prometheus's scrape interval & timeout configs without being replaced by pmm-managed?
  • adivinhoadivinho Percona Percona Staff Role
    Please use the next command. It has to be used Agent ID of postgres_exporter as a password.
    curl -s -u pmm:<Agent ID of exporter> http://localhost:42000/metrics


  • adivinhoadivinho Percona Percona Staff Role

    Scraping intervals can be modified on the tab "PMM Settings". Please notice that it's global for all exporters.


Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.