{"id":16476834,"url":"https://github.com/mnitchev/metrics-example","last_synced_at":"2026-06-09T04:03:21.323Z","repository":{"id":85101527,"uuid":"155523725","full_name":"mnitchev/metrics-example","owner":"mnitchev","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-01T08:55:17.000Z","size":3831,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T17:41:32.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mnitchev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-31T08:30:56.000Z","updated_at":"2018-11-01T08:55:18.000Z","dependencies_parsed_at":"2023-03-09T18:00:28.775Z","dependency_job_id":null,"html_url":"https://github.com/mnitchev/metrics-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mnitchev/metrics-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnitchev%2Fmetrics-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnitchev%2Fmetrics-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnitchev%2Fmetrics-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnitchev%2Fmetrics-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mnitchev","download_url":"https://codeload.github.com/mnitchev/metrics-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mnitchev%2Fmetrics-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34090751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-10-11T12:43:45.830Z","updated_at":"2026-06-09T04:03:21.318Z","avatar_url":"https://github.com/mnitchev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sending container metrics from Kubernetes to Doppler\n\n*_NOTE:_* This is example code from this [spike](https://www.pivotaltracker.com/story/show/160848366)\n\n### Prerequisites\n\n1. Kube cluster with [heapster](https://github.com/kubernetes/heapster) installed (should be installed by default if the cluster is version \u003c=1.10)\n2. A doppler running somewhere that's reachable from inside the cluster\n\n### Example code\n\nThe example gathers the metrics for all pods running in the `opi` namespace. Unfortunately the metrics that are returned are just `cpu` and `memory` and doppler [requires](https://github.com/cloudfoundry/loggregator-api#containermetric) also `disk`, `disk_quota` and `memory_quota` to also be set for it to interpret the Envelope as a ContainerMetric. \nTo emit the envelopes the [go-loggregator](https://github.com/cloudfoundry/go-loggregator/) client is used. The client has a [hardcoded value](https://github.com/cloudfoundry/go-loggregator/blob/master/tls.go#L13) for the \"serverName\" for which the doppler certificates are valid. In this example the code in `vendor` has been changed but a more permanent solution would be to add the \"metron\" alternative name to the certificates.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnitchev%2Fmetrics-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmnitchev%2Fmetrics-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmnitchev%2Fmetrics-example/lists"}