{"id":21470019,"url":"https://github.com/sensu-plugins/sensu-plugins-rocket-chat","last_synced_at":"2025-08-15T20:47:58.705Z","repository":{"id":52452989,"uuid":"158419547","full_name":"sensu-plugins/sensu-plugins-rocket-chat","owner":"sensu-plugins","description":"Sensu plugin for interfacing with RocketChat (based on sensu-plugins-telegram)","archived":false,"fork":false,"pushed_at":"2021-04-28T21:41:54.000Z","size":25,"stargazers_count":2,"open_issues_count":6,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-04T08:20:22.547Z","etag":null,"topics":["rocketchat","sensu","sensu-plugin"],"latest_commit_sha":null,"homepage":null,"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/sensu-plugins.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.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":"2018-11-20T16:28:40.000Z","updated_at":"2020-09-27T04:23:02.000Z","dependencies_parsed_at":"2022-08-18T19:32:31.330Z","dependency_job_id":null,"html_url":"https://github.com/sensu-plugins/sensu-plugins-rocket-chat","commit_stats":null,"previous_names":["lagartoflojo/sensu-plugins-rocket-chat"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sensu-plugins/sensu-plugins-rocket-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-rocket-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-rocket-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-rocket-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-rocket-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sensu-plugins","download_url":"https://codeload.github.com/sensu-plugins/sensu-plugins-rocket-chat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sensu-plugins%2Fsensu-plugins-rocket-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270630011,"owners_count":24619370,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"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":["rocketchat","sensu","sensu-plugin"],"created_at":"2024-11-23T09:20:39.291Z","updated_at":"2025-08-15T20:47:57.955Z","avatar_url":"https://github.com/sensu-plugins.png","language":"Ruby","readme":"## Sensu-Plugins-RocketChat\n\n[![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-rocket-chat.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-rocket-chat)\n[![Gem Version](https://badge.fury.io/rb/sensu-plugins-rocket-chat.svg)](http://badge.fury.io/rb/sensu-plugins-rocket-chat)\n\n## Functionality\n\nThis plugin provides a handler to send notifications to a RocketChat chat.\n\n## Files\n * bin/handler-rocketchat.rb\n\n## Usage\n\nAfter installation, you have to set up a `pipe` type handler, like so:\n\n```json\n{\n  \"handlers\": {\n    \"rocketchat\": {\n      \"type\": \"pipe\",\n      \"command\": \"handler-rocketchat.rb\",\n      \"filter\": \"occurrences\"\n    }\n  }\n}\n```\n\nThis gem also expects a JSON configuration file with the following contents:\n\n```json\n{\n  \"rocketchat\": {\n    \"server_url\": \"SERVER_URL\",\n    \"username\": \"YOUR_USERNAME\",\n    \"password\": \"YOUR_PASSWORD\",\n    \"room_id\": \"ROOM_ID\",\n    \"error_file_location\": \"/tmp/rocketchat_handler_error\"\n  }\n}\n```\n\n### Parameters:\n- `server_url`: The URL of the RocketChat instance (e.g.\n  `https://chat.yourcompany.com`).\n- `ssl_ca_file` (optional): The path to the certificate file used by the\n  RocketChat server.\n- `ssl_verify_mode` (optional): Value `1` will try to verify the SSL certificate\n  of the RocketChat server (default), while `0` will skip verification (not\n  recommended).\n- `username`: The username of the RocketChat account that will be used to send\n  the messages. You probably want to use a special \"bot\" account for this.\n- `password`: The password of the RocketChat account that will be used to send\n  the messages.\n- `room_id`: The room to which the error message is to be sent. To send the\n  message to a user, `room_id` should look like `@username`. For a channel,\n  `channel-name`.\n- `error_file_location` (optional): in case there is a failure sending the\n  message to RocketChat (ie. connectivity issues), the exception message will\n  be written to a file in this location. You can then monitor this\n  location to detect any errors with the RocketChat handler.\n- `message_template` (optional): An ERB template in Markdown to use to format\n  messages instead of the default. Supports the following variables:\n  - `action_name`\n  - `action_icon`\n  - `client_name`\n  - `check_name`\n  - `status`\n  - `status_icon`\n  - `output`\n- `message_template_file` (optional): A file to read an ERB template in Markdown\n  from to format messages. Supports the same variables as `message_template`.\n\n\n### Advanced configuration\n\nBy default, the handler assumes that the config parameters are specified in the\n`rocketchat` top-level key of the JSON, as shown above. You also have the option\nto make the handler fetch the config from a different key. To do this, pass the\n`-j` option to the handler with the name of the desired key You can define\nmultiple handlers, and each handler can send notifications to a different room\nand from a different bot. You could, for example, have critical and non-critical\nRocketChat rooms, and send the notifications to one or the other depending on the\ncheck. For example:\n\n```json\n{\n  \"handlers\": {\n    \"critical_rocketchat\": {\n      \"type\": \"pipe\",\n      \"command\": \"handler-rocketchat.rb -j critical_rocketchat_options\"\n    },\n    \"non_critical_rocketchat\": {\n      \"type\": \"pipe\",\n      \"command\": \"handler-rocketchat.rb -j non_critical_rocketchat_options\"\n    }\n  }\n}\n```\n\nThis example will fetch the options from a JSON like this:\n\n```json\n{\n  \"rocketchat\": {\n    \"server_url\": \"SERVER_URL\",\n    \"username\": \"YOUR_USERNAME\",\n    \"password\": \"YOUR_PASSWORD\"\n  },\n  \"critical_rocketchat_options\": {\n    \"room_id\": \"emergency-alerts\"\n  },\n  \"non_critical_rocketchat_options\": {\n    \"room_id\": \"non-critical-alerts\"\n  }\n}\n```\n\nAs you can see, you can specify the default config in the `rocketchat` key, and\nthe rest of the config in their own custom keys.\n\nYou can also directly add the configuration parameters to the event data using a\nmutator. For example:\n\n```ruby\n#!/usr/bin/env ruby\nrequire 'rubygems'\nrequire 'json'\nevent = JSON.parse(STDIN.read, symbolize_names: true)\nevent.merge!(room_id: 'emergency-alerts')\nputs JSON.dump(event)\n```\n\n### Configuration precedence\n\nThe handler will load the config as follows (from least to most priority):\n\n* Default `rocketchat` key\n* Custom config keys\n* Event data\n\n## Installation\n\n[Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)\n\n## Notes\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-rocket-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-rocket-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensu-plugins%2Fsensu-plugins-rocket-chat/lists"}