{"id":18151253,"url":"https://github.com/msantos/riemann-bridge","last_synced_at":"2025-04-06T23:29:29.218Z","repository":{"id":136621497,"uuid":"234572153","full_name":"msantos/riemann-bridge","owner":"msantos","description":"Forward events between riemann instances","archived":false,"fork":false,"pushed_at":"2024-09-25T11:24:09.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T05:30:12.291Z","etag":null,"topics":["riemann","stdio"],"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/msantos.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":"2020-01-17T15:03:41.000Z","updated_at":"2024-09-25T11:24:13.000Z","dependencies_parsed_at":"2025-02-13T05:38:43.892Z","dependency_job_id":null,"html_url":"https://github.com/msantos/riemann-bridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Friemann-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Friemann-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Friemann-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msantos%2Friemann-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msantos","download_url":"https://codeload.github.com/msantos/riemann-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247568876,"owners_count":20959754,"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":["riemann","stdio"],"created_at":"2024-11-02T01:07:05.688Z","updated_at":"2025-04-06T23:29:29.201Z","avatar_url":"https://github.com/msantos.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SYNOPSIS\n\nriemann-bridge [*options*] *url*\n\n# DESCRIPTION\n\nPipeline for [riemann](https://riemann.io/) events:\n\n* read events from a [websocket](https://github.com/gorilla/websocket),\n  [SSE](https://github.com/donovanhide/eventsource) or stdin\n* write events to a websocket or stdout\n* forward events between riemann instances\n\nPossible uses are:\n\n* publishing or querying riemann events\n\n* replicate events to a test server\n\n* partition events to another riemann server for a restricted view\n\n* failover or load balancing riemann instances\n\n## Stdin\n\nReads JSON from standard input. If a `time` field does not exist, the\nfield is added with the value set to the current time.\n\n## Websocket\n\n### Reading Events\n\nUse `/index`. For example, if the riemann server is running on port 5556\non localhost:\n\n```\nws://127.0.0.1:5556/index\n```\n\n### Writing Events\n\nUse `/events`. For example, if the riemann server is running on port 5556\non localhost:\n\n```\nws://127.0.0.1:5556/events\n```\n\n## SSE\n\nUse `/index`. For example, if the riemann server is running on port 5558\non localhost:\n\n```\nhttp://127.0.0.1:5558/index\n```\n\nIf the riemann service is proxied by path, adjust the URL:\n\n```\nhttps://example.com/event/index\n```\n\n### Reading Events\n\n# EXAMPLES\n\n## Sending Events\n\n```\necho '{\"service\": \"foo\", \"metric\": 2}' | \\\n riemann-bridge - ws://127.0.0.1:5556/events\n```\n\n## Querying Events\n\n```\n# websocket\nriemann-bridge --query='service = \"foo\"' ws://127.0.0.1:5556/index\n\n# SSE\nriemann-bridge --query='service = \"foo\"' http://127.0.0.1:8080/index\n```\n\n## Forwarding Events Between Riemann Instances\n\n```\nriemann-bridge \\\n --query='service = \"test\" and not state = \"expired\"' \\\n ws://127.0.0.1:5556/index \\\n ws://127.0.0.1:6556/events\n```\n\n# ARGS\n\nsrc *string*\n: Source riemann server (default: -)\n\nExamples:\n\n```\n  ws://127.0.0.1:5556/index\n  http://127.0.0.1:5558/index\n```\n\ndestination\n: Destination riemann server (default: -)\n\nExamples:\n\n```\n  ws://127.0.0.1:5556/events\n```\n\n# OPTIONS\n\nquery *string*\n: Riemann query (default: `not (service ~= \"^riemann\" or state = \"expired\")`)\n\nnumber *int*\n: Send *number* events and exit\n\nbuffer-size *uint*\n: Drop any events exceeding the buffer size (defaut: `0` (unbuffered))\n\nverbose *int*\n: Debug messages\n\n# ENVIRONMENT VARIABLES\n\nRIEMANN_BRIDGE_SRC\n: default source riemann server\n\nRIEMANN_BRIDGE_DST\n: default destination riemann server\n\nRIEMANN_BRIDGE_QUERY\n: default riemann query\n\n# BUILD\n\n```\ngo install github.com/msantos/riemann-bridge@latest\n```\n\nTo build a reproducible executable from the git repository:\n\n```\nCGO_ENABLED=0 go build -trimpath -ldflags \"-w\" ./cmd/riemann-bridge\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Friemann-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsantos%2Friemann-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsantos%2Friemann-bridge/lists"}