{"id":19390855,"url":"https://github.com/tecnickcom/natsping","last_synced_at":"2026-06-17T15:33:30.538Z","repository":{"id":66250118,"uuid":"152956348","full_name":"tecnickcom/natsping","owner":"tecnickcom","description":"NATS Bus Test Component","archived":false,"fork":false,"pushed_at":"2025-05-13T14:27:47.000Z","size":65,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T15:48:24.316Z","etag":null,"topics":["bus","golang","nats","ping","test"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/tecnickcom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"custom":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026currency_code=GBP\u0026business=paypal@tecnick.com\u0026item_name=donation%20for%20natsping%20project"]}},"created_at":"2018-10-14T09:01:58.000Z","updated_at":"2025-05-13T14:27:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"943b0b7a-bcbc-401b-b1ba-140d14459310","html_url":"https://github.com/tecnickcom/natsping","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tecnickcom/natsping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecnickcom%2Fnatsping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecnickcom%2Fnatsping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecnickcom%2Fnatsping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecnickcom%2Fnatsping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tecnickcom","download_url":"https://codeload.github.com/tecnickcom/natsping/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tecnickcom%2Fnatsping/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34453440,"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-17T02:00:05.408Z","response_time":127,"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":["bus","golang","nats","ping","test"],"created_at":"2024-11-10T10:23:36.110Z","updated_at":"2026-06-17T15:33:30.523Z","avatar_url":"https://github.com/tecnickcom.png","language":"Go","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026currency_code=GBP\u0026business=paypal@tecnick.com\u0026item_name=donation%20for%20natsping%20project"],"categories":[],"sub_categories":[],"readme":"# natsping\n\n*NATS Bus Test Component*\n\n[![Master Branch](https://img.shields.io/badge/-master:-gray.svg)](https://github.com/tecnickcom/natsping/tree/master)\n[![Master Build Status](https://secure.travis-ci.org/tecnickcom/natsping.png?branch=master)](https://travis-ci.org/tecnickcom/natsping?branch=master)\n[![Master Coverage Status](https://coveralls.io/repos/tecnickcom/natsping/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/tecnickcom/natsping?branch=master)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tecnickcom/natsping)](https://goreportcard.com/report/github.com/tecnickcom/natsping)\n\n* **category**:    Tool\n* **author**:      Nicola Asuni \u003cinfo@tecnick.com\u003e\n* **copyright**:   2016-2017 MIRACL UK LTD\n* **license**:     ASL 2.0 - http://www.apache.org/licenses/LICENSE-2.0\n* **link**:        https://github.com/tecnickcom/natsping\n\n## Description\n\n*NATS Bus Ping Command.*\n\nThis command-line program allows to ping a [NATS](http://nats.io) bus to see if it is alive.\n\n\n## Requirements\n\nAn additional Python program is used to check the validity of the JSON configuration files against a JSON schema:\n\n```\nsudo pip install json-spec \n```\n\n## Quick Start\n\nThis project includes a Makefile that allows you to test and build the project in a Linux-compatible system with simple commands.  \nAll the artifacts and reports produced using this Makefile are stored in the *target* folder.  \n\nAll the packages listed in the *resources/DockerDev/Dockerfile* file are required in order to build and test all the library options in the current environment. Alternatively, everything can be built inside a [Docker](https://www.docker.com) container using the command \"make dbuild\".\n\nTo see all available options:\n```\nmake help\n```\n\nTo build the project inside a Docker container (requires Docker):\n```\nmake dbuild\n```\n\nTo build a particular set of options inside a Docker container:\n```\nMAKETARGET='buildall' make dbuild\n```\nThe list of pre-defined options can be listed by typing ```make```\n\n\nThe base Docker building environment is defined in the following Dockerfile:\n```\nresources/DockerDev/Dockerfile\n```\n\nTo execute all the default test builds and generate reports in the current environment:\n```\nmake qa\n```\n\nTo format the code (please use this command before submitting any pull request):\n```\nmake format\n```\n\n## Useful Docker commands\n\nTo manually create the container you can execute:\n```\ndocker build --tag=\"tecnickcom/natspingdev\" .\n```\n\nTo log into the newly created container:\n```\ndocker run -t -i tecnickcom/natspingdev /bin/bash\n```\n\nTo get the container ID:\n```\nCONTAINER_ID=`docker ps -a | grep tecnickcom/natspingdev | cut -c1-12`\n```\n\nTo delete the newly created docker container:\n```\ndocker rm -f $CONTAINER_ID\n```\n\nTo delete the docker image:\n```\ndocker rmi -f tecnickcom/natspingdev\n```\n\nTo delete all containers\n```\ndocker rm $(docker ps -a -q)\n```\n\nTo delete all images\n```\ndocker rmi $(docker images -q)\n```\n\n\n## Usage\n\n```\nUsage:\n  natsping [flags]\n  natsping [command]\n\nAvailable Commands:\n  version     print this program version\n\nFlags:\n  -c, --configDir   string  Configuration directory to be added on top of the search list\n  -l, --logLevel     string  Log level: EMERGENCY, ALERT, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG\n  -n, --natsAddress  string  NATS bus Address (nats://ip:port) (default \"nats://127.0.0.1:4222\")\n\nUse \"natsping [command] --help\" for more information about a command.\n```\n\n## How it works\n\nThe program can be started by issuing the following command (*with the right parameters*):\n\n```\nnatsping --natsAddress=\"nats://127.0.0.1:4222 --logLevel=INFO\"\n```\n\nIf no command-line parameters are specified, then the ones in the configuration file (**config.json**) will be used.  \nThe configuration files can be stored in the current directory or in any of the following (in order of precedence):\n* ./\n* config/\n* $HOME/natsping/\n* /etc/natsping/\n\n\nThis program also support secure remote configuration via [Consul](https://www.consul.io/) or [Etcd](https://github.com/coreos/etcd).  \nThe remote configuration server can be defined either in the local configuration file using the following parameters, or with environment variables:\n\n* **remoteConfigProvider** : remote configuration source (\"consul\", \"etcd\");\n* **remoteConfigEndpoint** : remote configuration URL (ip:port);\n* **remoteConfigPath** : remote configuration path where to search fo the configuration file (e.g. \"/config/natsping\");\n* **remoteConfigSecretKeyring** : path to the openpgp secret keyring used to decript the remote configuration data (e.g. \"/etc/natsping/configkey.gpg\"); if empty a non secure connection will be used instead;\n\nThe equivalent environment variables are:\n\n* NATSPING_REMOTECONFIGPROVIDER\n* NATSPING_REMOTECONFIGENDPOINT\n* NATSPING_REMOTECONFIGPATH\n* NATSPING_REMOTECONFIGSECRETKEYRING\n\n\nThe natsping command exit with the status 0 if the NATS bus is responding, otherwise it generates an error log message and exit with 1.\n\n\n## Logs\n\nThis program logs the log messages in json format.\nFor example:\n```\n{\"datetime\":\"2016-10-06T15:00:39Z\",\"hostname\":\"nickxm\",\"level\":\"debug\",\"msg\":\"initializing NATS bus\",\"nats\":\"nats://127.0.0.1:3333\",\"program\":\"natsping\",\"release\":\"1\",\"timestamp\":1475766039219189166,\"version\":\"1.2.1\"}\n\n```\n\n## Developer(s) Contact\n\n* Nicola Asuni \u003cinfo@tecnick.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecnickcom%2Fnatsping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftecnickcom%2Fnatsping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftecnickcom%2Fnatsping/lists"}