<?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>node_exporter &#8211; Blog of Kliment Andreev &#8211; A place so I won&#039;t forget things</title>
	<atom:link href="https://blog.andreev.it/tag/node_exporter/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.andreev.it</link>
	<description></description>
	<lastBuildDate>Tue, 03 Nov 2020 22:17:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>FreeBSD: Install Prometheus, Node Exporter and Grafana</title>
		<link>https://blog.andreev.it/2019/04/freebsd-install-prometheus-node-exporter-and-grafana/</link>
					<comments>https://blog.andreev.it/2019/04/freebsd-install-prometheus-node-exporter-and-grafana/#comments</comments>
		
		<dc:creator><![CDATA[Kliment Andreev]]></dc:creator>
		<pubDate>Sat, 20 Apr 2019 22:49:05 +0000</pubDate>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[grafana]]></category>
		<category><![CDATA[node_exporter]]></category>
		<category><![CDATA[prometheus]]></category>
		<guid isPermaLink="false">https://blog.andreev.it/?p=5289</guid>

					<description><![CDATA[FreeBSD comes out of the box with three great tools for monitoring. If you&#8230;]]></description>
										<content:encoded><![CDATA[<div id="bsf_rt_marker"></div><p>FreeBSD comes out of the box with three great tools for monitoring. If you need more info about how these tools work, please read the official documentation. I&#8217;ll explain the installation only and creating a simple dashboard.<br />
The installation is very simple. These amazing tools don&#8217;t need any external libraries. We&#8217;ll install the packages and enable them to start on boot.</p>
<pre class="brush: bash; title: ; notranslate">
pkg install prometheus node_exporter grafana5
sysrc prometheus_enable=YES
sysrc node_exporter_enable=YES
sysrc grafana_enable=YES
</pre>
<p>Add these lines at the very end in <strong>/usr/local/etc/prometheus.yml</strong>. Make sure you have the proper spacing. Check the <strong>job_name</strong> above. They have to be in line.</p>
<pre class="brush: plain; title: ; notranslate">
- job_name: 'node_exporter'
  scrape_interval: 5s
  static_configs:
    - targets: &#x5B;'localhost:9100']
</pre>
<p>Looks like this.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-01.png"><img fetchpriority="high" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-01.png" alt="" width="564" height="227" class="aligncenter size-full wp-image-8529" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-01.png 564w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-01-300x121.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></a><br />
Now start the services. </p>
<pre class="brush: bash; title: ; notranslate">
service prometheus start
service node_exporter start
service grafana start
</pre>
<p>Go to http://your_ip:9090. This is how it should look like.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-02.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-02.png" alt="" width="504" height="499" class="aligncenter size-full wp-image-8530" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-02.png 504w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-02-300x297.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-02-150x150.png 150w" sizes="(max-width: 504px) 100vw, 504px" /></a><br />
Type <strong>prometheus_http_requests_total</strong> or <strong>node_memory_active_bytes</strong> in the Expression field and click on <strong>Execute</strong>. You should see some output below.</p>
<p>Now go to Grafana at http://your_ip:3000. Log as admin/admin and you&#8217;ll be prompted to change your password. From the <strong>Home Dashboard</strong> click on Add Source, right in the middle.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-03.png"><img decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-03.png" alt="" width="1162" height="602" class="aligncenter size-full wp-image-8531" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-03.png 1162w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-03-300x155.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-03-1024x531.png 1024w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-03-768x398.png 768w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-03-585x303.png 585w" sizes="(max-width: 1162px) 100vw, 1162px" /></a><br />
Click on the Prometheus icons from the choice of the others. You&#8217;ll be prompted to fill out this form. Just make sure the URL is http://localhost:9090. Click <strong>Save &#038; Test</strong> and make sure it&#8217;s OK.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-04.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-04.png" alt="" width="699" height="897" class="aligncenter size-full wp-image-8532" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-04.png 699w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-04-234x300.png 234w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-04-585x751.png 585w" sizes="(max-width: 699px) 100vw, 699px" /></a><br />
Now, in the upper left corner where the Grafana logo is, click on the <strong>Plus (+)</strong> sign and choose <strong>Import</strong>. In another browser tab go to this <a href="https://grafana.com/dashboards/1860" rel="noopener noreferrer" target="_blank">link </a>and on the right side click on <strong>Download JSON</strong>. Save it somewhere. Go back to your Grafana dashboard and click on <strong>Upload .json file</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-05.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-05.png" alt="" width="1069" height="636" class="aligncenter size-full wp-image-8533" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-05.png 1069w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-05-300x178.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-05-1024x609.png 1024w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-05-768x457.png 768w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-05-585x348.png 585w" sizes="(max-width: 1069px) 100vw, 1069px" /></a><br />
Find the JSON file that you saved in the previous step and upload it. You&#8217;ll see this screen. Just make sure to choose <strong>Prometheus </strong>under <strong>localhost </strong>parameter and click <strong>Import</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-06.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-06.png" alt="" width="1019" height="452" class="aligncenter size-full wp-image-8534" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-06.png 1019w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-06-300x133.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-06-768x341.png 768w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-06-585x259.png 585w" sizes="(max-width: 1019px) 100vw, 1019px" /></a><br />
That&#8217;s it. You&#8217;ll see the node_exporter&#8217;s dashboard.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-07.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-07.png" alt="" width="734" height="283" class="aligncenter size-full wp-image-8535" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-07.png 734w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-07-300x116.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-07-585x226.png 585w" sizes="(max-width: 734px) 100vw, 734px" /></a><br />
Now, you can add dashboards. Click on the (+) on the left, click on <strong>Dashboard</strong>, click on the arrow next to <strong>Panel Title</strong> and select <strong>Edit</strong>. Add some metrics such as this example below and click on <strong>Add Query</strong>.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-08.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-08.png" alt="" width="456" height="346" class="aligncenter size-full wp-image-8536" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-08.png 456w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-08-300x228.png 300w" sizes="(max-width: 456px) 100vw, 456px" /></a><br />
Finally click on the floppy icon on top to save the dashboard. It looks like this after.<br />
<a href="https://blog.andreev.it/wp-content/uploads/2019/04/P131-09.png"><img loading="lazy" decoding="async" src="https://blog.andreev.it/wp-content/uploads/2019/04/P131-09.png" alt="" width="989" height="458" class="aligncenter size-full wp-image-8537" srcset="https://blog.andreev.it/wp-content/uploads/2019/04/P131-09.png 989w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-09-300x139.png 300w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-09-768x356.png 768w, https://blog.andreev.it/wp-content/uploads/2019/04/P131-09-585x271.png 585w" sizes="(max-width: 989px) 100vw, 989px" /></a><br />
You can also go to this <a href="https://grafana.com/grafana/dashboards?orderBy=name&#038;direction=asc">site </a>and use some community dashboards for various metrics and applications.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.andreev.it/2019/04/freebsd-install-prometheus-node-exporter-and-grafana/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
