Skip to content

Commit

Permalink
Deployed ac09549 to dev with MkDocs 1.5.3 and mike 1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
HHDocs committed May 7, 2024
1 parent 648c8b7 commit 510bcd6
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 8 deletions.
126 changes: 125 additions & 1 deletion dev/install-upgrade/config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,17 @@



<label class="md-nav__link md-nav__link--active" for="__toc">


<span class="md-ellipsis">
Fabric Configuration
</span>


<span class="md-nav__icon md-icon"></span>
</label>

<a href="./" class="md-nav__link md-nav__link--active">


Expand All @@ -587,6 +598,39 @@

</a>



<nav class="md-nav md-nav--secondary" aria-label="Table of contents">






<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#configure-switch-users" class="md-nav__link">
Configure switch users
</a>

</li>

<li class="md-nav__item">
<a href="#forward-switch-metrics-and-logs" class="md-nav__link">
Forward switch metrics and logs
</a>

</li>

</ul>

</nav>

</li>


Expand Down Expand Up @@ -1117,6 +1161,28 @@



<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>

<li class="md-nav__item">
<a href="#configure-switch-users" class="md-nav__link">
Configure switch users
</a>

</li>

<li class="md-nav__item">
<a href="#forward-switch-metrics-and-logs" class="md-nav__link">
Forward switch metrics and logs
</a>

</li>

</ul>

</nav>
</div>
</div>
Expand Down Expand Up @@ -1150,13 +1216,71 @@ <h1 id="fabric-configuration">Fabric Configuration</h1>
into the Fabric API</li>
</ul>
<p>For more information about how to use <code>hhfab init</code>, run <code>hhfab init --help</code>.</p>
<h2 id="configure-switch-users">Configure switch users</h2>
<p>It's currently only possible by using a config yaml file for the <code>hhfab init -c &lt;config-file.yaml&gt;</code> command. You can
specify users to be configured on the switches in the following format:</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nt">config</span><span class="p">:</span>
</span><span id="__span-0-2"><a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</span><span id="__span-0-3"><a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fabric</span><span class="p p-Indicator">:</span>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</span><span id="__span-0-5"><a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">switchUsers</span><span class="p p-Indicator">:</span>
</span><span id="__span-0-6"><a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">test</span>
</span><span id="__span-0-7"><a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">$5$oj/NxDtFw3eTyini$VHwdjWXSNYRxlFMu.1S5ZlGJbUF/CGmCAZIBroJlax4</span>
</span><span id="__span-0-8"><a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a><span class="w"> </span><span class="nt">role</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">operator</span>
</span></code></pre></div>
<p>Where <code>name</code> is the username, <code>password</code> is the password hash created with <code>openssl passwd -5</code> command, and <code>role</code> is
the role of the user, one of <code>admin</code> or <code>operator</code> (read-only access to <code>sonic-cli</code> command on the switches).</p>
<h2 id="forward-switch-metrics-and-logs">Forward switch metrics and logs</h2>
<p>There is an option to enable Grafana Alloy on all switches to forward metrics and logs to the configured targets using
Prometheus Remote-Write API and Loki API. If those APIs are available from Control Node(s), but not from the switches,
it's possible to enable HTTP Proxy on Control Node(s) that will be used by Grafana Alloy running on the switches to
access the configured targets. It could be done by passing <code>--control-proxy=true</code> to <code>hhfab init</code>.</p>
<p>Metrics includes port speeds, counters, errors, operational status, transceivers, fans, power supplies, temperature
sensors, BGP neighbors, LLDP neighbors, and more. Logs include agent logs.</p>
<p>Configuring the exporters and targets is currently only possible by using a config yaml file for the
<code>hhfab init -c &lt;config-file.yaml&gt;</code> command using the following format:</p>
<div class="language-yaml highlight"><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">config</span><span class="p">:</span>
</span><span id="__span-1-2"><a id="__codelineno-1-2" name="__codelineno-1-2" href="#__codelineno-1-2"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</span><span id="__span-1-3"><a id="__codelineno-1-3" name="__codelineno-1-3" href="#__codelineno-1-3"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">fabric</span><span class="p p-Indicator">:</span>
</span><span id="__span-1-4"><a id="__codelineno-1-4" name="__codelineno-1-4" href="#__codelineno-1-4"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">...</span>
</span><span id="__span-1-5"><a id="__codelineno-1-5" name="__codelineno-1-5" href="#__codelineno-1-5"></a><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">alloy</span><span class="p p-Indicator">:</span>
</span><span id="__span-1-6"><a id="__codelineno-1-6" name="__codelineno-1-6" href="#__codelineno-1-6"></a><span class="w"> </span><span class="nt">agentScrapeIntervalSeconds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
</span><span id="__span-1-7"><a id="__codelineno-1-7" name="__codelineno-1-7" href="#__codelineno-1-7"></a><span class="w"> </span><span class="nt">controlProxyURL</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">http://172.30.1.1:31028</span>
</span><span id="__span-1-8"><a id="__codelineno-1-8" name="__codelineno-1-8" href="#__codelineno-1-8"></a><span class="w"> </span><span class="nt">lokiTargets</span><span class="p">:</span>
</span><span id="__span-1-9"><a id="__codelineno-1-9" name="__codelineno-1-9" href="#__codelineno-1-9"></a><span class="w"> </span><span class="nt">grafana_cloud</span><span class="p">:</span><span class="w"> </span><span class="c1"># target name, multiple targets can be configured</span>
</span><span id="__span-1-10"><a id="__codelineno-1-10" name="__codelineno-1-10" href="#__codelineno-1-10"></a><span class="w"> </span><span class="nt">basicAuth</span><span class="p">:</span><span class="w"> </span><span class="c1"># optional</span>
</span><span id="__span-1-11"><a id="__codelineno-1-11" name="__codelineno-1-11" href="#__codelineno-1-11"></a><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&lt;password&gt;&quot;</span>
</span><span id="__span-1-12"><a id="__codelineno-1-12" name="__codelineno-1-12" href="#__codelineno-1-12"></a><span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&lt;username&gt;&quot;</span>
</span><span id="__span-1-13"><a id="__codelineno-1-13" name="__codelineno-1-13" href="#__codelineno-1-13"></a><span class="w"> </span><span class="nt">labels</span><span class="p">:</span><span class="w"> </span><span class="c1"># labels to be added to all logs</span>
</span><span id="__span-1-14"><a id="__codelineno-1-14" name="__codelineno-1-14" href="#__codelineno-1-14"></a><span class="w"> </span><span class="nt">env</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">env-1</span>
</span><span id="__span-1-15"><a id="__codelineno-1-15" name="__codelineno-1-15" href="#__codelineno-1-15"></a><span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://logs-prod-021.grafana.net/loki/api/v1/push</span>
</span><span id="__span-1-16"><a id="__codelineno-1-16" name="__codelineno-1-16" href="#__codelineno-1-16"></a><span class="w"> </span><span class="nt">useControlProxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># if the Loki API is not available from the switches directly, use the Control Node as a proxy</span>
</span><span id="__span-1-17"><a id="__codelineno-1-17" name="__codelineno-1-17" href="#__codelineno-1-17"></a><span class="w"> </span><span class="nt">prometheusTargets</span><span class="p">:</span>
</span><span id="__span-1-18"><a id="__codelineno-1-18" name="__codelineno-1-18" href="#__codelineno-1-18"></a><span class="w"> </span><span class="nt">grafana_cloud</span><span class="p">:</span><span class="w"> </span><span class="c1"># target name, multiple targets can be configured</span>
</span><span id="__span-1-19"><a id="__codelineno-1-19" name="__codelineno-1-19" href="#__codelineno-1-19"></a><span class="w"> </span><span class="nt">basicAuth</span><span class="p">:</span><span class="w"> </span><span class="c1"># optional</span>
</span><span id="__span-1-20"><a id="__codelineno-1-20" name="__codelineno-1-20" href="#__codelineno-1-20"></a><span class="w"> </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&lt;password&gt;&quot;</span>
</span><span id="__span-1-21"><a id="__codelineno-1-21" name="__codelineno-1-21" href="#__codelineno-1-21"></a><span class="w"> </span><span class="nt">username</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&lt;username&gt;&quot;</span>
</span><span id="__span-1-22"><a id="__codelineno-1-22" name="__codelineno-1-22" href="#__codelineno-1-22"></a><span class="w"> </span><span class="nt">labels</span><span class="p">:</span><span class="w"> </span><span class="c1"># labels to be added to all metrics</span>
</span><span id="__span-1-23"><a id="__codelineno-1-23" name="__codelineno-1-23" href="#__codelineno-1-23"></a><span class="w"> </span><span class="nt">env</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">env-1</span>
</span><span id="__span-1-24"><a id="__codelineno-1-24" name="__codelineno-1-24" href="#__codelineno-1-24"></a><span class="w"> </span><span class="nt">sendIntervalSeconds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
</span><span id="__span-1-25"><a id="__codelineno-1-25" name="__codelineno-1-25" href="#__codelineno-1-25"></a><span class="w"> </span><span class="nt">url</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">https://prometheus-prod-36-prod-us-west-0.grafana.net/api/prom/push</span>
</span><span id="__span-1-26"><a id="__codelineno-1-26" name="__codelineno-1-26" href="#__codelineno-1-26"></a><span class="w"> </span><span class="nt">useControlProxy</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span><span class="w"> </span><span class="c1"># if the Loki API is not available from the switches directly, use the Control Node as a proxy</span>
</span><span id="__span-1-27"><a id="__codelineno-1-27" name="__codelineno-1-27" href="#__codelineno-1-27"></a><span class="w"> </span><span class="nt">unixExporterCollectors</span><span class="p">:</span><span class="w"> </span><span class="c1"># list of node-exporter collectors to enable, https://grafana.com/docs/alloy/latest/reference/components/prometheus.exporter.unix/#collectors-list</span>
</span><span id="__span-1-28"><a id="__codelineno-1-28" name="__codelineno-1-28" href="#__codelineno-1-28"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">cpu</span>
</span><span id="__span-1-29"><a id="__codelineno-1-29" name="__codelineno-1-29" href="#__codelineno-1-29"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">filesystem</span>
</span><span id="__span-1-30"><a id="__codelineno-1-30" name="__codelineno-1-30" href="#__codelineno-1-30"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">loadavg</span>
</span><span id="__span-1-31"><a id="__codelineno-1-31" name="__codelineno-1-31" href="#__codelineno-1-31"></a><span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">meminfo</span>
</span><span id="__span-1-32"><a id="__codelineno-1-32" name="__codelineno-1-32" href="#__codelineno-1-32"></a><span class="w"> </span><span class="nt">unixExporterEnabled</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">true</span>
</span><span id="__span-1-33"><a id="__codelineno-1-33" name="__codelineno-1-33" href="#__codelineno-1-33"></a><span class="w"> </span><span class="nt">unixScrapeIntervalSeconds</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">120</span>
</span></code></pre></div>
<p>For additional options, see the <code>AlloyConfig</code> <a href="https://github.com/githedgehog/fabric/blob/master/api/meta/alloy.go">struct in Fabric repo</a>.</p>

<hr>
<div class="md-source-file">
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">May 6, 2024</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">May 7, 2024</span>

<br>
Created:
Expand Down
3 changes: 2 additions & 1 deletion dev/install-upgrade/overview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ <h2 id="build-control-node-configuration-and-installer">Build Control Node confi
<li><code>control-os/ignition.json</code> - ignition config for the Control Node to get OS installed</li>
<li><code>control-install.tgz</code> - installer for the Control Node, it will be uploaded to the Control Node and run there</li>
</ul>
<p>More details on configuring the Fabric are available in the <a href="../config/">Configuration</a> section.</p>
<h2 id="install-control-node">Install Control Node</h2>
<p>Control Node installation is fully air-gapped and doesn't require Internet access.</p>
<p>Download the <a href="https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_iso_image.iso">latest stable Flatcar Container Linux ISO</a> and boot into it (using IPMI attaching media, USB
Expand Down Expand Up @@ -1327,7 +1328,7 @@ <h2 id="install-control-node">Install Control Node</h2>
<small>

Last update:
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">May 6, 2024</span>
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">May 7, 2024</span>

<br>
Created:
Expand Down
2 changes: 1 addition & 1 deletion dev/search/search_index.json

Large diffs are not rendered by default.

Binary file modified dev/sitemap.xml.gz
Binary file not shown.
Loading

1 comment on commit 510bcd6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.