{"id":21497998,"url":"https://github.com/pippozq/pushgateway","last_synced_at":"2025-03-17T12:40:35.633Z","repository":{"id":144202517,"uuid":"151576158","full_name":"pippozq/pushgateway","owner":"pippozq","description":"pushgateway for prometheus","archived":false,"fork":false,"pushed_at":"2019-01-12T12:48:13.000Z","size":2387,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T22:19:17.779Z","etag":null,"topics":["prometheus","prometheus-pushgateway","pushgateway"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pippozq.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-04T13:29:01.000Z","updated_at":"2021-06-06T14:33:31.000Z","dependencies_parsed_at":"2023-06-18T19:07:41.939Z","dependency_job_id":null,"html_url":"https://github.com/pippozq/pushgateway","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pippozq%2Fpushgateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pippozq%2Fpushgateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pippozq%2Fpushgateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pippozq%2Fpushgateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pippozq","download_url":"https://codeload.github.com/pippozq/pushgateway/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244035714,"owners_count":20387375,"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":["prometheus","prometheus-pushgateway","pushgateway"],"created_at":"2024-11-23T16:33:32.479Z","updated_at":"2025-03-17T12:40:35.611Z","avatar_url":"https://github.com/pippozq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pushgateway\n## Use for\n1. Receive metrics from http and cache them in redis\n2. Provide metrics as text for Prometheus\n## Difference from [official pushgateway](https://github.com/prometheus/pushgateway)\n1. Use redis as cache, instead of memory, can be used as cluster\n2. Every metric can be set different expire time\n3. With no web ui\n4. Use json format data\n## Docker\n1. Env Config\n\n```\nS___Log_Level debug                  // log level\nS___RedisAgent_PoolSize 200          //  redis pool\nS___RedisAgent_KeyCount 100\nS___RedisAgent_PipelineWaitTime 3    \nS___RedisAgent_RedisDb 1\nS___RedisAgent_RedisExpireTime 70\nS___RedisAgent_RedisHost 127.0.0.1\nS___RedisAgent_RedisPassword redis\nS___RedisAgent_RedisPort 6379\nS___Server_Port 80\n```\n\n2. Build\n```\ndocker build -t pushgateway:1 .\n```\n3. Provide k8s-srv.yml\n\n## How to use?\n1. Json Format\n\n```\n{\n  \"expire_time\": 60,                // metric expire time，default 1800s\n  \"id\": \"192.168.3.4\",              // primary id,such like ip or something unique\n  \"job_name\": \"job_name\",           // your job name\n  \"metrics\": [\n    {\n      \"metric_name\": \"cpu_usage\",   // metric name\n      \"metric_value\": 71,           // value  float64\n      \"labels\": {\n        \"os\": \"linux\"\n      }\n    }\n  ]\n}\n```\n2. Push data with POST Method\n```\n127.0.0.1:8000/pushgateway/v0/metrics\n```\n\n3. Prometheus Config\n\n```\n- job_name: pushgateway\n  scrape_interval: 1m   // as you wish\n  scrape_timeout: 50s   // as you wish too\n  metrics_path: /pushgateway/v0/metrics\n  scheme: http\n  static_configs:\n  - targets:\n    - your ip\n```\n\n\n# License\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpippozq%2Fpushgateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpippozq%2Fpushgateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpippozq%2Fpushgateway/lists"}