{"id":19935159,"url":"https://github.com/optimizely/chef_opentsdb_handler","last_synced_at":"2025-05-03T12:31:13.215Z","repository":{"id":71780165,"uuid":"44630567","full_name":"optimizely/chef_opentsdb_handler","owner":"optimizely","description":"Chef handler for sending metrics to OpentTSDB","archived":true,"fork":false,"pushed_at":"2015-10-27T17:52:32.000Z","size":133,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":135,"default_branch":"master","last_synced_at":"2025-03-01T12:17:28.930Z","etag":null,"topics":[],"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/optimizely.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":"2015-10-20T19:39:44.000Z","updated_at":"2023-09-28T17:32:52.000Z","dependencies_parsed_at":"2023-03-13T20:19:20.959Z","dependency_job_id":null,"html_url":"https://github.com/optimizely/chef_opentsdb_handler","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fchef_opentsdb_handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fchef_opentsdb_handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fchef_opentsdb_handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optimizely%2Fchef_opentsdb_handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optimizely","download_url":"https://codeload.github.com/optimizely/chef_opentsdb_handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252190787,"owners_count":21708954,"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-11-12T23:18:59.022Z","updated_at":"2025-05-03T12:31:11.268Z","avatar_url":"https://github.com/optimizely.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"opentsdb_handler Cookbook\n==============================\nThis cookbook sets up a handler that reports to [OpenTSDB](http://opentsdb.net/) at the end of a chef run\n\nRequirements\n------------\nThe only requirement is the chef_handler cookbook\n\nAttributes\n----------\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003eKey\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n    \u003cth\u003eDefault\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['metrics']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eHash\u003c/td\u003e\n    \u003ctd\u003ethis is where each metric to be sent is defined as { unique_name =\u003e metric_hash }\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e{}\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['metric'][unique_name]['name']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eMetric name\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003eNone\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['metrics'][unique_name]['value']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eHash\u003c/td\u003e\n    \u003ctd\u003eValue of metric\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003eNone\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['metrics'][unique_name]['tags']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eHash\u003c/td\u003e\n    \u003ctd\u003eKey =\u003e Value hash of tags for the metric.\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e{'hostname' =\u003e Socket.gethostname}(IN HANDLER SCRIPT)\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler'][handler_name]['run_status_tag']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eBoolean\u003c/td\u003e\n    \u003ctd\u003eWill add run_status=0|1 (success, failure respectively) tag if true\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003efalse\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['run_status']['elapsed_time'|'start_time'|'end_time']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eBoolean\u003c/td\u003e\n    \u003ctd\u003eWill send a metric of the chef.elapsed_time (or start_time or end_time) if true. Change tags on ['handlers']['elapsed_time']['tags']\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003efalse\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['hostname']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eopentsdb\u003c/td\u003e\n    \u003ctd\u003eHostname of OpenTSDB server\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003eopentsdb (IN HANDLER SCRIPT)\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['port']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eInteger\u003c/td\u003e\n    \u003ctd\u003ePort of OpenTSDB server\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e4242 (IN HANDLER SCRIPT)\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003ctt\u003e['opentsdb_handler']['timeout']\u003c/tt\u003e\u003c/td\u003e\n    \u003ctd\u003eInteger\u003c/td\u003e\n    \u003ctd\u003eTimeout before failing to send to metric\u003c/td\u003e\n    \u003ctd\u003e\u003ctt\u003e10 (IN HANDLER SCRIPT)\u003c/tt\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nUsage\n-----\n#### opentsdb_handler::default\n\nInclude `opentsdb_handler` in your node's `run_list` and add the following attributes:\n\n```ruby\nnode.default['opentsdb_hander']['metrics']['flying_puppy_metric']['name'] = 'flying_puppy.metric'\nnode.default['opentsdb_hander']['metrics']['flying_puppy_metric']['value'] = 10\n# Optional\nnode.default['opentsdb_hander']['metrics]['flying_puppy_metric']['tags'] = {\"breed\" =\u003e \"corgi\"}\n```\n\nYou can add as many metrics to this hash as you want. The timestamp will be created at the start of the handler.\n\nContributing\n------------\n1. Fork the repository on Github\n2. `bundle install`\n3. Make changes\n4. Test your changes [Testing](#Testing)\n\nTesting\n-------\nIntegration tests are run with [test-kitchen](https://github.com/test-kitchen/test-kitchen), [kitchen-vagrant](https://github.com/test-kitchen/kitchen-vagrant), and [serverspec](serverspec.org) for integration testing. You can take a look at [.kitchen.yml] for how tests are set up. Run with:\n```\nrake kitchen:all\n```\n\nUnit testing is run with [ChefSpec](https://github.com/sethvargo/chefspec)\n\nLinting is done with [foodcritic](https://acrmp.github.io/foodcritic/) and [rubocop](https://github.com/bbatsov/rubocop)\n\nRun unit and linting with:\n```\nrake test\n```\n\n\nLicense and Authors\n-------------------\nAuthors: michael.wood@optimizely.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fchef_opentsdb_handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptimizely%2Fchef_opentsdb_handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptimizely%2Fchef_opentsdb_handler/lists"}