{"id":2739,"date":"2020-12-05T13:00:00","date_gmt":"2020-12-05T13:00:00","guid":{"rendered":"https:\/\/chewett.co.uk\/blog\/?p=2739"},"modified":"2020-11-22T16:15:20","modified_gmt":"2020-11-22T16:15:20","slug":"installing-influxdb-on-a-raspberry-pi","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/2739\/installing-influxdb-on-a-raspberry-pi\/","title":{"rendered":"Installing InfluxDB on a Raspberry Pi"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"2742\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2739\/installing-influxdb-on-a-raspberry-pi\/raspberry_influxdb\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"raspberry_influxdb\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?resize=678%2C254&#038;ssl=1\" alt=\"\" class=\"wp-image-2742\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberry_influxdb.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>Today I am writing a quick describing how you can install InfluxDB on a Raspberry Pi<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What is InfluxDB?<\/h2>\n\n\n\n<p>InfluxDB is a relatively popular time series database that allows storing metrics and data. It is specifically designed to store and operate on data that is bound by a time component.<\/p>\n\n\n\n<p>One of the areas it excels is high volume data entry and retrieval of that data. This makes it well suited to be used by the Raspberry Pi Cluster for storing metric data about the cluster.<\/p>\n\n\n\n<p>By default it is not included in the Raspberry Pi&#8217;s repositories to you need to perform a few steps to install it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Installing InfluxDB on the Raspberry Pi<\/h2>\n\n\n\n<p>First you will want to run all the updates on the Raspberry Pi. This can be done by running the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update<br>sudo apt upgrade<\/pre>\n\n\n\n<p>Once done you may want to reboot to ensure all files are cleanly loaded.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Adding the InfluxDb repository<\/h3>\n\n\n\n<p>When all updates are done you will want to install the Debian repository and public key.<\/p>\n\n\n\n<p>First run the following command to install the public key. This will ensure that the packages downloaded are properly signed and have not been corrupted or interfered with.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget -qO- https:\/\/repos.influxdata.com\/influxdb.key | sudo apt-key add -<\/pre>\n\n\n\n<p>Once done you will then be able to add the repository file to the Raspberry Pi. The following command will work if you are running Raspberry Pi OS 10 codenamed &#8220;buster&#8221;.<\/p>\n\n\n\n<p>However if you are on an older version you will need to replace buster with the appropriate version name, one of: wheezy, jessie, or stretch.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"deb https:\/\/repos.influxdata.com\/debian buster stable\" | sudo tee \/etc\/apt\/sources.list.d\/influxdb.list<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Installing InfluxDB<\/h3>\n\n\n\n<p>Once the repository is added you can run the following commands to update and install InfluxDB.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update<br>sudo apt install influxdb<\/pre>\n\n\n\n<p>At this point InfluxDB is ready to be used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Starting InfluxDB and enabling it to run on start up<\/h3>\n\n\n\n<p>To allow InfluxDB to run on start up you should run the following commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl unmask influxdb<br>sudo systemctl enable influxdb<\/pre>\n\n\n\n<p>Once these are ran InfluxDB will start on next boot. However if you want to run InfluxDB now you will want to run one final command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start influxdb<\/pre>\n\n\n\n<p>Once ran the InfluxDB service will be running and you will be able to start using it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I am writing a quick describing how you can install InfluxDB on a Raspberry Pi<\/p>\n","protected":false},"author":1,"featured_media":2741,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Today I have written about how you can install InfluxDB on a Raspberry Pi.","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[122],"tags":[372,37,101,393],"class_list":["post-2739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-raspberry-pi-cluster","tag-influxdb","tag-raspberry-pi","tag-raspberry-pi-cluster","tag-raspberry-pi-os"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/11\/raspberrypi_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-Ib","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2744,"url":"https:\/\/chewett.co.uk\/blog\/2744\/raspberry-pi-cluster-node-17-influxdb-machine-stats-monitoring\/","url_meta":{"origin":2739,"position":0},"title":"Raspberry Pi Cluster Node \u2013 17 InfluxDB Machine Stats Monitoring","author":"Chewett","date":"December 19, 2020","format":false,"excerpt":"This post builds on\u00a0my previous posts in the Raspberry Pi Cluster series\u00a0by performing a small refactor and storing cluster vitals data to InfluxDB. Refactoring the codebase a little To start with I will refactor the codebase a little so it is more split up. By introducing a few new package\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/raspi_cluster_17_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/raspi_cluster_17_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/raspi_cluster_17_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/raspi_cluster_17_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/raspi_cluster_17_influxdb_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2780,"url":"https:\/\/chewett.co.uk\/blog\/2780\/raspberry-pi-cluster-node-18-raspberry-pi-temperature-monitoring\/","url_meta":{"origin":2739,"position":1},"title":"Raspberry Pi Cluster Node \u2013 18 Raspberry Pi Temperature Monitoring","author":"Chewett","date":"February 20, 2021","format":false,"excerpt":"This post builds on\u00a0my previous posts in the Raspberry Pi Cluster series\u00a0by starting to log temperature with the RaspberryPiVcgencmd Python module. Installing RaspberryPiVcgencmd RaspberryPiVcgencmd is a small python module aimed to control vcgencmd and allow programmatic access to it. This can be installed with the following command. python3 -m pip\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/02\/raspi_cluster_18_cputemperature_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/02\/raspi_cluster_18_cputemperature_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/02\/raspi_cluster_18_cputemperature_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/02\/raspi_cluster_18_cputemperature_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/02\/raspi_cluster_18_cputemperature_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2674,"url":"https:\/\/chewett.co.uk\/blog\/2674\/moving-the-raspberry-pi-cluster-to-a-raspberry-pi-4b-4gb\/","url_meta":{"origin":2739,"position":2},"title":"Moving the Raspberry Pi Cluster to a Raspberry Pi 4B 4GB","author":"Chewett","date":"October 10, 2020","format":false,"excerpt":"Today I am talking about moving the Raspberry Pi Cluster primary node to a Raspberry Pi 4B 4GB model. I also discuss the improvements that the Raspberry Pi 4B has made over previous generations. Why move to a Raspberry Pi 4B Generally running the cluster does not require a large\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/10\/raspberrypi_4_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":1054,"url":"https:\/\/chewett.co.uk\/blog\/1054\/raspberry-pi-tutorial-website-online-now\/","url_meta":{"origin":2739,"position":3},"title":"Raspberry Pi Tutorial Website online now!","author":"Chewett","date":"March 10, 2018","format":false,"excerpt":"This post talks about the new page on my website with linking to all my Raspberry Pi Cluster tutorials. Raspberry Pi Cluster Tutorial Webpage Now I have a couple Raspberry Pi Cluster tutorials I decided to link to all of them on my website. This will form the basis of\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/rpi_tutorial_website_online.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/rpi_tutorial_website_online.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/rpi_tutorial_website_online.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2018\/03\/rpi_tutorial_website_online.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":289,"url":"https:\/\/chewett.co.uk\/blog\/289\/stacking-multiple-raspberry-pis\/","url_meta":{"origin":2739,"position":4},"title":"Stacking multiple Raspberry Pi&#8217;s","author":"Chewett","date":"April 23, 2017","format":false,"excerpt":"For the\u00a0Raspberry Pi cluster I wanted to make sure that they are neatly stored to keep them easy to reach. Why nicely storing them is important Each Raspberry Pi requires a power and network cable. When using a single raspberry pi\u00a0the cables are not an issue but I\u00a0am planning to\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/ae01.alicdn.com\/kf\/HTB133zjHVXXXXXnXpXXq6xXFXXXy\/201159365\/HTB133zjHVXXXXXnXpXXq6xXFXXXy.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/ae01.alicdn.com\/kf\/HTB133zjHVXXXXXnXpXXq6xXFXXXy\/201159365\/HTB133zjHVXXXXXnXpXXq6xXFXXXy.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/ae01.alicdn.com\/kf\/HTB133zjHVXXXXXnXpXXq6xXFXXXy\/201159365\/HTB133zjHVXXXXXnXpXXq6xXFXXXy.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/ae01.alicdn.com\/kf\/HTB133zjHVXXXXXnXpXXq6xXFXXXy\/201159365\/HTB133zjHVXXXXXnXpXXq6xXFXXXy.jpg?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":448,"url":"https:\/\/chewett.co.uk\/blog\/448\/testing-performance-raspberry-pi\/","url_meta":{"origin":2739,"position":5},"title":"Testing the performance of a Raspberry Pi","author":"Chewett","date":"July 12, 2017","format":false,"excerpt":"I will be testing the performance of each Raspberry Pi version in my cluster. This is to determine what each one is best suited to running. To do this I need a similar set of tests to run for each and compare them. Ideally the tests will also be runnable\u2026","rel":"","context":"In &quot;Raspberry Pi Cluster&quot;","block_context":{"text":"Raspberry Pi Cluster","link":"https:\/\/chewett.co.uk\/blog\/category\/raspberry-pi-cluster\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2739"}],"version-history":[{"count":2,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2739\/revisions"}],"predecessor-version":[{"id":2743,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2739\/revisions\/2743"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/2741"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}