Original plugin from Check_MK
refactoring the whole plugin with better caching strategy