{"id":16105944,"url":"https://github.com/kirill-scherba/pusher","last_synced_at":"2026-06-23T12:02:15.873Z","repository":{"id":62973606,"uuid":"563807783","full_name":"kirill-scherba/pusher","owner":"kirill-scherba","description":"Pusher send metrics to Prometheus Push Server using HTTP post request","archived":false,"fork":false,"pushed_at":"2022-11-10T07:51:17.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T03:13:48.610Z","etag":null,"topics":["go","golang","http","prometheus","prometheus-pushgateway"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirill-scherba.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-09T11:34:06.000Z","updated_at":"2022-11-09T12:09:27.000Z","dependencies_parsed_at":"2022-11-10T05:02:33.209Z","dependency_job_id":null,"html_url":"https://github.com/kirill-scherba/pusher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kirill-scherba/pusher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirill-scherba%2Fpusher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirill-scherba%2Fpusher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirill-scherba%2Fpusher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirill-scherba%2Fpusher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirill-scherba","download_url":"https://codeload.github.com/kirill-scherba/pusher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirill-scherba%2Fpusher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686728,"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-23T02:00:07.161Z","response_time":65,"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":["go","golang","http","prometheus","prometheus-pushgateway"],"created_at":"2024-10-09T19:11:17.948Z","updated_at":"2026-06-23T12:02:15.823Z","avatar_url":"https://github.com/kirill-scherba.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pusher\n\nPusher send metrics to Prometheus Push Server using http post request. This\npackage has not any external dependencies and use only standard go librarie.\n\n[![GoDoc](https://godoc.org/github.com/kirill-scherba/pusher?status.svg)](https://godoc.org/github.com/kirill-scherba/pusher/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/kirill-scherba/pusher)](https://goreportcard.com/report/github.com/kirill-scherba/pusher)\n\n## Usage example\n\nThe sample code below show all this package capabilities. Just create new pusher\nand send any methrics.\n\n```go\n// Initialize random\nrand.Seed(time.Now().Unix())\n\n// Get this host name\nhostName, err := os.Hostname()\nif err != nil {\n    log.Fatalln(\"can't get host name error: \", err)\n}\n\n// Create publisher\npusher := pusher.NewPusher(\"http://example.com:9091\", \"my_job\", hostName)\n\n// Push metrics every 15 seconds\nfor {\n    m, err := pusher.Push(\n        pusher.Metric(\"my_job_couner_2\", rand.Float64()*10),\n        pusher.Metric(\"my_job_couner_3\", rand.Float64()*10),\n        pusher.Metric(\"my_job_couner_4{label=\\\"val1\\\"}\", rand.Float64()*100),\n        pusher.Metric(\"my_job_couner_4{label=\\\"val2\\\"}\", rand.Float64()*100),\n    )\n    if err != nil {\n        log.Println(\"push error: \", err)\n    } else {\n        log.Println(\"push metrics:\\n\" + m)\n    }\n    time.Sleep(15 * time.Second)\n}\n```\n\nYou can find complete packets documentation at: \u003chttps://pkg.go.dev/github.com/kirill-scherba/pusher\u003e\n\n-----------------------\n\n## Licence\n\n[BSD](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirill-scherba%2Fpusher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirill-scherba%2Fpusher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirill-scherba%2Fpusher/lists"}