{"id":89,"date":"2015-12-24T13:07:42","date_gmt":"2015-12-24T11:07:42","guid":{"rendered":"https:\/\/serverstuff.info\/wordpress\/?p=89"},"modified":"2016-01-02T16:29:02","modified_gmt":"2016-01-02T14:29:02","slug":"getting-up-and-ready-with-hbase-opentsdb-tcollector-grafana","status":"publish","type":"post","link":"https:\/\/serverstuff.info\/wordpress\/2015\/12\/24\/getting-up-and-ready-with-hbase-opentsdb-tcollector-grafana\/","title":{"rendered":"Running with hbase+opentsdb+tcollector+grafana"},"content":{"rendered":"<h2>Getting grafana opentsdb hbase and tcollector<\/h2>\n<p><a href=\"https:\/\/grafanarel.s3.amazonaws.com\/builds\/grafana-2.6.0.linux-x64.tar.gz\">https:\/\/grafanarel.s3.amazonaws.com\/builds\/grafana-2.6.0.linux-x64.tar.gz<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/OpenTSDB\/opentsdb\/releases\/download\/2.1.1\/opentsdb-2.1.1.tar.gz\">https:\/\/github.com\/OpenTSDB\/opentsdb\/releases\/download\/2.1.1\/opentsdb-2.1.1.tar.gz<\/a><\/p>\n<p><a href=\"https:\/\/www.eu.apache.org\/dist\/hbase\/1.1.2\/hbase-1.1.2-bin.tar.gz\">https:\/\/www.eu.apache.org\/dist\/hbase\/1.1.2\/hbase-1.1.2-bin.tar.gz<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/OpenTSDB\/tcollector.git\">git clone https:\/\/github.com\/OpenTSDB\/tcollector.git<\/a><\/p>\n<h2>Setup<\/h2>\n<h1>REPLACE ~ in this guide with the actual path ! Not all params are expanded by the service.<\/h1>\n<p>CHANGE THE ~\/hbase-1.1.2\/conf\/hbase-site.xml and add this in the section<br \/>\n<code>&lt;property&gt;<br \/>\n&lt;name&gt;hbase.rootdir&lt;\/name&gt;<br \/>\n&lt;value&gt;file:\/\/\/your\/user\/home\/hbase-rootdir\/hbase&lt;\/value&gt;<br \/>\n&lt;\/property&gt;<br \/>\n<\/code><\/p>\n<p>Otherwise you&#8217;ll probably loose your data at a reboot since the default is in \/tmp and it will be cleaned.<br \/>\n<code><br \/>\nenv COMPRESSION=NONE HBASE_HOME=~\/hbase-1.1.2 ~\/opentsdb-2.1.1\/create_table.sh<br \/>\nmkdir ~\/opentsdb-tmp<br \/>\n<\/code><\/p>\n<h2>Start Everything Up<\/h2>\n<p><code><br \/>\n# Run everything as a different user, NOT ROOT !!!!<br \/>\n~\/hbase-1.1.2\/bin\/start-hbase.sh<br \/>\n~\/opentsdb-2.1.1\/build\/tsdb tsd --port=4242 --staticroot=~\/opentsdb-2.1.1\/build\/staticroot\/ --cachedir=~\/opentsdb-tmp --zkquorum=localhost:2181 --auto-metric --config=~\/opentsdb-2.1.1\/opentsdb.conf &amp;<br \/>\n~\/tcollector\/startstop start --allowed-inactivity-time=3600 --backup-count=10 -v<br \/>\n~\/grafana-2.6.0\/bin\/grafana-server -homepath=~\/grafana-2.6.0\/ -pidfile=~\/grafana-2.6.0\/grafana.pid &amp;<br \/>\n<\/code><\/p>\n<p>My opentsdb.conf looks like this<br \/>\n<code><br \/>\ntsd.http.request.cors_domains = *<br \/>\ntsd.network.port = 4242<br \/>\ntsd.network.bind = 127.0.0.1<br \/>\n<\/code><\/p>\n<p>My grafana&#8217;s defaults.ini looks like this. No need to tinker with the mysqldb. Just create the db and give privileges and it&#8217;ll take care of creating its tables.<\/p>\n<p><code><br \/>\napp_mode = production<\/code><\/p>\n<p>[paths]<br \/>\ndata = data<br \/>\nlogs = data\/log<\/p>\n<p>[server]<br \/>\nprotocol = http<br \/>\nhttp_addr =<br \/>\nhttp_port = 3000<br \/>\ndomain = serverstuff.info<br \/>\nenforce_domain = false<br \/>\nroot_url = %(protocol)s:\/\/%(domain)s:%(http_port)s\/grafana\/<br \/>\nrouter_logging = false<br \/>\nstatic_root_path = public<br \/>\nenable_gzip = false<br \/>\ncert_file =<br \/>\ncert_key =<\/p>\n<p>[database]<br \/>\ntype = mysql<br \/>\nhost = 127.0.0.1:3306<br \/>\nname = grafana<br \/>\nuser = grafana<br \/>\npassword = password<br \/>\nssl_mode = disable<br \/>\npath = grafana.db<\/p>\n<p>[session]<br \/>\nprovider = file<br \/>\nprovider_config = sessions<br \/>\ncookie_name = grafana_sess<br \/>\ncookie_secure = false<br \/>\nsession_life_time = 86400<br \/>\ngc_interval_time = 86400<\/p>\n<p>[analytics]<br \/>\nreporting_enabled = true<br \/>\ngoogle_analytics_ua_id =<br \/>\ngoogle_tag_manager_id =<\/p>\n<p>[security]<br \/>\nadmin_user = admin<br \/>\nadmin_password = admin<br \/>\nsecret_key = keyhere<br \/>\nlogin_remember_days = 7<br \/>\ncookie_username = grafana_user<br \/>\ncookie_remember_name = grafana_remember<br \/>\ndisable_gravatar = false<br \/>\ndata_source_proxy_whitelist =<\/p>\n<p>[users]<br \/>\nallow_sign_up = false<br \/>\nallow_org_create = false<br \/>\nauto_assign_org = true<br \/>\nauto_assign_org_role = Viewer<br \/>\nverify_email_enabled = false<\/p>\n<p>[auth.anonymous]<br \/>\nenabled = false<br \/>\norg_name = Main Org.<br \/>\norg_role = Viewer<\/p>\n<p>[auth.github]<br \/>\nenabled = false<br \/>\nallow_sign_up = false<br \/>\nclient_id = some_id<br \/>\nclient_secret = some_secret<br \/>\nscopes = user:email<br \/>\nauth_url = https:\/\/github.com\/login\/oauth\/authorize<br \/>\ntoken_url = https:\/\/github.com\/login\/oauth\/access_token<br \/>\napi_url = https:\/\/api.github.com\/user<br \/>\nteam_ids =<br \/>\nallowed_organizations =<\/p>\n<p>[auth.google]<br \/>\nenabled = false<br \/>\nallow_sign_up = false<br \/>\nclient_id = some_client_id<br \/>\nclient_secret = some_client_secret<br \/>\nscopes = https:\/\/www.googleapis.com\/auth\/userinfo.profile https:\/\/www.googleapis.com\/auth\/userinfo.email<br \/>\nauth_url = https:\/\/accounts.google.com\/o\/oauth2\/auth<br \/>\ntoken_url = https:\/\/accounts.google.com\/o\/oauth2\/token<br \/>\napi_url = https:\/\/www.googleapis.com\/oauth2\/v1\/userinfo<br \/>\nallowed_domains =<\/p>\n<p>[auth.basic]<br \/>\nenabled = true<\/p>\n<p>[auth.proxy]<br \/>\nenabled = false<br \/>\nheader_name = X-WEBAUTH-USER<br \/>\nheader_property = username<br \/>\nauto_sign_up = true<\/p>\n<p>[auth.ldap]<br \/>\nenabled = false<br \/>\nconfig_file = \/etc\/grafana\/ldap.toml<\/p>\n<p>[smtp]<br \/>\nenabled = false<br \/>\nhost = localhost:25<br \/>\nuser =<br \/>\npassword =<br \/>\ncert_file =<br \/>\nkey_file =<br \/>\nskip_verify = false<br \/>\nfrom_address = admin@grafana.localhost<\/p>\n<p>[emails]<br \/>\nwelcome_email_on_sign_up = false<br \/>\ntemplates_pattern = emails\/*.html<\/p>\n<p>[log]<br \/>\nmode = console, file<br \/>\nbuffer_len = 10000<br \/>\nlevel = Info<\/p>\n<p>[log.console]<br \/>\nlevel =<br \/>\nformatting = true<\/p>\n<p>[log.file]<br \/>\nlevel =<br \/>\nlog_rotate = true<br \/>\nmax_lines = 1000000<br \/>\nmax_lines_shift = 28<br \/>\ndaily_rotate = true<br \/>\nmax_days = 7<\/p>\n<p>[event_publisher]<br \/>\nenabled = false<br \/>\nrabbitmq_url = amqp:\/\/localhost\/<br \/>\nexchange = grafana_events<\/p>\n<p>[dashboards.json]<br \/>\nenabled = false<br \/>\npath = \/var\/lib\/grafana\/dashboards<\/p>\n<p>[quota]<br \/>\nenabled = false<br \/>\norg_user = 10<br \/>\norg_dashboard = 100<br \/>\norg_data_source = 10<br \/>\norg_api_key = 10<br \/>\nuser_org = 10<br \/>\nglobal_user = -1<br \/>\nglobal_org = -1<br \/>\nglobal_dashboard = -1<br \/>\nglobal_api_key = -1<br \/>\nglobal_session = -1<\/p>\n<h1>Upgrading<\/h1>\n<h2>For Grafana:<\/h2>\n<p><code><br \/>\n#wget new grafana<br \/>\ntar -xzf grafana-version.linux-x64.tar.gz<br \/>\npkill -9 grafana-server<br \/>\ncp grafana-old\/conf\/defaults.ini grafana-new\/conf\/defaults.ini<br \/>\n~\/grafana-new\/bin\/grafana-server -homepath=~\/grafana-new\/ -pidfile=~\/grafana-new\/grafana.pid &amp;<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting grafana opentsdb hbase and tcollector https:\/\/grafanarel.s3.amazonaws.com\/builds\/grafana-2.6.0.linux-x64.tar.gz https:\/\/github.com\/OpenTSDB\/opentsdb\/releases\/download\/2.1.1\/opentsdb-2.1.1.tar.gz https:\/\/www.eu.apache.org\/dist\/hbase\/1.1.2\/hbase-1.1.2-bin.tar.gz git clone https:\/\/github.com\/OpenTSDB\/tcollector.git Setup REPLACE ~ in this guide with the actual path ! Not all params are expanded by the service. CHANGE THE ~\/hbase-1.1.2\/conf\/hbase-site.xml and add this in the section &lt;property&gt; &lt;name&gt;hbase.rootdir&lt;\/name&gt; &lt;value&gt;file:\/\/\/your\/user\/home\/hbase-rootdir\/hbase&lt;\/value&gt; &lt;\/property&gt; Otherwise you&#8217;ll probably loose your data at a reboot since the &hellip; <a href=\"https:\/\/serverstuff.info\/wordpress\/2015\/12\/24\/getting-up-and-ready-with-hbase-opentsdb-tcollector-grafana\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Running with hbase+opentsdb+tcollector+grafana<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-89","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/89","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/comments?post=89"}],"version-history":[{"count":6,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/posts\/89\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/media?parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/categories?post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverstuff.info\/wordpress\/wp-json\/wp\/v2\/tags?post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}