Not the answer you need?
Register and ask your own question!

Memory Usage graph reports error when >68 hosts are selected

2»

Comments

  • MykolaMykola Percona Percona Staff Role
    can you replace Query?

    it is needed to
    - login to grafana as Admin user
    - click on graph title
    - click "Edit"
    - choose "Metrics" tab
    - fully replace Query value
    100 - 100 * node_memory_MemAvailable{instance=~"$host"} / (node_memory_MemTotal{instance=~"$host"} + 0.1)
    
  • ac2ac2 Contributor Inactive User Role Beginner
    I have replaced the query with the new one you sent me. In this case I see the graph only for the host "pmm-server" when All is ticked in the hosts list.

    Am I doing something wrong?
  • ac2ac2 Contributor Inactive User Role Beginner
    To be clearer, here is a screenshot:
  • MykolaMykola Percona Percona Staff Role
    Hm :(
    screen shot looks very strange, new Query working fine on my machine :(

    can you try again to change "Resolution" and "Query" after that press "save Dashboard" button (looks like floppy disk) and make refresh.
  • ac2ac2 Contributor Inactive User Role Beginner
    I tried various combinations of changing query and resolution, with no luck so far.
    Selecting a subset of hosts (excluding pmm-server) is basically returning no data points, while with the original query I get a graph displayed. Please check the attached screenshot.
  • MykolaMykola Percona Percona Staff Role
    can you try one more Query?
    100 - 100 * (node_memory_MemFree{instance=~"$host"} + node_memory_Buffers{instance=~"$host"} + node_memory_Cached{instance=~"$host"}) / (node_memory_MemTotal{instance=~"$host"} + 0.1)
    
  • ac2ac2 Contributor Inactive User Role Beginner
    Yes, this fixes the problem, thanks! Should I do anything to make it persistent?
  • MykolaMykola Percona Percona Staff Role
    unfortunately, such changes will be overridden on PMM update.

    can you check one more Query? (is very similar to current default)
    if it works fine I will commit it.
    (node_memory_MemTotal{instance=~"$host"} - (node_memory_MemAvailable{instance=~"$host"} or (node_memory_MemFree{instance=~"$host"} + node_memory_Buffers{instance=~"$host"} + node_memory_Cached{instance=~"$host"}))) / ( node_memory_MemTotal{instance=~"$host"} + 0.1 ) * 100
    
  • ac2ac2 Contributor Inactive User Role Beginner
    The last query you sent me returns no data points for any host (including pmm-server).
  • MykolaMykola Percona Percona Staff Role
    the latest idea...
    100 - 100 * (node_memory_MemAvailable{instance=~"$host"} or (node_memory_MemFree{instance=~"$host"} + node_memory_Buffers{instance=~"$host"} + node_memory_Cached{instance=~"$host"})) / (node_memory_MemTotal{instance=~"$host"} + 0.1)
    
  • ac2ac2 Contributor Inactive User Role Beginner
    This one works flawlessly
  • MykolaMykola Percona Percona Staff Role
    thank you!

    I created pull request https://github.com/percona/grafana-dashboards/pull/16
  • ac2ac2 Contributor Inactive User Role Beginner
    Hi Mykola,
    today I had the chance to upgrade all of our PMM server deployments to version 1.1.4, but I see that the fix for this issue hasn't been merged.
    The last query you sent me works as expected even with an high number of nodes:
    100 - 100 * (node_memory_MemAvailable{instance=~"$host"} or (node_memory_MemFree{instance=~"$host"} + node_memory_Buffers{instance=~"$host"} + node_memory_Cached{instance=~"$host"})) / (node_memory_MemTotal{instance=~"$host"} + 0.1)
    

    But by default the Grafana dashboard has this instead:
    (node_memory_MemTotal{instance=~"$host"} - (node_memory_MemAvailable{instance=~"$host"} or (node_memory_MemFree{instance=~"$host"} + node_memory_Buffers{instance=~"$host"} + node_memory_Cached{instance=~"$host"}))) / node_memory_MemTotal{instance=~"$host"} * 100
    

    which breaks the graph.

    Could you please help?

    Thanks
  • MykolaMykola Percona Percona Staff Role
    Hi,

    I asked PMM Team to prioritize this pull request, so now it is reviewed and merged (fixed).
    So new code (with fix) will be avaiable in the next 1.1.5 release.
  • ac2ac2 Contributor Inactive User Role Beginner
    Thanks, very appreciated.
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.