{"id":1977,"date":"2023-08-26T19:44:16","date_gmt":"2023-08-26T19:44:16","guid":{"rendered":"https:\/\/www.dev-metal.ch\/?p=1977"},"modified":"2023-08-26T21:17:24","modified_gmt":"2023-08-26T21:17:24","slug":"influxdb-v2-auf-proxmox-lxc","status":"publish","type":"post","link":"https:\/\/www.dev-metal.ch\/?p=1977","title":{"rendered":"Influxdb v2 auf Proxmox (LXC)"},"content":{"rendered":"\n<p>Hier beschreibe ich eine M\u00f6glichkeit eine Influxdb auf Proxmox containerbasiert zu installieren.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Login Proxmox<\/li>\n\n\n\n<li>Proxmox-Host Shell anw\u00e4hlen =&gt; Commando Prompt wird angezeigt<\/li>\n\n\n\n<li>Folgenden Befehl eingeben (aus <a rel=\"noreferrer noopener\" href=\"https:\/\/tteck.github.io\/Proxmox\/\" target=\"_blank\">https:\/\/tteck.github.io\/Proxmox\/<\/a>)<br><code>bash -c \"$(wget -qLO - https:\/\/github.com\/tteck\/Proxmox\/raw\/main\/ct\/influxdb.sh)\"<\/code>\n<ul class=\"wp-block-list\">\n<li>Settings:  &#8222;Advanced&#8220;<\/li>\n\n\n\n<li>OS: W\u00e4hle Debian&gt;Ubuntu 22.04 (LTS)<\/li>\n\n\n\n<li>Container Type: Unprivileged<\/li>\n\n\n\n<li>Password: Setze Root Passwort<\/li>\n\n\n\n<li>Container ID: default belassen<\/li>\n\n\n\n<li>Hostname: influxdbV2<\/li>\n\n\n\n<li>Disk Size in GB: 8<\/li>\n\n\n\n<li>CPU Cores: 2<\/li>\n\n\n\n<li>RAM in MiB: 2048<\/li>\n\n\n\n<li>Bridge: vmbr0<\/li>\n\n\n\n<li>IP Adress: dhcp<\/li>\n\n\n\n<li>IPv6: enable<\/li>\n\n\n\n<li>MTU Size: blank<\/li>\n\n\n\n<li>DNS Search Domain: blank<\/li>\n\n\n\n<li>DNS Server IP: 192.168.3.1<\/li>\n\n\n\n<li>MAC Address: blank<\/li>\n\n\n\n<li>Vlan: blank<\/li>\n\n\n\n<li>Enable Root SSH Access: yes<\/li>\n\n\n\n<li>Enable Verbose Mode: no<\/li>\n\n\n\n<li>Create InfluxDB LXC: yes<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<div class=\"wp-block-cover has-custom-content-position is-position-top-center\"><span aria-hidden=\"true\" class=\"wp-block-cover__background has-background-dim\"><\/span><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"478\" class=\"wp-block-cover__image-background wp-image-1978\" alt=\"\" src=\"https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655-1024x478.png\" data-object-fit=\"cover\" srcset=\"https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655-1024x478.png 1024w, https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655-300x140.png 300w, https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655-768x358.png 768w, https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655-2x1.png 2w, https:\/\/www.dev-metal.ch\/wp-content\/uploads\/2023\/08\/Screenshot-2023-08-26-213655.png 1239w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><div class=\"wp-block-cover__inner-container is-layout-flow wp-block-cover-is-layout-flow\">\n<p class=\"has-text-align-center has-large-font-size\"><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<ul class=\"wp-block-list\">\n<li>Als n\u00e4chstes kann ausgew\u00e4hlt werden, welche Influxdb Version installiert werden soll. Hier w\u00e4hle ich Version 2.<\/li>\n\n\n\n<li>Telegraf installiere ich auch gleich mit.<\/li>\n\n\n\n<li>Damit ist die Installation auch schon abgeschlossen.<\/li>\n\n\n\n<li>Als n\u00e4chstes \u00fcberpr\u00fcfen ob der Container korrekt erstellt wurde.<\/li>\n<\/ul>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">InfluxDB Configuration<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u00d6ffne einen Browser mit Link &#8222;http:\/\/&lt;ip Adresse des Containers>:8086<\/li>\n\n\n\n<li>Es \u00f6ffnet sich die Browser-Oberfl\u00e4che von Influxdb V2<\/li>\n\n\n\n<li>Get Startet<\/li>\n\n\n\n<li>Username: admin<\/li>\n\n\n\n<li>Passwort: => passwort<\/li>\n\n\n\n<li>Organisation Name: Home<\/li>\n\n\n\n<li>Initial Bucket Name: iobroker <\/li>\n\n\n\n<li>Kopiere den Operater API Token an einen sicheren Ort<\/li>\n\n\n\n<li>Let&#8217;s get startet!<\/li>\n<\/ul>\n\n\n\n<p>Damit ist die InfluxDB als LXC Container installiert und grunds\u00e4tzlich konfiguriert.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Migriere Influxdb V1 Bucket nach Influxdb V2<\/h2>\n\n\n\n<p>Nun m\u00f6chte ich bestehendes Bucket einer Influxdb V1.8 in die  neue Influxdb V2 migrieren.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>SSH Login auf Influxdb V1<\/li>\n\n\n\n<li>Folgender Befehl schreibt das Bucket in ein Line Protokoll File (auszuf\u00fchren als root user):<br><code>influx_inspect export -database iobroker -datadir \/mnt\/files\/influxdb\/data -waldir <code>\/mnt\/files\/<\/code>influxdb\/wal -compress -out iobroker.line.gz<\/code><\/li>\n\n\n\n<li>Das erstelle File &#8222;iobroker.line.gz&#8220; auf die Zielmaschine kopieren<br><code>scp iobroker.line.gz &lt;user>@&lt;ipadresse des LXC Containers>:<\/code><\/li>\n\n\n\n<li>Jetzt mit ssh auf der Zielmaschine einloggen<\/li>\n\n\n\n<li>das <code>iobroker.line.gz<\/code> entpacken<br><code>gzip -d iobroker.line.gz<\/code><\/li>\n\n\n\n<li>Bevor das entpackte File jetzt importiert werden kann, musste ich dieses noch manipulieren.<br><code>vi iobroker.line<\/code><br>Den gesamten Header l\u00f6schen:<br>#<code>INFLUXDB EXPORT: 2023-01-01T01:59:59+01:00 - 2262-04-12T00:47:16+01:00<br>#DDL<br>CREATE DATABASE iobroker WITH NAME autogen<br>#DML<br>#CONTEXT-DATABASE:iobroker<br>#CONTEXT-RETENTION-POLICY:autogen<br>#writing tsm data<\/code><\/li>\n\n\n\n<li>Jetzt das file iobroker.line importieren<br><code>influx write -b iobroker --org Home --token &lt;token> -f iobroker.line<\/code><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Links:<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/tteck.github.io\/Proxmox\/\" target=\"_blank\">https:\/\/tteck.github.io\/Proxmox\/<\/a><\/li>\n\n\n\n<li><a rel=\"noreferrer noopener\" href=\"https:\/\/portal.influxdata.com\/downloads\" target=\"_blank\">https:\/\/portal.influxdata.com\/downloads<\/a>\/<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Hier beschreibe ich eine M\u00f6glichkeit eine Influxdb auf Proxmox containerbasiert zu installieren. InfluxDB Configuration Damit ist die InfluxDB als LXC Container installiert und grunds\u00e4tzlich konfiguriert. Migriere Influxdb V1 Bucket nach Influxdb V2 Nun m\u00f6chte ich bestehendes Bucket einer Influxdb V1.8 in die neue Influxdb V2 migrieren. Links:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[10],"tags":[],"class_list":["post-1977","post","type-post","status-publish","format-standard","hentry","category-techdocs"],"modified_by":"ralph","_links":{"self":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/1977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1977"}],"version-history":[{"count":5,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/1977\/revisions"}],"predecessor-version":[{"id":1985,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=\/wp\/v2\/posts\/1977\/revisions\/1985"}],"wp:attachment":[{"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dev-metal.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}