Access host variables in custom agent based plugin

Yes, a datasource agent would be the better solution I guess.
If you just want to check HTTP you may use check_http together with Nagios macros.
We put for example the application in host alias and use $HOSTALIAS$ to build the URL.

See:
https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/macrolist.html