Skip to content

Commit

Permalink
commit 6111862
Browse files Browse the repository at this point in the history
Merge: 7dd4522 a298ec2
Author: Thomas Boerger <[email protected]>
Date:   Tue Apr 21 00:38:11 2020 +0200

    Merge pull request #13 from promhippie/refactoring

    Code and project restructuring
  • Loading branch information
tboerger committed Apr 20, 2020
1 parent f908985 commit fa472f6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 35 deletions.
48 changes: 20 additions & 28 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<html id="html" lang="en-us">
<head>
<meta name="generator" content="Hugo 0.54.0" />
<meta name="generator" content="Hugo 0.55.5" />
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width"/>

Expand Down Expand Up @@ -440,7 +440,7 @@ <h3 id="envrionment-variables">Envrionment variables</h3>

<dl>
<dt>PROMETHEUS_HCLOUD_CONFIG<br /></dt>
<dd>Path to HetznerCloud configuration file, optionally, required for muli credentials<br />
<dd>Path to HetznerCloud configuration file, optionally, required for multi credentials<br />
<br /></dd>
<dt>PROMETHEUS_HCLOUD_TOKEN<br /></dt>
<dd>Access token for the HetznerCloud API, required for authentication<br />
Expand Down Expand Up @@ -472,25 +472,27 @@ <h3 id="configuration-file">Configuration file</h3>
<h2 id="labels">Labels</h2>

<ul>
<li><code>__meta_hcloud_name</code><br /></li>
<li><code>__meta_hcloud_status</code><br /></li>
<li><code>__meta_hcloud_public_ipv4</code><br /></li>
<li><code>__meta_hcloud_public_ipv6</code><br /></li>
<li><code>__meta_hcloud_type</code><br /></li>
<li><code>__address__</code><br /></li>
<li><code>__meta_hcloud_city</code><br /></li>
<li><code>__meta_hcloud_cores</code><br /></li>
<li><code>__meta_hcloud_memory</code><br /></li>
<li><code>__meta_hcloud_disk</code><br /></li>
<li><code>__meta_hcloud_storage</code><br /></li>
<li><code>__meta_hcloud_country</code><br /></li>
<li><code>__meta_hcloud_cpu</code><br /></li>
<li><code>__meta_hcloud_datacenter</code><br /></li>
<li><code>__meta_hcloud_location</code><br /></li>
<li><code>__meta_hcloud_city</code><br /></li>
<li><code>__meta_hcloud_country</code><br /></li>
<li><code>__meta_hcloud_disk</code><br /></li>
<li><code>__meta_hcloud_image_name</code><br /></li>
<li><code>__meta_hcloud_image_type</code><br /></li>
<li><code>__meta_hcloud_label_&lt;label&gt;</code><br /></li>
<li><code>__meta_hcloud_location</code><br /></li>
<li><code>__meta_hcloud_memory</code><br /></li>
<li><code>__meta_hcloud_name</code><br /></li>
<li><code>__meta_hcloud_os_flavor</code><br /></li>
<li><code>__meta_hcloud_os_version</code><br /></li>
<li><code>__meta_hcloud_label_&lt;label&gt;</code><br />
<li><code>__meta_hcloud_project</code><br /></li>
<li><code>__meta_hcloud_public_ipv4</code><br /></li>
<li><code>__meta_hcloud_public_ipv6</code><br /></li>
<li><code>__meta_hcloud_status</code><br /></li>
<li><code>__meta_hcloud_storage</code><br /></li>
<li><code>__meta_hcloud_type</code><br />
<br /></li>
</ul>

Expand Down Expand Up @@ -521,22 +523,12 @@ <h1>

<p>As this project is built with Go you need to install Go first. The installation of Go is out of the scope of this document, please follow the <a href="https://golang.org/doc/install">official documentation</a>. After the installation of Go you need to get the sources:</p>

<div class="highlight"><pre class="chroma"><code class="language-txt" data-lang="txt">go get -d github.com/promhippie/prometheus-hcloud-sd
cd $GOPATH/src/github.com/promhippie/prometheus-hcloud-sd</code></pre></div>

<p>All required tool besides Go itself are bundled or getting automatically installed within the <code>GOPATH</code>. We are using <a href="https://github.com/twitchtv/retool">retool</a> to keep the used tools consistent and <a href="https://github.com/golang/dep">dep</a> to manage the dependencies. All commands to build this project are part of our <code>Makefile</code>.</p>

<div class="highlight"><pre class="chroma"><code class="language-txt" data-lang="txt"># install retool
make retool

# sync dependencies
make sync
<div class="highlight"><pre class="chroma"><code class="language-txt" data-lang="txt">git clone https://github.com/promhippie/prometheus-hcloud-sd.git
cd prometheus-hcloud-sd/</code></pre></div>

# generate code
make generate
<p>All required tool besides Go itself are bundled by Go modules, all you need is part of the <code>Makfile</code>:</p>

# build binary
make build</code></pre></div>
<div class="highlight"><pre class="chroma"><code class="language-txt" data-lang="txt">make generate build</code></pre></div>

<p>Finally you should have the binary within the <code>bin/</code> folder now, give it a try with <code>./bin/prometheus-hcloud-sd -h</code> to see all available options.</p>

Expand Down
7 changes: 4 additions & 3 deletions index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<description>Recent content on Prometheus HetznerCloud SD</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 02 May 2018 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Wed, 01 Apr 2020 00:00:00 +0000</lastBuildDate>

<atom:link href="https://promhippie.github.io/prometheus-hcloud-sd/index.xml" rel="self" type="application/rss+xml" />

Expand All @@ -25,11 +25,12 @@ First of all we need to prepare a configuration for Prometheus that includes the
<item>
<title>Building</title>
<link>https://promhippie.github.io/prometheus-hcloud-sd/building/</link>
<pubDate>Wed, 02 May 2018 00:00:00 +0000</pubDate>
<pubDate>Wed, 01 Apr 2020 00:00:00 +0000</pubDate>

<guid>https://promhippie.github.io/prometheus-hcloud-sd/building/</guid>
<description>As this project is built with Go you need to install Go first. The installation of Go is out of the scope of this document, please follow the official documentation. After the installation of Go you need to get the sources:
go get -d github.com/promhippie/prometheus-hcloud-sd cd $GOPATH/src/github.com/promhippie/prometheus-hcloud-sd All required tool besides Go itself are bundled or getting automatically installed within the GOPATH. We are using retool to keep the used tools consistent and dep to manage the dependencies.</description>
git clone https://github.com/promhippie/prometheus-hcloud-sd.git cd prometheus-hcloud-sd/ All required tool besides Go itself are bundled by Go modules, all you need is part of the Makfile:
make generate build Finally you should have the binary within the bin/ folder now, give it a try with .</description>
</item>

<item>
Expand Down
8 changes: 4 additions & 4 deletions sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<url>
<loc>https://promhippie.github.io/prometheus-hcloud-sd/building/</loc>
<lastmod>2018-05-02T00:00:00+00:00</lastmod>
<lastmod>2020-04-01T00:00:00+00:00</lastmod>
</url>

<url>
Expand All @@ -18,13 +18,13 @@
</url>

<url>
<loc>https://promhippie.github.io/prometheus-hcloud-sd/categories/</loc>
<loc>https://promhippie.github.io/prometheus-hcloud-sd/</loc>
<lastmod>2020-04-01T00:00:00+00:00</lastmod>
<priority>0</priority>
</url>

<url>
<loc>https://promhippie.github.io/prometheus-hcloud-sd/</loc>
<lastmod>2018-05-02T00:00:00+00:00</lastmod>
<loc>https://promhippie.github.io/prometheus-hcloud-sd/categories/</loc>
<priority>0</priority>
</url>

Expand Down

0 comments on commit fa472f6

Please sign in to comment.