<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>データソースの設定 | データ可視化ツール Grafana入門</title>
	<atom:link href="https://takabus.com/grafana/category/%E3%83%87%E3%83%BC%E3%82%BF%E3%82%BD%E3%83%BC%E3%82%B9%E3%81%AE%E8%A8%AD%E5%AE%9A/feed/" rel="self" type="application/rss+xml" />
	<link>https://takabus.com/grafana</link>
	<description>データ可視化ツールGrafanaを使ってみよう！便利な使い方をまとめています。</description>
	<lastBuildDate>Mon, 26 Sep 2022 15:08:29 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>

<image>
	<url>https://takabus.com/grafana/wp-content/uploads/2022/08/cropped-Grafana-favicon-32x32.png</url>
	<title>データソースの設定 | データ可視化ツール Grafana入門</title>
	<link>https://takabus.com/grafana</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>UTC以外のタイムゾーンのデータベースに接続するには？</title>
		<link>https://takabus.com/grafana/non-utc/</link>
		
		<dc:creator><![CDATA[Grafana入門]]></dc:creator>
		<pubDate>Fri, 19 Aug 2022 07:07:20 +0000</pubDate>
				<category><![CDATA[データソースの設定]]></category>
		<guid isPermaLink="false">https://takabus.com/grafana/?p=179</guid>

					<description><![CDATA[UTC以外で格納されているデータをGrafanaで表示すると、時間がズレてしまうときの対処法を紹介します。]]></description>
										<content:encoded><![CDATA[
<p>UTC以外で格納されているデータをGrafanaで表示すると、時間がズレてしまうときの対処法を紹介します。</p>




  <div id="toc" class="toc tnt-number toc-center tnt-number border-element"><input type="checkbox" class="toc-checkbox" id="toc-checkbox-1" checked><label class="toc-title" for="toc-checkbox-1">目次</label>
    <div class="toc-content">
    <ol class="toc-list open"><li><a href="#toc1" tabindex="0">なぜ時刻がずれるのか？</a></li><li><a href="#toc2" tabindex="0">データソースのタイムゾーンを指定する</a></li></ol>
    </div>
  </div>

<h2 class="wp-block-heading"><span id="toc1">なぜ時刻がずれるのか？</span></h2>



<p>Grafanaでは、基本的にデータベースに含まれる時刻をUTCとして解釈します。</p>



<p>このため、例えば日本標準時（JST）で時刻が格納されているデータベースをGrafanaで扱おうとすると、データの時刻がズレて表示されてしまいます。</p>



<p>こういったときの対処法を示します。</p>



<h2 class="wp-block-heading"><span id="toc2">データソースのタイムゾーンを指定する</span></h2>



<p>GrafanaのトップページからConfiguration＞Data sourcesへ移動します。</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="668" src="https://takabus.com/grafana/wp-content/uploads/2022/08/image-61-1024x668.png" alt="" class="wp-image-180" srcset="https://takabus.com/grafana/wp-content/uploads/2022/08/image-61-1024x668.png 1024w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-61-300x196.png 300w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-61-768x501.png 768w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-61.png 1186w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>設定したいデータソースを開きます。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="668" src="https://takabus.com/grafana/wp-content/uploads/2022/08/image-62-1024x668.png" alt="" class="wp-image-181" srcset="https://takabus.com/grafana/wp-content/uploads/2022/08/image-62-1024x668.png 1024w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-62-300x196.png 300w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-62-768x501.png 768w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-62.png 1186w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>[Session timezone]でデータベースのタイムゾーンを指定します。</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="659" src="https://takabus.com/grafana/wp-content/uploads/2022/08/image-63-1024x659.png" alt="" class="wp-image-182" srcset="https://takabus.com/grafana/wp-content/uploads/2022/08/image-63-1024x659.png 1024w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-63-300x193.png 300w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-63-768x494.png 768w, https://takabus.com/grafana/wp-content/uploads/2022/08/image-63.png 1177w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>例えば、データベースに日本標準時（UTC+09:00）で時刻が格納されているなら、+09:00と入力します。</p>



<p>これでズレることはなくなります。</p>



<p></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
