{"id":1668,"date":"2018-04-30T15:03:29","date_gmt":"2018-04-30T20:03:29","guid":{"rendered":"http:\/\/www.shainmiley.com\/wordpress\/?p=1668"},"modified":"2019-02-04T20:53:53","modified_gmt":"2019-02-05T01:53:53","slug":"remove-unused-servers-from-pmm","status":"publish","type":"post","link":"https:\/\/www.shainmiley.com\/wordpress\/2018\/04\/30\/remove-unused-servers-from-pmm\/","title":{"rendered":"Remove unused servers from PMM"},"content":{"rendered":"<p>We recently decommissioned some unused Mysql servers. Part of this process involved removing the nodes from Percona Monitoring and Management (PMM). I found that although this process is very simple overall, it is not every intuitive. The process is as follows:<\/p>\n<p>1) <strong>Find node name:<\/strong><br \/>\n<code>curl -s 'http:\/\/<strong>pmm-hostname.domain.com<\/strong>\/v1\/internal\/ui\/nodes?dc=dc1' | python -mjson.tool<\/code><\/p>\n<p>2) <strong>Remove node from consul:<\/strong><br \/>\n<code>curl -s -X PUT -d '{\"Datacenter\":\"dc1\",\"Node\":\"<strong>node_name<\/strong>\"}' 'http:\/\/<strong>pmm-hostname.domain.com<\/strong>\/v1\/catalog\/deregister?dc=dc1'<\/code><\/p>\n<p>3) <strong>Remove node from prometheus:<\/strong><br \/>\n<code>curl -X DELETE 'http:\/\/<strong>pmm-hostname.domain.com<\/strong>\/prometheus\/api\/v1\/series?match\\[\\]=\\{instance=\"<strong>node_name<\/strong>\"\\}'<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently decommissioned some unused Mysql servers. Part of this process involved removing the nodes from Percona Monitoring and Management (PMM). I found that although this process is very simple overall, it is not every intuitive. The process is as follows: 1) Find node name: curl -s &#8216;http:\/\/pmm-hostname.domain.com\/v1\/internal\/ui\/nodes?dc=dc1&#8217; | python -mjson.tool 2) Remove node from [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1668"}],"collection":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1668"}],"version-history":[{"count":7,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1668\/revisions"}],"predecessor-version":[{"id":1690,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/posts\/1668\/revisions\/1690"}],"wp:attachment":[{"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1668"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shainmiley.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}