vmon,internal/monitoring: move some common functions from vmon to internal/monitoring.

I also removed "oncall collect" related files. See reasons below.

In this CL I only moved stuff from vmon/servicecommon.go to
internal/monitoring/monitoring.go and updated all the references.
I didn't change any code logic.

This is the first step of making the oncall-dashboard better.

Now, there are two components to make the oncall-dashboard work.
1. "oncall collect" command talks to GCM, collects all data needed in
   dashboard (all the metrics from all our services), and write the result to
   a (large) file in json in storage bucket. This runs every minute.
2. "oncall serve" serves the data file above and static resources
   to the frontend UI.

I don't remember exactly why I chose this approach, but it has many
flaws:
- The data shown in the dashboard is not in "real time". It depends on
  how often the "oncall collect" command runs. It basically just shows the data
  from the last "oncall collect" run.
- The data shown in the dashboard is kind of "static". For example,
  people cannot change data duration because the duration is hard-coded
  in the "oncall collect" code (1h by default).
- It is pretty wasteful. For example, the instance-level data is only needed
  when people are looking at the instance-level view.
- Hard to maintain. Too many moving parts.

I plan to remove the "oncall collect" part, and move data retrieval functions
to the "oncall serve" command so it becomes a single backend server for
the dashboard. It serves static resources, and gets requests from the frontend
UI and talks to GCM.

Change-Id: I1ca294fbfbcd7c25b192660e1a3f075a8b80d380
11 files changed
tree: b8254ca8d5a2fbfad5e5f6a38643d8f26611bc8e
  1. bendroid/
  2. dashboard/
  3. data/
  4. godepcop/
  5. gologcop/
  6. internal/
  7. jiri-api/
  8. jiri-contributors/
  9. jiri-copyright/
  10. jiri-dockergo/
  11. jiri-go/
  12. jiri-goext/
  13. jiri-oncall/
  14. jiri-profile-v23/
  15. jiri-run/
  16. jiri-swift/
  17. jiri-test/
  18. jiridoc/
  19. mailer/
  20. oncall/
  21. postsubmit/
  22. presubmit/
  23. tooldata/
  24. tracify/
  25. vbinary/
  26. vcloud/
  27. vjenkins/
  28. vkiosk/
  29. vmon/
  30. .gitignore
  31. .godepcop
  32. .jiriignore
  33. AUTHORS
  34. CONTRIBUTING.md
  35. CONTRIBUTORS
  36. LICENSE
  37. PATENTS
  38. README.md
  39. VERSION
README.md

This repository contains developer tools used to install and contribute to Vanadium.

For more information, see the installation and contributing instructions.

This repository is fetched and the tools are built as part of the Vanadium installation process for contributors.