{"id":19600321,"url":"https://github.com/kamon-io/kamon-opentsdb","last_synced_at":"2025-04-27T16:32:19.483Z","repository":{"id":57735701,"uuid":"84666410","full_name":"kamon-io/kamon-opentsdb","owner":"kamon-io","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-17T08:29:31.000Z","size":24,"stargazers_count":2,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T01:32:19.302Z","etag":null,"topics":["kamon","metrics","opentsdb"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/kamon-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-03-11T17:07:58.000Z","updated_at":"2017-08-15T01:11:33.000Z","dependencies_parsed_at":"2022-08-24T03:30:33.315Z","dependency_job_id":null,"html_url":"https://github.com/kamon-io/kamon-opentsdb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamon-io%2Fkamon-opentsdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamon-io%2Fkamon-opentsdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamon-io%2Fkamon-opentsdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamon-io%2Fkamon-opentsdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamon-io","download_url":"https://codeload.github.com/kamon-io/kamon-opentsdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251171621,"owners_count":21547125,"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":["kamon","metrics","opentsdb"],"created_at":"2024-11-11T09:14:25.253Z","updated_at":"2025-04-27T16:32:19.038Z","avatar_url":"https://github.com/kamon-io.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"OpenTSDB Integration    ![Build Status](https://travis-ci.org/kamon-io/kamon-opentsdb.svg?branch=master)\n========================================================================================================\n\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kamon-io/Kamon?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.kamon/kamon-opentsdb_2.11/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.kamon/kamon-opentsdb_2.11)\n\nReporting Metrics to OpenTSDB\n=============================\n\n[OpenTSDB] is a high performance open source database for handling time series\ndata. It uses hbase to allow it to store and serve massive amounts of time series data\nwithout losing granularity.\n\nInstallation\n------------\n\nAdd the `kamon-opentsdb` dependency to your project and ensure that it is in\nyour classpath at runtime. Kamon's module loader will detect that\nthe OpenTSDB module is in the classpath and automatically starts it.\n\n### Getting Started\n\nKamon OpenTSDB module is currently available for Scala 2.10, 2.11 and 2.12.\nIt support version 1.3.0 of OpenTSDB\n\nSupported releases and dependencies are shown below.\n\n| kamon-opentsdb  | status | jdk  | scala            |\n|:------:|:------:|:----:|------------------|\n|  0.6.7 | stable | 1.8+ |  2.10, 2.11, 2.12  |\n\nTo get started with SBT, simply add the following to your `build.sbt`\nfile:\n\n```scala\nlibraryDependencies += \"io.kamon\" %% \"kamon-opentsdb\" % \"0.6.7\"\n```\n\n\nConfiguration\n-------------\n\nPlease refer to the [reference configuration](src/main/resources/reference.conf) for more details.\n\n#### Common actions (i.e. TLDR)\nConnect to OpenTSDB - Set `kamon.opentsdb.direct.quorum` to your zookeeper quorum  \nSet application name - Set `kamon.opentsdb.rules.application.value`  \nOverride host name - Set `kamon.opentsdb.rules.host.value`  \nSet precision of timestamps - Set `kamon.opentsdb.default.timestamp` to 'seconds' or 'milliseconds'  \n\n\n#### Connection\nAlthough OpenTSDB provides a REST interface, at this time the project\nstores data directly to hbase using the TSDB api.  Set the `kamon.opentsdb.direct.quorum` to\na comma separated list of zookeeper servers.\n\n#### Subscriptions\nYou can configure the metric categories to which this\nmodule will subscribe using the `kamon.opentsdb.subscriptions` key. By default,\nthe following subscriptions are included:\n\n```typesafeconfig\nkamon.opentsdb {\n  subscriptions {\n    histogram       = [ \"**\" ]\n    min-max-counter = [ \"**\" ]\n    gauge           = [ \"**\" ]\n    counter         = [ \"**\" ]\n    trace           = [ \"**\" ]\n    trace-segment   = [ \"**\" ]\n    akka-actor      = [ \"**\" ]\n    akka-dispatcher = [ \"**\" ]\n    akka-router     = [ \"**\" ]\n    system-metric   = [ \"**\" ]\n    http-server     = [ \"**\" ]\n  }\n}\n```\n\n#### Metric Name\n\nNames are generated by concatenating the results of several [rules](#rules) together\n\n```typesafeconfig\nkamon.opentsdb.default.name = [application, category, entity, metric, stat]\n```\n\nThis design allows you to easily customize the metric name by reordering,\nadding, and removing [rules](#rules) as you see fit. `kamon.opentsdb.name.separator` is inserted between each rule who result is non-empty.\nEmpty rules are removed from the metric name\n\n#### Metric Tags\n\nAll tags associated with the kamon metric will be passed through to OpenTSDB.\nAdditional tags may be added by mapping tag names to [rules](#rules).\nA tag will be named the exact value listed in the config, if you would like\na different name, create a new rule (See [Extensibility](#extensibility))\n\n```typesafeconfig\nkamon.opentsdb.default.tags = [ application, host ]\n```\n\n#### Stats\n\nMany statistics can be calculated for each Kamon metric, and ,by default,\neach statistic will be stored as a separate OpenTSDB metric.\n\n```typesafeconfig\nkamon.opentsdb.default.stats = [ count, rate, min, max, median, mean, 90, 99 ]\n```\n\nMost statistics can only be used with histograms, however assigning them\nto a counter is harmless.\n\n__Counter stats__\n* __count__: The value of the counter\n* __rate__: The value of the counter divided by the tick length in seconds\n\n__Histogram Stats__\n* __count__: The number of values stored in the histogram\n* __rate__: The number of values stored in the histogram divided by the tick length in seconds\n* __mean__: The average of all values stored during the tick\n* __max__: The largest value stored during the tick\n* __min__: The smallest value stored during the tick\n* __median__: The median value (synonym for \"50\")\n\nAdditionally, numeric values in the stat list, will generate percentile statistics in the OpenTSDB database.\n* __50__: 50th percentile\n* __70.5__: 70.5th percentile\n* __90__: 90th percentile\n\nSee [Extensibility](#extensibility) to learn how to create your own stats.\n\n#### Rules\n\n* __category__: The entity's category.\n* __entity__: The entity's name.\n* __metric__: The metric name assigned in the entity recorder.\n* __stat__: The name of the statistic\n* __host__: The local host name\n* __application__ : The name of the application.  Undefined by default.\n\nSee [Extensibility](#extensibility) to learn how to create your own rules.\n\n#### Idle metrics\nif `filterIdle` is true, don't send values to opentsdb for inactive metrics,\nas opposed to sending 0 for all stats.\n\n### Customization\n\nMetrics can be customized at the global, category, and individual metric level.\n\nTo make alteration at the global level, alter the children of `kamon.opentsdb.default`\n\nTo make alteration at a category level, add entries to `kamon.opentsdb.category`.\nAny values not set on the category level, will be inherited from the defaults.\n\n```typesafeconfig\nkamon.opentsdb.category.counter = { name = [ metric ], stats = [count ] }\n```\n\nThis configuration will change the [name](#metric-name) and [stats](#stats) recorded for counter metrics, but\nthe [tags](#metric-tags) and *timestamp* from `kamon.opentsdb.default` will be used.\n\nTo make alterations for a specific metric, add entries to `kamon.opentsdb.metrics`.\nAny values not set on the metric level, will be inherited from the category and defaults.\n\n```typesafeconfig\nkamon.opentsdb.metrics.\"my.metric.name\" = { stats = [ 90, 95, 99, 99.9, 99.999 ], filterIdle = false }\n```\n\nHere the [name](#metric-name), [tags](#metric-tags), and *timestamp* from the defaults will be used, unless\nthe metric is a \"counter\", in which case the [name](#metric-name) and [stats](#stats) from above will be used.\n\n### Extensibility\n\nYou can add static values to your metric names and tags by adding\nentries of the format `kamon.opentsdb.rules.\u003crule-name\u003e.value = \"some string\"`\nThese values can be referenced in [name](#metric-name) and [tags](#metric-tags) by using *rule-name*\n\nEX.\n```typesafeconfig\nkamon.opentsdb.rules.cluster.value = \"EC2\"\nkamon.opentsdb.default.name = [ cluster, application, category, entity, metric, stat]\n```\n\nYou can create your own dynamic rules by subclassing `kamon.opentsdb.Rule` and adding\nan entry of the format `kamon.opentsdb.rules.\u003cname\u003e.generator = \"fully.qualified.class.name\"`\n\nEX.\n```typesafeconfig\nkamon.opentsdb.rules.timezone.generator = \"leider.ken.application.TimezoneRule\"\nkamon.opentsdb.tags = { host = host, tz = timezone }\n```\n\nYou can create you own stats by subclassing `kamon.opentsdb.Stat` and adding\nan entry of the format `kamon.opentsdb.stats.\u003cname\u003e = \"fully.qualified.class.name\"`\n\nEX.\n```typesafeconfig\nkamon.opentsdb.stats.integral = \"leider.ken.application.IntegralStat\"\nkamon.opentsdb.counter.stats = [ count, rate, integral ]\n```\n\n\n[OpenTSDB]: http://opentsdb.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamon-io%2Fkamon-opentsdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamon-io%2Fkamon-opentsdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamon-io%2Fkamon-opentsdb/lists"}