{"id":15064620,"url":"https://github.com/kgnzt/polyseerio-ruby","last_synced_at":"2026-01-01T22:02:56.899Z","repository":{"id":56888524,"uuid":"69298536","full_name":"kgnzt/polyseerio-ruby","owner":"kgnzt","description":"Official Polyseer.io SDK for Ruby.","archived":false,"fork":false,"pushed_at":"2017-01-03T21:12:27.000Z","size":223,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T04:23:35.477Z","etag":null,"topics":["alerting","monitoring","polyseer","ruby","ruby-on-rails"],"latest_commit_sha":null,"homepage":"https://polyseer.io","language":"Ruby","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/kgnzt.png","metadata":{"files":{"readme":"README.md","changelog":"History.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-26T22:37:05.000Z","updated_at":"2017-05-13T08:55:44.000Z","dependencies_parsed_at":"2022-08-20T23:40:39.271Z","dependency_job_id":null,"html_url":"https://github.com/kgnzt/polyseerio-ruby","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/kgnzt%2Fpolyseerio-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgnzt%2Fpolyseerio-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgnzt%2Fpolyseerio-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgnzt%2Fpolyseerio-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgnzt","download_url":"https://codeload.github.com/kgnzt/polyseerio-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243790999,"owners_count":20348385,"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":["alerting","monitoring","polyseer","ruby","ruby-on-rails"],"created_at":"2024-09-25T00:22:42.740Z","updated_at":"2026-01-01T22:02:51.869Z","avatar_url":"https://github.com/kgnzt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Alt text](/asset/polyseerio_sdk_ruby.png?raw=true \"Polyseer.io SDK for Ruby.\")\n\n# Polyseer.io SDK for Ruby\n\nThe official Polyseer.io SDK for Ruby. Detailed API information can be found at (https://polyseer.io/documentation).\n\n## About\n\nPolyseer.io is an Integrated Development Platform that instantly\nprovides teams with the resources needed to build, support, and maintain world \nclass software products.\n\n## Requirements\n  - Ruby\n  - gem\n\n## Installation\n\nTo install, run:\n\n    gem install polyseerio\n\nTo add to your project Gemfile, insert:\n\n    gem 'polyseerio'\n\n## Example\n\nBe sure to check out the examples in /example.\n\n## Environment Variables\n\nCertain values can be set in environment variables:\n\n  * POLYSEERIO_TOKEN     access-token used for API calls\n  * RAILS_ENV            the current environment\n  * POLYSEERIO_LOG_LEVEL SDK logging level\n\n## Usage\n\nThe SDK provides an agent that allows for immediate integration as well as\ndirect platform interactions.\n\nExample: (Quick start)\n\n    include 'polyseerio'\n\n    client = Polyseerio.start\n    client.instance.fact('foo', 'bar').execute.value\n\nExample: (SDK)\n\n    include 'polyseerio'\n\n    client = Polyseerio.make\n    client.Event.create(name: 'Testing').execute.value\n\n## Design\n\nAll Polyseer.io SDK's make use of Promises for async calls. Promises allow for \ndelaying and chaining async work.\n\n  * Provides direct platform calls as well as a Polyseer.io Ruby agent.\n  * All client SDK calls return a Concurrent::Promise.\n  * Supports functional style programming.\n  * Supports object-oriented style programming.\n    * ORM style instances. E.g. environment.save(), alert.trigger();\n  * A resources environment can be deduced or explicitly passed to SDK calls through the options param.\n  * API calls made using the https:// protocol.\n\n## Example\n\nBe sure to check out the examples in /example.\n\n## SDK Resources\n\nUse of the SDK starts with the creation of a client. To construct a client \ninstance, you may call either Polyseerio.start or Polyseerio.make. Once a\nclient has been created you may use any of its resources.\n\n### Polyseerio\n\n  * Polyseerio\n    * .`make(options = {}) ⇒ Polyseerio::Client`\n      * Create a client.\n      * `options (Hash)` see Polyseerio.start options.\n        - `:deduce (Boolean)` if the environment should be deduced when not supplied\n        - `:env (String)` environment variable that holds the current environment\n        - `:timeout (Integer)` integer containing number of ms to wait for server responses\n        - `:token (String)` an api token\n        - `:token_env (String)` if no token is provided, this environment variable will be checked\n        - `:upsert_env (Boolean)` if an environment cannot be found it will be created\n        - `:version (String)` api version to use\n    * .`start(options = {}) ⇒ Polyseerio::Client`\n      * Create a client and start an Agent.\n      * `options (Hash)`\n        - `:agent (Hash)` agent options (see client.start_agent options)\n    * `::Enum`\n      * `::Color (Hash)` platform color values\n      * `::Determiner (Hash)` expectation deteriner types\n      * `::Direction (Hash)` instance direction types\n      * `::Icon (Hash)` platform icon types\n      * `::Protocol (Hash)` alert protocol types\n      * `::Strategy (Hash)` instance attachment strategies\n      * `::Subtype (Hash)` instance subtypes\n      * `::Type (Hash)` resource types\n\n### Polyseerio::Client\n\n  * client\n    * `.current_environment ⇒ client.Environment`\n      * Resolves the current environment **IF** it has been deduced.\n    * `.start_agent(options = {}) ⇒ Polyseerio::Client`  \n      * Starts the Polyseer.io agent for this client.\n      * `options`\n        - `.attach (Boolean)`\n        - `.attach_strategy (Symbol)`\n        - `.name (String)` instance name (will be used as a unique id)\n        - `.description (String)` a description of this instance\n        - `.group (String)` what group this instance belongs to\n        - `.direction (String)` the monitoring direction (inbound) // force this\n        - `.subtype (Polyseerio::Enum::Subtype)` the instance subtype: periodic or long_running.\n        - `.expectation` will be upserted for this instance\n          - `.is_alive (Boolean)` create an expectation that this process is alive\n        - `.fact`\n          - `.engine (Boolean)` the current ruby engine\n          - `.gid (Boolean)` the group if othe process is running under\n          - `.launch_arguments (Boolean)` command used to launch the instance\n          - `.pid (Boolean)` the id of the process\n          - `.platform (Boolean)` the operating platform of\n          - `.ruby_version (Boolean)` the version of ruby being used\n          - `.uid (Boolean)` user id the process is running as\n        - `.metric`\n          - `.cpu (Boolean)` track user and system cpu usage\n          - `.memory (Boolean)` track memory usage\n          - `.uptime (Boolean)` track process uptime\n        - `.event`\n          - `.start (Boolean)` event notice when agent starts\n          - `.stop (Boolean)` event notice when agent stops\n        - `.process_event`\n          - `.exit (Boolean)` event notice on process exit\n    \n### Alert\n\n  * .Alert\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.new(attributes = {}) ⇒ client.Alert`\n      * `.remove()`\n      * `.save()`\n      * `.trigger(payload = {})`\n    * `.remove(id, options = {})`\n    * `.trigger(id, payload, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Channel\n\n  * .Channel\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.message(id, content, options = {})`\n    * `.new(attributes = {}) ⇒ client.Channel`\n      * `.message(content)`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Environment\n\n  * .Environment\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.message(id, content, options = {})`\n    * `.new(attributes = {}) ⇒ client.Environment`\n      * `.message(content)`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, payload = {}, options = {})`\n\n### Event\n\n  * .Event\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.new(attributes = {}) ⇒ client.Event`\n      * `.save()`\n\n### Expectation\n\n  * .Expectation\n    * `.check(id, options = {})`\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.new(attributes = {}) ⇒ client.Expectation`\n      * `.check()`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Instance\n\n  * .Instance\n    * `.attach(options = {})`\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.new(attributes = {}) ⇒ client.Instance`\n      * `.add_fact(key, resolver)`\n        * Add a fact to the attach monitoring loop.\n        * `key (symbol)`\n        * `resolver (string|number|block)`\n      * `.add_gauge(key, resolver)`\n        * Add a gauge to the attach monitoring loop.\n        * `key (symbol)`\n        * `resolver (string|number|block)`\n      * `.attach()`\n        * Start inbound monitoring.\n      * `.detach()`\n        * Terminate inbound monitoring.\n      * `.fact(key, value)`\n        * Send a one-off fact.\n      * `.gauge(key, value)`\n        * Send a one-off gauge metric.\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Logic Block\n\n  * .LogicBlock\n    * `.create(attributes = {}, options = {})`\n    * `.execute(id, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.find_by_name(name, options = {})`\n    * `.new(attributes = {}) ⇒ client.LogicBlock`\n      * `.execute()`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Member\n\n  * .Member\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.new(attributes = {}) ⇒ client.Member`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates, options = {})`\n\n### Settings\n\n  * .Settings\n    * `.retrieve()`\n    * `.update(updates, options = {})`\n\n### Task\n\n  * .Task\n    * `.create(attributes = {}, options = {})`\n    * `.find(query = {}, options = {})`\n    * `.find_by_id(id, options = {})`\n    * `.new(attributes = {}) ⇒ client.Task`\n      * `.remove()`\n      * `.save()`\n    * `.remove(id, options = {})`\n    * `.update(id, updates = {}, options = {})`\n\n## Building\n\nTo test, build, and install locally:\n\n    make\n\nTo build and install:\n\n    make build\n\n## Testing\n\nTesting requires:\n\n  - Make\n\nInstall gems locally by running:\n\n    make install\n\nThen run a command below based on what test suite you need to run.\n\n### Lint\n\n    make lint\n\n### Unit\n\n    make unit-test\n\n### Integration\n\n    make integration-test\n\n### Validation\n\nRequires the environment to have a root level access-token defined as:\n\n    export POLYSEERIO_TOKEN=a-test-root-key\n\n    make validation-test\n\n### All\n\n    make test\n\n## Debugging\n\nSet the environment variable POLYSEERIO_LOG_LEVEL to debug in order to get\ndetailed logging information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgnzt%2Fpolyseerio-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgnzt%2Fpolyseerio-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgnzt%2Fpolyseerio-ruby/lists"}