Documentation ¶
Overview ¶
Demo of the expvar package. You register metrics by creating NewT, then
update it. You can access the exposed metrics via HTTP at /debug/vars, you'll get a JSON object with your exposed variables and some pre defined system ones. You can use monitoring system such as Nagios and OpenNMS to monitor the system and plot the change of data over time. After you run the server, try "curl http://localhost:8079?user=lassie" several times and then "curl http://localhost:8079/debug/vars | python -m json.tool".
Click to show internal directories.
Click to hide internal directories.