Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-6997

Customizing Dashboards on PMM 2.11

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Grafana Dashboards
    • Labels:
      None

      Description

      Hi Team,

      we are customizing PMM 2.11 as per requirement of our environment, previously we have done this for PMM 1.7 , there has been a slight change in the queries we use for 2.0.

      1. Displaying Metrics on the server where CPU load is >20%

      we have use the below formula in 1.7 and it was working fine and 2.11 i have made some changes to the formula but it is not working

      node_load1{instance=~"$host"}>20 or vector(0) -> 1.0

      node_load1

      {node_name=~"$node_name",environment=~"$environment"}>20 or vector(0)  -> 2.0

      and

      node_load1{node_name=~"$node_name"}>20 or vector(0)

      Query Inspector :

      ------------------

      {
      "request": {
      "url": "api/datasources/proxy/1/api/v1/query",
      "method": "POST",
      "data":

      { "query": "node_load1
      {node_name=~\"im1-authdb001p1\\\\.secure\\\\.livedrive\\\\.com|im1-authdb001p2\\\\.secure\\\\.livedrive\\\\.com|im1-zabbixdb001p1\\\\.secure\\\\.livedrive\\\\.com|im1-zabbixdb001p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql001p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql001p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql002p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql002p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql003p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql003p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql004p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql004p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql005p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql005p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql006p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql006p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql007p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql007p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql008p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql008p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql009p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql009p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql010p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql010p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql011p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql011p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql012p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql012p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql013p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql013p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql014p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql014p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql015p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql015p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql016p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql016p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql017p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql017p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql018p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql018p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql019p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql019p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql020p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql020p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysqlscanner001p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysqlscanner001p2\\\\.secure\\\\.livedrive\\\\.com|pmm-server\"}

      >20 or vector(0)",
      "time": 1606128949
      }
      },
      "response": {
      "status": "success",
      "data": {
      "resultType": "vector",
      "result": [
      {
      "metric": {},
      "value": [
      1606128949,
      "0"
      ]
      }
      ]
      }
      }
      }

      2. To display MySQL Replication Delay > 100seconds

      mysql_slave_status_seconds_behind_master{instance=~"$host"} >100 or vector(0) --> 1.0

      mysql_slave_status_seconds_behind_master{node_name=~"$node_name",environment=~"$environment"}

      >100 or vector(0) --> 2.0

      Query Inspector Output :

      --------------------------

      {
      "request": {
      "url": "api/datasources/proxy/1/api/v1/query",
      "method": "POST",
      "data":

      { "query": "mysql_slave_status_seconds_behind_master

      {node_name=~\"im1-authdb001p1\\\\.secure\\\\.livedrive\\\\.com|im1-authdb001p2\\\\.secure\\\\.livedrive\\\\.com|im1-zabbixdb001p1\\\\.secure\\\\.livedrive\\\\.com|im1-zabbixdb001p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql001p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql001p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql002p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql002p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql003p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql003p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql004p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql004p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql005p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql005p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql006p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql006p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql007p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql007p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql008p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql008p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql009p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql009p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql010p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql010p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql011p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql011p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql012p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql012p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql013p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql013p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql014p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql014p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql015p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql015p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql016p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql016p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql017p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql017p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql018p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql018p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql019p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql019p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql020p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysql020p2\\\\.secure\\\\.livedrive\\\\.com|ix3-mysqlscanner001p1\\\\.secure\\\\.livedrive\\\\.com|ix3-mysqlscanner001p2\\\\.secure\\\\.livedrive\\\\.com|pmm-server\",environment=~\".*\"}

      > 100 or vector(0)",
      "time": 1606128812
      }
      },
      "response": {
      "status": "success",
      "data": {
      "resultType": "vector",
      "result": [
      {
      "metric": {},
      "value": [
      1606128812,
      "0"
      ]
      }
      ]
      }
      }
      }

      Error Display :

      -------------

      mysql_slave_status_seconds_behind_master{agent_id="/agent_id/afa1a76a-9e06-41ce-9bf7-b17ff60fd08a", agent_type="mysqld_exporter", instance="/agent_id/afa1a76a-9e06-41ce-9bf7-b17ff60fd08a", job="mysqld_exporter_agent_id_afa1a76a-9e06-41ce-9bf7-b17ff60fd08a_mr-10s", machine_id="/machine_id/e7f2f020f037486698f891eaf8541c7b", master_host="ix3-mysql002p1", master_uuid="4576c595-4bef-11e9-8e06-b49691211cde", node_id="/node_id/65cd4d3e-3653-4968-b71b-c8ae33267e50", node_name="ix3-mysql002p2.secure.livedrive.com", node_type="generic", service_id="/service_id/7fd5498a-fc1b-4f40-88c3-6847c4e8e6af", service_name="ix3-mysql002p2.secure.livedrive.com-mysql", service_type="mysql"}

      and 

      i am creating a capacity Reporting Dashboard , where i want to display two dashboards

      1. If the size of the Data directory has grown beyond 50%, then the info. related to that particular server shall be shown via a bar line and the display the info of the node name below

       

             2. how much GB mysql database has grown compared to previous month, the data shall be shown in the form of a bar line and the info. of the host to be displayed below. 

      Note : i have 50 M-M Database servers under Monitoring, can you please help me with this.

      I am seeing the following errors in my client nodespmmclient.logpmmclient2.logpmmclient.log

      Thanks,

      Jabir

       

        Attachments

        1. pmmclient.log
          8.48 MB
        2. pmmclient2.log
          2.72 MB
        3. Screenshot_20201124_123732.png
          Screenshot_20201124_123732.png
          109 kB
        4. Screenshot_20201124_124828.png
          Screenshot_20201124_124828.png
          99 kB

          Issue Links

            Activity

              People

              Assignee:
              vadim.yalovets Vadim Yalovets
              Reporter:
              Baig Jabir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 2 hours
                  2h

                    Smart Checklist