{"id":13455896,"url":"https://github.com/solana-labs/solana-ping-api","last_synced_at":"2025-10-19T09:31:59.189Z","repository":{"id":39866441,"uuid":"449968312","full_name":"solana-labs/solana-ping-api","owner":"solana-labs","description":"solana ping api server","archived":false,"fork":false,"pushed_at":"2024-06-25T07:03:48.000Z","size":209,"stargazers_count":33,"open_issues_count":3,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-09-28T09:42:36.617Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solana-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-20T05:35:32.000Z","updated_at":"2024-09-12T01:53:36.000Z","dependencies_parsed_at":"2024-03-22T17:28:04.107Z","dependency_job_id":"6800f5d2-1a26-4201-b3a3-b5574680eec0","html_url":"https://github.com/solana-labs/solana-ping-api","commit_stats":{"total_commits":184,"total_committers":5,"mean_commits":36.8,"dds":"0.15217391304347827","last_synced_commit":"8991bc722ff871be763cf78dcabb33c8217191d5"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fsolana-ping-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fsolana-ping-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fsolana-ping-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solana-labs%2Fsolana-ping-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solana-labs","download_url":"https://codeload.github.com/solana-labs/solana-ping-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219869246,"owners_count":16555571,"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":[],"created_at":"2024-07-31T08:01:13.073Z","updated_at":"2025-10-19T09:31:58.827Z","avatar_url":"https://github.com/solana-labs.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Solana Ping Service \n\n## Functions Provided\n- High frequently send transactions and record results\n- provide http API service \n- generate a report and submit to slack periodically\n- actively check confirmation losses and send an alert to slack\n- Spam Filter of slack alert\n\n## Server Setup\n### API Service\nAPI service for getting the results of ping service. \nUse `APIServer: Enabled: true` to turn on in in config-{cluster}.yaml.\n\n### PingService\nThis is similar to  \"solana ping\" tool in solana tool but can do concurrent rpc query.\nIt send transactions to rpc endpoint and wait for transactions is confirmed. \nUse `PingServiceEnabled: true` to turn on in config-{cluster}.yaml.\n### RetensionService\nUse `Retension: Enabled: true` in config.yaml to turn on. Default is Off.\nClean database data periodically.\n\n### ReportService\nUse `Report: Enabled:true` in config-{cluster}.yaml to turn on. \nping-api service supports sedning report \u0026 alert to both slack and discord.\nUse `Report: Slack: Report: Enabled:true` to turn on Slack Report.\nThis sends summary of ping result to a slack channel periodically.\nUse `Report: Slack: Alert: Enabled:true` to turn on Slack Alert. \nThis will send alert when a event is triggered. See  **Alert Spam Filter** for more info.\nUse `Report: Discord: Report: Enabled:true` to turn on Discord Report.\nUse `Report: Discord: Alert: Enabled:true` to turn on Discord Alert.\n\n\n+ Example:Run only API Query Server\nIn config.yaml ServerSetup: \n\n```\n(config.yaml)\nRetension:\n Enabled: false\n(config-{cluster}.yaml)\nPingEnabled: true     \nReport:\n Enabled: true\n Slack:\n  Report:\n   Enabled: true\n  Alert: \n   Enabled: true   \n Discord:\n  Enabled: true\n  Report:\n   Enabled: false\n  Alert: \n   Enabled: true                  \n```\n## Installation\n- download executable file \n- or build from source\n    - Install golang \n    - clone from github.com/solana-labs/solana-ping-api\n    - go mod tidy to download packages\n    - go build \n- mkdir ~/.config/ping-api\n- put config.yaml in ~/.config/ping-api/config.yaml\n\n### Using GCP Database\n- Install \u0026 Setup google cloud CLI\n- download [Cloud SQL Auth proxy](https://cloud.google.com/sql/docs/postgres/sql-proxy)\n- chmod +x cloud_sql_proxy\n- run cloud_sql_proxy\n\n## setup recommendation\n- mkdir ~/ping-api-server\n- cp scripts in script to ~/ping-api-server\n- make solana-ping-api system service \n    - create a /etc/systemd/system/solana-ping-api.service\n    - remember to reload by ```sudo systemctl daemon-reload```\n\n```\n[Unit]\nDescription=Solana Ping API Service\nAfter=network.target\nStartLimitIntervalSec=1\n\n[Service]\nType=simple\nRestart=always\nRestartSec=30\nUser=sol\nLogRateLimitIntervalSec=0\nExecStart=/home/sol/ping-api-server/solana-ping-restart.sh\n\n[Install]\nWantedBy=multi-user.target\n\n```\n\n- put executable file in ~/ping-api-server\n- cp config.yaml.samle to ~/ping-api-server/config.yaml and modify it \n- use cp-to-real-config.sh to copy config.yaml to ~/.config/ping-api/config.yaml\n- start service by sudo sysmtemctl start solana-ping-api.service\n- you can check log by ```sudo tail -f /var/log/syslog | grep ping-api```\n\n## Alert Spam Filter\n\nAlert Spam Filter could be changed frequently. The updte to date (4/18/2022) setting  is as below.\n```\n    Threshold increases when\n    Loss \u003e 20 % -\u003e new threshold = 50% -\u003e send alert\n    Loss \u003e 50 % -\u003e new threshold = 75% -\u003e send alert\n    Loss \u003e 75 % -\u003e new threshold = 100% -\u003e send alert\n    Threshold decreases when\n    Loss \u003e 75 % to \u003c 75%  -\u003e new threshold = 75% -\u003e send alert\n    Loss \u003e 50 % to \u003c 50%  -\u003e new threshold = 50% -\u003e send alert\n    Loss \u003e 20 % to \u003c 20%  -\u003e new threshold = 20% -\u003e NOT send alert\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-labs%2Fsolana-ping-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolana-labs%2Fsolana-ping-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolana-labs%2Fsolana-ping-api/lists"}