{"id":20118499,"url":"https://github.com/flowfuse/usage-ping-collector","last_synced_at":"2026-06-08T12:03:09.036Z","repository":{"id":39599399,"uuid":"456700872","full_name":"FlowFuse/usage-ping-collector","owner":"FlowFuse","description":"A simple AWS end-point used to collect anonymised usage information for the FlowForge platform","archived":false,"fork":false,"pushed_at":"2026-03-24T15:24:53.000Z","size":100,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-25T16:57:56.149Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FlowFuse.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-07T22:35:51.000Z","updated_at":"2026-03-24T15:25:19.000Z","dependencies_parsed_at":"2025-03-25T11:22:24.708Z","dependency_job_id":"0467001b-8776-4217-9dd1-9272e40d4324","html_url":"https://github.com/FlowFuse/usage-ping-collector","commit_stats":null,"previous_names":["flowfuse/usage-ping-collector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FlowFuse/usage-ping-collector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fusage-ping-collector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fusage-ping-collector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fusage-ping-collector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fusage-ping-collector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FlowFuse","download_url":"https://codeload.github.com/FlowFuse/usage-ping-collector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FlowFuse%2Fusage-ping-collector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34061123,"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-08T02:00:07.615Z","response_time":111,"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-11-13T19:11:15.923Z","updated_at":"2026-06-08T12:03:09.017Z","avatar_url":"https://github.com/FlowFuse.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FlowForge Telemetry Ping App\n\nThis repo contains the code for the FlowForge Telemetry Ping App. This\nis a very simple HTTPS end point that is used to collect usage information\nfrom instances of FlowForge that have opted-in to sharing the information.\n\nThe received data is stored in an RDS (Postgres) table.\n\nThis service does not store any identifying information that can be used\nto identify individual users. The data is augmented with a hash of the sending\nIP address so that separate requests can be correlated - but the actual IP\naddress is not stored.\n\n## Collected data\n\nThe collector does some very simple validation of the data posted to it - and\nonly stores properties it knows about.\n\nThe code contains two arrays:\n\n - `requiredProperties` - a list of property names that must exist for the post\n   to be accepted\n - `optionalProperties` - a list of property names that may exist.\n\nThe property names are written in dot-notation, for example `env.nodejs`. This means\nit expects the post to have a top level property called `env` which is an object\nthat contains a property called `nodejs`.\n\nThe collector will *only* store properties in that list to the database. That\nmeans if new properties are added to the FlowForge code that sends the pings,\nthey must also be added to the collector for them to be handled. This includes\nupdating the database table structure to accept the new values.\n\nThis may prove to be overly restrictive - but as we don't anticipate a high\nlevel of churn in the metrics we gather, it should be manageable. This approach\nalso ensures proper consideration and discussion is applied to any metric added\nto the data gathering process.\n\n\n## Updating the live collector code\n\n### Requirements\n\n* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured\n\n### Update script\n\n```bash\ncd src\nnpm install\nzip -r ../function.zip .\ncd ..\naws lambda update-function-code --function-name telemetryPingToRDS --zip-file fileb://function.zip\n```\n\nIf the update adds any additional properties, the database table structure must\nbe updated to accepted the new values *before* the code is deployed.\n\nThis is currently done be running the appropriate `ALTER TABLE` commands on the\ndatabase. The `database-schema.sql` file should also be updated as a record of\nthe expected schema.\n\n## Testing the collector\n\nThe tests in this repo can be used to verify the behaviour of the collector against\na *local* Postgres database.\n\n### Running postgres locally\n\nThe following will run postgress locally using Docker, with the default configuration\nused by the tests.\n\nYou can use a different port/username/password/db, but will need to set some\nenvironment variables to tell the tests where to find postgres.\n\n```\ndocker pull postgres\ndocker run --name pingCollectorPostgres \\\n    -p 5432:5432 \\\n    -e POSTGRES_USER=postgres \\\n    -e POSTGRES_PASSWORD=secret \\\n    -e POSTGRES_DB=pings_test \\\n    -d \\\n    postgres\n```\n\nTo later stop the container\n\n```\ndocker stop pingCollectorPostgres\n```\n\n### Running the tests\n\nThe tests expect the database to be running on `localhost:5432` with a username/password\nof `postgres`/`secret` and to use a database called `pings_test`.\n\nThe following env vars can be set to change any of those properties:\n\n - `PG_URL`\n - `PG_DB`\n - `PG_USER`\n - `PG_PW`\n\nFinally, to run the tests:\n\n```\nnpm run test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowfuse%2Fusage-ping-collector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflowfuse%2Fusage-ping-collector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflowfuse%2Fusage-ping-collector/lists"}