{"id":19888867,"url":"https://github.com/paypal/load-watcher","last_synced_at":"2025-07-14T16:39:53.846Z","repository":{"id":44515614,"uuid":"310489579","full_name":"paypal/load-watcher","owner":"paypal","description":"Load watcher is a cluster-wide aggregator of metrics, developed for Trimaran: Real Load Aware Scheduler in Kubernetes.","archived":false,"fork":false,"pushed_at":"2024-12-19T18:55:53.000Z","size":162,"stargazers_count":74,"open_issues_count":11,"forks_count":36,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-24T08:03:13.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paypal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-06T04:16:10.000Z","updated_at":"2025-05-16T00:44:24.000Z","dependencies_parsed_at":"2022-08-23T16:30:55.489Z","dependency_job_id":"d4dff53c-c3a1-4e68-8c8b-e33a4daec2a7","html_url":"https://github.com/paypal/load-watcher","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/paypal/load-watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fload-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fload-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fload-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fload-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paypal","download_url":"https://codeload.github.com/paypal/load-watcher/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paypal%2Fload-watcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265319582,"owners_count":23746364,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T18:08:31.138Z","updated_at":"2025-07-14T16:39:53.799Z","avatar_url":"https://github.com/paypal.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Load Watcher [![Go Reference](https://pkg.go.dev/badge/github.com/paypal/load-watcher.svg)](https://pkg.go.dev/github.com/paypal/load-watcher) ![CI Build Status](https://github.com/paypal/load-watcher/actions/workflows/ci.yml/badge.svg) [![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)\n\nThe load watcher is responsible for the cluster-wide aggregation of resource usage metrics like CPU, memory, network, and IO stats over time windows from a metrics provider like SignalFx, Prometheus, Kubernetes Metrics Server etc. developed for [Trimaran: Real Load Aware Scheduling](https://github.com/kubernetes-sigs/scheduler-plugins/blob/master/kep/61-Trimaran-real-load-aware-scheduling/README.md) in Kubernetes.\nIt stores the metrics in its local cache, which can be queried from scheduler plugins.\n\nThe following metrics provider clients are currently supported:\n\n1) SignalFx\n2) Kubernetes Metrics Server\n3) Prometheus\n\nThese clients fetch CPU usage currently, support for other resources will be added later as needed.\n\n# Tutorial\n\nThis tutorial will guide you to build load watcher Docker image, which can be deployed to work with Trimaran scheduler plugins.\n\nThe default `main.go` is configured to watch Kubernetes Metrics Server.\nYou can change this to any available metrics provider in `pkg/metricsprovider`.\nTo build a client for new metrics provider, you will need to implement `FetcherClient` interface.\n\nFrom the root folder, run the following commands to build docker image of load watcher, tag it and push to your docker repository:\n\n```\ndocker build -t load-watcher:\u003cversion\u003e .\ndocker tag load-watcher:\u003cversion\u003e \u003cyour-docker-repo\u003e:\u003cversion\u003e\ndocker push \u003cyour-docker-repo\u003e\n```\n\nNote that load watcher runs on default port 2020. Once deployed, you can use the following API to read watcher metrics:\n\n```\nGET /watcher\n```\n\nThis will return metrics for all nodes. A query parameter to filter by host can be added with `host`.\n\n## Metrics Provider Configuration\n- By default Kubernetes Metrics Server client is configured. Set `KUBE_CONFIG` env var to your kubernetes client configuration file path if running out of cluster.\n\n- To use the Prometheus client, please configure environment variables `METRICS_PROVIDER_NAME`, `METRICS_PROVIDER_ADDRESS` and `METRICS_PROVIDER_TOKEN` to `Prometheus`, Prometheus address and auth token. Please do not set `METRICS_PROVIDER_TOKEN` if no authentication \n  is needed to access the Prometheus APIs. Default value of address set is `http://prometheus-k8s:9090` for Prometheus client.\n\n- To use the SignalFx client, please configure environment variables `METRICS_PROVIDER_NAME`, `METRICS_PROVIDER_ADDRESS` and `METRICS_PROVIDER_TOKEN` to `SignalFx`, SignalFx address and auth token respectively. Default value of address set is `https://api.signalfx.com` for SignalFx client.\n  \n## Deploy `load-watcher` as a service\nTo deploy `load-watcher` as a monitoring service in your Kubernetes cluster, you should replace the values in the `[]` with your own cluster monitoring stack and then you can run the following.\n```bash\n\u003e kubectl create -f manifests/load-watcher-deployment.yaml\n```\n\n## Using `load-watcher` client\n- `load-watcher-client.go` shows an example to use `load-watcher` packages as libraries in a client mode. When `load-watcher` is running as a\nservice exposing an endpoint in a cluster, a client, such as Trimaran plugins, can use its libraries to create a client getting the latest metrics.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fload-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaypal%2Fload-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaypal%2Fload-watcher/lists"}