{"id":19903952,"url":"https://github.com/zerotohero-dev/sensei","last_synced_at":"2026-06-13T10:31:39.662Z","repository":{"id":30141855,"uuid":"33691966","full_name":"zerotohero-dev/sensei","owner":"zerotohero-dev","description":"A Minimal Node.JS Wrapper Around the sensu-api","archived":false,"fork":false,"pushed_at":"2016-05-09T12:30:22.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-28T15:16:28.599Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerotohero-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-09T20:47:41.000Z","updated_at":"2023-10-03T02:25:15.000Z","dependencies_parsed_at":"2022-08-03T15:13:10.785Z","dependency_job_id":null,"html_url":"https://github.com/zerotohero-dev/sensei","commit_stats":null,"previous_names":["v0lkan/sensei"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zerotohero-dev/sensei","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Fsensei","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Fsensei/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Fsensei/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Fsensei/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerotohero-dev","download_url":"https://codeload.github.com/zerotohero-dev/sensei/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerotohero-dev%2Fsensei/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34281700,"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-13T02:00:06.617Z","response_time":62,"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-12T20:26:05.853Z","updated_at":"2026-06-13T10:31:39.641Z","avatar_url":"https://github.com/zerotohero-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **NOTE**\n\u003e\n\u003e This project is no longer maintained (*at least for a while*).\n\u003e\n\u003e If you want to be the maintainer, contact me\n\u003e at me@volkan.io\n\u003e\n\n                                                          _/\n         _/_/_/    _/_/    _/_/_/      _/_/_/    _/_/\n      _/_/      _/_/_/_/  _/    _/  _/_/      _/_/_/_/  _/\n         _/_/  _/        _/    _/      _/_/  _/        _/\n    _/_/_/      _/_/_/  _/    _/  _/_/_/      _/_/_/  _/\n\n## About\n\n**sensei** is a minimal **Node.JS** wrapper around the [sensu-api](http://sensuapp.org/docs/0.16/api_overview).\n\n## Installation\n\nIt’s easy to install **sensei** via [npm](https://www.npmjs.com/):\n\n```bash\nnpm install sensei;\n```\n## Usage\n\n```js\nvar sensei = require('sensei');\n\nvar sensu = sensei.create({\n    // your sensu-api url\n    url: 'http://152.12.124.37:4567'\n    username: 'your sensu-api username',\n    password: 'your sensu-api password'\n});\n\nsensu.getEvents({\n    client: 'name-of-sensu-client',\n    check: 'name-of-sensu-check'\n}).then(function(data) {\n    // Called when the API call successfully finishes.\n    // `data` has all the information you need.\n    console.log(data)\n}, function(error) {\n    // Called when an error occurs during the API call; check the `error` object.\n});\n\n// Since all sensei methods return a promise you can do all kinds of fancy\n// things that involves promises:\n\nvar Q = require('q');\n\nQ.all([\n    sensu.getHealth({\n        consumers: 2,\n        messages: 4\n    }),\n    sensu.getInfo()\n]).spread(function(isHealthy, sensuInfo) {\n    console.log(isHealthy);\n    console.log(sensuInfo);\n}).then(function() {\n    return sensu.getStashes().then(function(stashes) {\n        console.log(stashes);\n    })\n}, function(err) {\n    console.log('oops');\n    console.log(err);\n}).fin(function() {\n    console.log('all done!');\n});\n```\n\n`sensei.create(options)` is a factory method that creates a **sensei** instance.\n\n`options` should be in the `{url: url, username: username, password: password}` format.\n\nThe created object has the following methods:\n\n* `getInfo()` (*returns a `Promise`*)\n* `getChecks(name)` (*`name` is optional; returns a `Promise`*)\n* `getClients(options)` (*returns a `Promise`*)\n* `getEvents(options)` (*returns a `Promise`*)\n* `getHealth(options)` (*returns a `Promise`*)\n* `getStashes(options)` (*returns a `Promise`*)\n\nThe `options` argument that’s passed to the methods expect attribute names, values, and data types that have been described [in the sensu API](http://sensuapp.org/docs/0.16/api_overview).\n\n### Wanna Help?\n\nIf you find something missing, [please file an issue](http://sensuapp.org/docs/0.16/api_overview).\n\nIf you want to contribute, see **[CONTRIBUTING.md](CONTRIBUTING.md)**.\n\n### Supported Environments\n\nYou should be able to use **sensei** in any platform that runs **[Node.JS](http://nodejs.org/)**.\n\n### Backwards Compatibility\n\nThe code is in its early alpha; and we **MAY** introduce breaking changes that might be backwards incompatible.\n\nAfter we hit **version 1.0.0**, we’ll follow [Semantic Versioning Standards](http://semver.org/), and only introduce breaking changes when we update the **MAJOR** version number.\n\n\u003e **Hint**:\n\u003e\n\u003e You can always install an older version from [npm](https://www.npmjs.com/package/sensei).\n\n### I’ve Found A Bug / I have an Idea!\n\n[Please file an issue](https://github.com/v0lkan/sensei/issues).\n\nAnd also you might want to see **[CONTRIBUTING.md](CONTRIBUTING.md)**.\n\n### Contact Information\n\n* **Project Owner**: [Volkan Özçelik](http://volkan.io/)\n\n### License\n\nMIT-Licensed.\n\nSee **[LICENSE.md](LICENSE.md)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerotohero-dev%2Fsensei","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerotohero-dev%2Fsensei","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerotohero-dev%2Fsensei/lists"}