start a userguide, with an entry about remote syslog
related to https://github.com/gokrazy/gokrazy/issues/51
This commit is contained in:
parent
9a6d5dfd7b
commit
a457d8e04a
@ -36,6 +36,9 @@ body {
|
|||||||
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,6 +35,9 @@ body {
|
|||||||
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,6 +35,9 @@ body {
|
|||||||
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,6 +35,9 @@ body {
|
|||||||
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,6 +35,9 @@ body {
|
|||||||
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -35,6 +35,9 @@ body {
|
|||||||
<li role="presentation" class="active"><a href="/showcase/">Showcase <span class="sr-only">(current)</span></a></li>
|
<li role="presentation" class="active"><a href="/showcase/">Showcase <span class="sr-only">(current)</span></a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -22,8 +22,16 @@
|
|||||||
<loc>https://gokrazy.org/showcase/</loc>
|
<loc>https://gokrazy.org/showcase/</loc>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://gokrazy.org/userguide/</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://gokrazy.org/modules/</loc>
|
<loc>https://gokrazy.org/modules/</loc>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<loc>https://gokrazy.org/userguide/remotesyslog/</loc>
|
||||||
|
</url>
|
||||||
|
|
||||||
</urlset>
|
</urlset>
|
70
docs/userguide/index.html
Normal file
70
docs/userguide/index.html
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html> <head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>gokrazy Userguide</title>
|
||||||
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||||
|
<link href="/jumbotron-narrow.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
font-family: "Open Sans";
|
||||||
|
}
|
||||||
|
.table-striped>tr:nth-child(odd){
|
||||||
|
background-color:red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container"><div class="header"><nav>
|
||||||
|
<ul class="nav nav-pills pull-right">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/">Home </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/platforms/">Platforms </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/quickstart/">Quickstart </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class="active"><a href="/userguide/">Userguide <span class="sr-only">(current)</span></a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<h3 class="text-muted">gokrazy</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="gokrazy-userguide">gokrazy Userguide</h1>
|
||||||
|
<p>The gokrazy Userguide walks you through various topics.</p>
|
||||||
|
<h2 id="userguide-contents">Userguide contents</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<a href="https://gokrazy.org/userguide/remotesyslog/">Using Remote Syslog to send gokrazy logs over the network</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<footer class="footer" style="text-align: center">
|
||||||
|
<p>© 2017 gokrazy authors (Michael Stapelberg and contributors)</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
81
docs/userguide/remotesyslog/index.html
Normal file
81
docs/userguide/remotesyslog/index.html
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html> <head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Using Remote Syslog to send gokrazy logs over the network</title>
|
||||||
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||||
|
<link href="/jumbotron-narrow.css" rel="stylesheet">
|
||||||
|
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400">
|
||||||
|
<style type="text/css">
|
||||||
|
body {
|
||||||
|
font-family: "Open Sans";
|
||||||
|
}
|
||||||
|
.table-striped>tr:nth-child(odd){
|
||||||
|
background-color:red;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="container"><div class="header"><nav>
|
||||||
|
<ul class="nav nav-pills pull-right">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/">Home </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/platforms/">Platforms </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/quickstart/">Quickstart </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/showcase/">Showcase </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="/userguide/">Userguide </a></li>
|
||||||
|
|
||||||
|
|
||||||
|
<li role="presentation" class=""><a href="https://github.com/gokrazy/gokrazy">Source </a></li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<h3 class="text-muted">gokrazy</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 id="using-remote-syslog-to-send-gokrazy-logs-over-the-network">Using Remote Syslog to send gokrazy logs over the network</h1>
|
||||||
|
<p>If you update your gokrazy installations daily, as we recommend you do, logs
|
||||||
|
will be cleared daily as a side effect of rebooting the device. You can use
|
||||||
|
<a href="https://en.wikipedia.org/wiki/Syslog#Network_protocol">Remote Syslog</a> to
|
||||||
|
persist logs elsewhere for later analysis.</p>
|
||||||
|
<h2 id="client-side-gokrazy">Client side (gokrazy)</h2>
|
||||||
|
<p>To enable remote syslog, you need to configure a target by creating the file
|
||||||
|
<code>remote_syslog/target</code> on the permanent data partition.</p>
|
||||||
|
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-shell" data-lang="shell"><span style="color:#75715e"># The following assumes you already created a file system</span>
|
||||||
|
<span style="color:#75715e"># on the permanent data partition. Otherwise, please use:</span>
|
||||||
|
<span style="color:#75715e"># sudo mkfs.ext4 /dev/disk/by-partuuid/2e18c40c-04</span>
|
||||||
|
|
||||||
|
sudo mount /dev/disk/by-partuuid/2e18c40c-04 /mnt
|
||||||
|
echo 10.0.0.76:514 | sudo tee /mnt/remote_syslog/target
|
||||||
|
sudo umount /mnt
|
||||||
|
</code></pre></div><p>I recommend using a (static) IP address for increased reliability, so that
|
||||||
|
remote syslog works even when DNS does not.</p>
|
||||||
|
<h2 id="server-side-syslog-ng">Server side (syslog-ng)</h2>
|
||||||
|
<p>This is how I instruct <a href="https://en.wikipedia.org/wiki/Syslog-ng">syslog-ng</a> via
|
||||||
|
its <code>/etc/syslog-ng/syslog-ng.conf</code> to write syslog messages it received from
|
||||||
|
e.g. host <code>gokrazy</code> to <code>/var/log/remote/gokrazy-log</code>:</p>
|
||||||
|
<pre><code>source net { network(ip(10.0.0.76) transport("udp")); };
|
||||||
|
destination remote { file("/var/log/remote/${FULLHOST}-log"); };
|
||||||
|
log { source(net); destination(remote); };
|
||||||
|
</code></pre>
|
||||||
|
<footer class="footer" style="text-align: center">
|
||||||
|
<p>© 2017 gokrazy authors (Michael Stapelberg and contributors)</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
13
website/content/userguide/_index.md
Normal file
13
website/content/userguide/_index.md
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
title: "gokrazy Userguide"
|
||||||
|
menu:
|
||||||
|
main:
|
||||||
|
title: "Userguide"
|
||||||
|
weight: 55
|
||||||
|
---
|
||||||
|
|
||||||
|
# gokrazy Userguide
|
||||||
|
|
||||||
|
The gokrazy Userguide walks you through various topics.
|
||||||
|
|
||||||
|
## Userguide contents
|
40
website/content/userguide/remotesyslog.md
Normal file
40
website/content/userguide/remotesyslog.md
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
title: "Using Remote Syslog to send gokrazy logs over the network"
|
||||||
|
---
|
||||||
|
|
||||||
|
# Using Remote Syslog to send gokrazy logs over the network
|
||||||
|
|
||||||
|
If you update your gokrazy installations daily, as we recommend you do, logs
|
||||||
|
will be cleared daily as a side effect of rebooting the device. You can use
|
||||||
|
[Remote Syslog](https://en.wikipedia.org/wiki/Syslog#Network_protocol) to
|
||||||
|
persist logs elsewhere for later analysis.
|
||||||
|
|
||||||
|
## Client side (gokrazy)
|
||||||
|
|
||||||
|
To enable remote syslog, you need to configure a target by creating the file
|
||||||
|
`remote_syslog/target` on the permanent data partition.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# The following assumes you already created a file system
|
||||||
|
# on the permanent data partition. Otherwise, please use:
|
||||||
|
# sudo mkfs.ext4 /dev/disk/by-partuuid/2e18c40c-04
|
||||||
|
|
||||||
|
sudo mount /dev/disk/by-partuuid/2e18c40c-04 /mnt
|
||||||
|
echo 10.0.0.76:514 | sudo tee /mnt/remote_syslog/target
|
||||||
|
sudo umount /mnt
|
||||||
|
```
|
||||||
|
|
||||||
|
I recommend using a (static) IP address for increased reliability, so that
|
||||||
|
remote syslog works even when DNS does not.
|
||||||
|
|
||||||
|
## Server side (syslog-ng)
|
||||||
|
|
||||||
|
This is how I instruct [syslog-ng](https://en.wikipedia.org/wiki/Syslog-ng) via
|
||||||
|
its `/etc/syslog-ng/syslog-ng.conf` to write syslog messages it received from
|
||||||
|
e.g. host `gokrazy` to `/var/log/remote/gokrazy-log`:
|
||||||
|
|
||||||
|
```
|
||||||
|
source net { network(ip(10.0.0.76) transport("udp")); };
|
||||||
|
destination remote { file("/var/log/remote/${FULLHOST}-log"); };
|
||||||
|
log { source(net); destination(remote); };
|
||||||
|
```
|
@ -1,10 +1,4 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-10">
|
|
||||||
|
|
||||||
{{- partial "nav.html" . -}}
|
|
||||||
|
|
||||||
<h3>list template</h3>
|
|
||||||
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
@ -16,17 +10,5 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<p class="small">
|
|
||||||
© 2017 gokrazy authors (Michael Stapelberg and contributors)
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<aside class="bd-toc">
|
|
||||||
{{ .TableOfContents }}
|
|
||||||
</aside>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user