Open skycyan opened 1 year ago
No, not really possible without restarting. The reason is you can't do partial cleanup of data easily. Most of the monitoring uses counters, which need to be monotonic. It also needs to be consistent across counters in the same metric family.
From a "principal of lease surprise" perspective, a reload or restart that clears all metrics is what is possible.
The shared memory used by the vts module is not dynamically increased after initial allocation. If you want to delete data in the shared memory allocated during operation, you can use status control api. Even if you use this command, the allocated shared memory remains the same. How much shared memory's maxSize, usedSize, usedNode is on the status page on average?
FYI. https://blog.openresty.com/en/how-nginx-shm-consume-ram/#fake-memory-leaks
In the nginx-module-vts, when using vhost_traffic_status_filter_by_set_key, it leads to continuous growth of shared memory. Is it possible to periodically clean up the data in shared memory, for example, retaining only the data from the last 7 days?