Environment overview does not respect inventory

Description

The data populating the environment overview appears to directly check Prometheus instead of checking the inventory and requesting data for nodes:

Steps to reproduce:

  1. Add instance to PMM

  2. Allow some data to collect

  3. Remove instance from PMM (e.g. pmm-admin inventory remove ...)

  4. Verify Nodes look as expected in PMM Inventory dashboard

  5. View Home Dashboard

  6. Removed instance will remain visible

If you have lots of instances and churn (e.g. auto-scaling) then this is going to produce unnecessary resource consumption and excess information in the dashboard, especially with longer time periods.

How to test

None

How to document

None

Smart Checklist

Activity

Show:

Alexey Palazhchenko September 1, 2020 at 12:00 PM

It is not secret – it is just not implemented yet.

C W September 1, 2020 at 11:51 AM
Edited

not some secret thing

It wouldn't be secret by being present in the API spec for /Nodes/Remove and even if that triggers a call to the purge endpoint, it means that we don't have to go and write more code for something that was left behind in the first place.

{ "node_id": "string", "force": true }

becomes

{ "node_id": "string", "force": true, "purge": false }

Alexey Palazhchenko September 1, 2020 at 10:30 AM

Just stopping the agent will not remove the information about that agent from the PMM inventory. Removing the agent, but keeping the data is not a problem for most people – the data will be removed automatically after it falls out of the retention period. For special needs, we will add a purge option to all APIs. pmm-admin will use those public APIs, not some secret thing.
Closing as a duplicate of https://perconadev.atlassian.net/browse/PMM-4320#icft=PMM-4320.

C W September 1, 2020 at 10:00 AM

Well, I would guess that more people want it to disappear than not, else you can just stop the agent
Please make sure that this is an option that can be passed to /Nodes/Remove because we prune PMM to remove unknown nodes and we don't want that data at all.

Alexey Palazhchenko September 1, 2020 at 6:37 AM

That's expected. Sometimes you want to keep the data, and sometimes you don't. We keep it by default, and https://perconadev.atlassian.net/browse/PMM-4320#icft=PMM-4320 will allow one to purge it.

Duplicate

Details

Assignee

Reporter

Priority

Affects versions

Environment

Container

Smart Checklist

Created April 16, 2020 at 1:01 PM
Updated March 6, 2024 at 4:35 AM
Resolved September 1, 2020 at 10:30 AM