How to check the content of an URI containing a Hash using Nagios' check_http?
The check_http
plugin will only see what wget/curl shows you, so it cannot check what you want it to check.
If you want a check that can actually run client-side javascript, you'll need to look into something like WebInject with check_webinject, Selenium with check_selenium (as discussed in this post), or maybe Sahi and Sakuli.
The #
is in anchor, that's correct. Those are to be interpreted by the client, not the server. The anchor is part of the site,so one has to load the whole site and search for the anchor in it.
You should use the following check instead:
check_http -H www.example.com -f follow -p 8080 -u /hello/
Later you could add -s world
to search for "world" in the HTML content (if it is there and not added via another layer of JavaScript).