{"id":44622034,"url":"https://github.com/nanopack/pulse","last_synced_at":"2026-02-14T14:14:39.865Z","repository":{"id":57512136,"uuid":"45634745","full_name":"nanopack/pulse","owner":"nanopack","description":"Dynamic, api-driven stats collector service for realtime stats publishing and historical aggregation with Influxdb. ","archived":false,"fork":false,"pushed_at":"2019-03-11T15:07:47.000Z","size":1621,"stargazers_count":46,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-15T06:41:39.284Z","etag":null,"topics":["developer-tools","devops","devtools","golang","nanobox","nanopack","stats-aggregator","stats-collector"],"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/nanopack.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":null,"security":null,"support":null}},"created_at":"2015-11-05T19:37:57.000Z","updated_at":"2023-09-08T17:03:19.000Z","dependencies_parsed_at":"2022-09-26T17:51:35.031Z","dependency_job_id":null,"html_url":"https://github.com/nanopack/pulse","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/nanopack/pulse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanopack%2Fpulse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanopack%2Fpulse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanopack%2Fpulse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanopack%2Fpulse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nanopack","download_url":"https://codeload.github.com/nanopack/pulse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nanopack%2Fpulse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29446655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T14:10:32.461Z","status":"ssl_error","status_checked_at":"2026-02-14T14:09:49.945Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["developer-tools","devops","devtools","golang","nanobox","nanopack","stats-aggregator","stats-collector"],"created_at":"2026-02-14T14:14:39.321Z","updated_at":"2026-02-14T14:14:39.859Z","avatar_url":"https://github.com/nanopack.png","language":"Go","readme":"# Pulse\n\n[![Build Status](https://travis-ci.org/nanopack/pulse.svg)](https://travis-ci.org/nanopack/pulse)\n[![GoDoc](https://godoc.org/github.com/nanopack/pulse?status.svg)](https://godoc.org/github.com/nanopack/pulse)\n\nPulse is a stat collecting and publishing service. It serves historical stats over an http api while live stats are sent to mist for live updates.\n\n\n## Usage\n\nSimply running `pulse -s` will start pulse with the default config options.  \n`pulse -h` or `pulse --help` will show more detailed usage and config options:\n\n```\nUsage:\n  pulse [flags]\n\nFlags:\n  -a, --aggregate-interval int         Interval at which stats are aggregated (default 15)\n  -b, --beat-interval int              Heartbeat frequency (seconds) (default 30)\n  -c, --config-file string             Config file location for server\n  -C, --cors-allow string              Sets the 'Access-Control-Allow-Origin' header (default \"*\")\n  -H, --http-listen-address string     Http listen address (default \"127.0.0.1:8080\")\n  -i, --influx-address string          InfluxDB server address (default \"http://127.0.0.1:8086\")\n  -I, --insecure                       Run insecure (default true)\n  -k, --kapacitor-address string       Kapacitor server address (http://127.0.0.1:9092)\n  -l, --log-level string               Level at which to log (default \"INFO\")\n  -m, --mist-address string            Mist server address\n  -M, --mist-token string              Mist server token\n  -p, --poll-interval int              Interval to request stats from clients (default 60)\n  -r, --retention int                  Number of weeks to store aggregated stats (default 1)\n  -s, --server                         Run as server\n  -S, --server-listen-address string   Server listen address (default \"127.0.0.1:3000\")\n  -t, --token string                   Security token (recommend placing in config file) (default \"secret\")\n  -v, --version                        Print version info and exit\n```\n\n### Config File Options:\n```json\n{\n  \"server\": true,\n  \"server-listen-address\": \"127.0.0.1:3000\",\n  \"http-listen-address\": \"127.0.0.1:8080\",\n  \"influx-address\": \"http://127.0.0.1:8086\",\n  \"kapacitor-address\": \"http://127.0.0.1:9092\",\n  \"insecure\": true,\n  \"mist-address\": \"\",\n  \"mist-token\": \"\",\n  \"log-level\": \"info\",\n  \"cors-allow\": \"*\",\n  \"token\": \"secret\",\n  \"poll-interval\": 60,\n  \"aggregate-interval\": 15,\n  \"beat-interval\": 30,\n  \"retention\": 12\n}\n```\n\n\n## API\n\n| Route | Description | Output |\n| --- | --- | --- |\n| **GET** /keys | Returns list of stats being recorded | string array |\n| **GET** /tags | Returns list of filterable tags | string array |\n| **GET** /latest/{stat}* | Returns latest stat (averages if multiple filters applied) | json stat object |\n| **GET** /hourly/{stat}** | Returns hourly averages for stat | json array of stat objects |\n| **GET** /daily/{stat}** | Returns average for stat at the same daily time | string map |\n\n**ALERTS** (requires \"kapacitor-address\" to be configured)  \n\n| Route | Description | Payload | Output |\n| --- | --- | --- | --- |\n| **POST** /alerts | Add a kapacitor alert | json alert object | json alert object |\n| **PUT** /alerts | Update a kapacitor alert | json alert object | json alert object |\n| **DELETE** /alerts/{alert} | Delete a kapacitor alert | nil | success message |\n\n`*`: reserved query parameters is 'verb', all others act as filters  \n`**`: reserved query parameters are 'backfill', 'verb', 'start', and 'stop', all others act as filters  \n\n**note:** The API requires a token to be passed for authentication by default and is configurable at server start (`--token`). The token is passed in as a custom header: `X-AUTH-TOKEN`.  \n\nFor examples, see [the api's readme](api/README.md).\n\n\n## Data Types\n### Stat Object\njson:\n```json\n{\n  \"time\": 1465419600,\n  \"value\": 0.75\n}\n```\n\nFields:\n- **time**: Unix epoch timestamp of stat\n- **value**: Numeric value of stat\n\n### Alert Object\njson:\n```json\n{\n  \"tags\": {\"host\":\"abc\"},\n  \"metric\": \"cpu_used\",\n  \"level\": \"crit\",\n  \"threshold\": 80,\n  \"duration\": \"30s\",\n  \"post\": \"http://127.0.0.1/alert\"\n}\n```\n\nFields:\n- **tags**: Populates the WHERE\n- **metric**: Stat to track\n- **level**: Alert level (info, warn, crit)\n- **threshold**: Limit that alert is triggered at\n- **duration**: How far back to average (5m)\n- **post**: Api to hit when alert is triggered\n\n\n## Relay\n\nA pulse relay is a service that connects to pulse and advertises stats that are available for collection. A relay implementation is available in the pulse project and can be embedded in other projects.  \n\nFor an [**example**](relay/README.md), look in the README for relay.\n\n### TCP pulse api\nThe TCP api used to communicate between the pulse server and a relay is simple and is designed to be human readable and debuggable. It is newline delimited.\n\n| Command | Description | Response |\n| --- | --- | --- |\n| `id {id}` | **Must** be the first command to be run, identifies the client to the server | `ok` |\n| `add {name}` | Exposes a stat that can be collected by the server | `ok` |\n| `remove {name}` | Removes a stat previously exposed to the server | `ok` |\n\n\n### TCP relay api\n| Command | Description | Response |\n| --- | --- | --- |\n| `get {tag,tag2}` | Request a list of stats corrosponding to the list of tags passed in | `got {tag:value}` |\n| `flush` | Clear all current values from the stat collectors | `ok` |\n| `override {duration} {tag:interval}` | for `duration` seconds, bump the collection interval from the default to `interval` for each `tag:interval` | `ok` |\n\n#### Notes\n- If an override is specified for a stat, and a new machine comes online and connects, that override is **NOT** honored.\n- Pulse server does not actively connect to servers to have stats pushed to it, rather, it waits for stat collecting machines to connect and then requests certain stats on specific intervals.\n\n\n## Contributing\n\nContributions to the pulse project are welcome and encouraged. Pulse is a [Nanobox](https://nanobox.io) project and contributions should follow the [Nanobox Contribution Process \u0026 Guidelines](https://docs.nanobox.io/contributing/).\n\n#### TODO\n\n## Licence\n\nMozilla Public License Version 2.0\n\n[![open source](http://nano-assets.gopagoda.io/open-src/nanobox-open-src.png)](http://nanobox.io/open-source)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanopack%2Fpulse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnanopack%2Fpulse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnanopack%2Fpulse/lists"}