icinga-powershell-framework icon indicating copy to clipboard operation
icinga-powershell-framework copied to clipboard

Optimise Performance Counter Cache for new / removed objects

Open LordHepipud opened this issue 5 years ago • 0 comments

The Performance Counter handling works flawless on static environments. However, in case modifications have been made to the system, like adding a new hardddrive, the system is unable to fetch these informations due to the caching mechanism. To receive data for the new device, the service has to be restarted.

Expected Behavior

The Performance Counter cache should update itself in case instances of counters are appearing / disappearing instead of simply ignoring them

Current Behavior

Once the cache has been built up, it will never change the available instances of counters, possibly returning invalid data for no longer existing instances and missing newly added ones

Possible Solution

Add a handler to check the current available instances for counters and initialise them if missing and remove no longer valid ones

Steps to Reproduce (for bugs)

  1. Run the module in foreground / background
  2. The disk module for example
  3. Add a new disk to the machine
  4. Run the module again - Counter informations are not present

LordHepipud avatar Mar 18 '19 17:03 LordHepipud