icinga-powershell-framework
icinga-powershell-framework copied to clipboard
Optimise Performance Counter Cache for new / removed objects
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)
- Run the module in foreground / background
- The disk module for example
- Add a new disk to the machine
- Run the module again - Counter informations are not present