Access host variables in custom agent based plugin

A check plugin for checkmk’s check engine should not have such side effects (like opening a HTTP connection).

You will need to come up with another solution.