summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2020-01-26 11:26:53 +0000
committerPaul Bütow <pbuetow@mimecast.com>2020-02-07 13:31:15 +0000
commit0945da8dfefcbb723eecea0e5f4eafff63398253 (patch)
treef06dab4d2bf21d25d176b23d5baeca588d27f5d7 /doc
parent2a8e5de265a0e0a31a5834909d6879f5c9941467 (diff)
Introduce drun command, refactor code to use context package
Diffstat (limited to 'doc')
-rw-r--r--doc/examples.md4
-rw-r--r--doc/installation.md5
-rw-r--r--doc/quickstart.md23
3 files changed, 16 insertions, 16 deletions
diff --git a/doc/examples.md b/doc/examples.md
index 959105c..964660a 100644
--- a/doc/examples.md
+++ b/doc/examples.md
@@ -25,7 +25,7 @@ To run ad-hoc mapreduce aggregations on newly written log lines you also must ad
--files '/var/log/service/*.log'
```
-In order for mapreduce queries to work you have to make sure that your log format is supported by DTail. You can either use the ones which are already defined in ``mapr/logformat`` or add an extension to support a custom log format.
+In order for mapreduce queries to work you have to make sure that your log format is supported by DTail. You can either use the ones which are already defined in ``internal/mapr/logformat`` or add an extension to support a custom log format.
![dtail-map](dtail-map.gif "Tail mapreduce example")
@@ -62,6 +62,6 @@ To run a mapreduce aggregation over logs written in the past the ``dmap`` comman
--files "/var/log/service/*.log"
```
-Remember: In order for that to work you have to make sure that your log format is supported by DTail. You can either use the ones which are already defined in ``mapr/logformat`` or add an extension to support a custom log format.
+Remember: In order for that to work you have to make sure that your log format is supported by DTail. You can either use the ones which are already defined in ``internal/mapr/logformat`` or add an extension to support a custom log format.
![dmap](dmap.gif "DMap example")
diff --git a/doc/installation.md b/doc/installation.md
index 305eae5..a15beb1 100644
--- a/doc/installation.md
+++ b/doc/installation.md
@@ -3,8 +3,6 @@ DTail Installation Guide
The following installation guide has been tested successfully on CentOS 7. You may need to adjust accordingly depending on the distribution you use.
-This guide also assumes that you know how to use ``systemd`` and how to configure a service there. If you are unsure please consult the documentation of your distribution.
-
# Compile it
Please check the [Quick Starting Guide](quickstart.md) for instructions how to compile DTail. It is recommended to automate the build process via your build pipeline (e.g. produce a deployable RPM via Jenkins). You don't have to use ``go get...`` to compile and install the binaries. You can also clone the repository and use ``make`` instead.
@@ -12,6 +10,7 @@ Please check the [Quick Starting Guide](quickstart.md) for instructions how to c
# Install it
It is recommended to automate all the installation process outlined here. You could use a configuration management system such as Puppet, Chef or Ansible. However, that relies heavily on how your infrastructure is managed and is out of scope of this documentation.
+
1. The ``dserver`` binary has to be installed on all machines (server boxes) involved. A good location for the binary would be ``/usr/local/bin/dserver`` with permissions set as follows:
```console
@@ -72,7 +71,7 @@ Now you should be able to use DTail client like outlined in the [Quick Starting
# Monitor it
-To verify that DTail server is up and running and functioning as expected you should configure the Nagios check [check_dserver.sh](../samples/check_dserver.sh.sample) in your monitoring system. The check has to be executed locally on the server (e.g. via NRPE). How to configure the monitoring system in detail is out of scope of this guide, as it depends on the monitoring infrastructure used.
+To verify that DTail server is up and running and functioning as expected you should configure the Nagios check [check_dserver.sh](../samples/check_dserver.sh.sample) in your monitoring system. The check has to be executed locally on the server (e.g. via NRPE). How to configure the monitoring system in detail is out of scope of this guide.
```console
% ./check_dserver.sh
diff --git a/doc/quickstart.md b/doc/quickstart.md
index 46f7fae..7b6fbf4 100644
--- a/doc/quickstart.md
+++ b/doc/quickstart.md
@@ -3,13 +3,11 @@ Quick Starting Guide
This is the quick starting guide. For a more sustainable setup, involving how to create a background service via ``systemd``, recommendations about automation via Jenkins and/or Puppet and health monitoring via Nagios please also follow the [Installation Guide](installation.md).
-This guide assumes that you know how to generate and configure a public/private SSH key pair for secure authorization and shell access. That is out of scope of this guide. For more information please have a look at the OpenSSH documentation of your distribution.
+This guide assumes that you know how to generate and configure a public/private SSH key pair for secure authorization and shell access. For more information please have a look at the OpenSSH documentation of your distribution.
-This guide also assumes that you know how to install and use a Go compiler and GNU make.
+# Install it
-# Compile it
-
-To install all DTail binaries from github run:
+To compile and install all DTail binaries directly from GitHub run:
```console
% go get github.com/mimecast/dtail/cmd/dtail
@@ -48,7 +46,9 @@ SERVER|serv-001|INFO|Binding server|0.0.0.0:2222
Make sure that your public SSH key is listed in ``~/.ssh/authorized_keys`` on all server machines involved. The private SSH key counterpart should preferably stay on your Laptop or workstation in ``~/.ssh/id_rsa`` or ``~/.ssh/id_dsa``.
-DTail utilises the SSH Agent for SSH authentication. This is to avoid entering the passphrase of the private SSH key over and over again when a new SSH session is initiated from the DTail client to a new DTail server. For this the private SSH key has to be registered at the SSH Agent:
+DTail relies on SSH for secure authentication and communication. The clients (all client binaries such as ``dtail``, ``dgrep`` and so on...) communicate with an auth backend via the SSH auth socket. The SSH auth socket is configured via the environment variable ``SSH_AUTH_SOCK`` which usually points to ``~/.ssh/ssh_auth_socket`` or similar (depending on your configuration it may also point to other auth backends such as GPG Agent, in which case ``SSH_AUTH_SOCK`` would point to ``~/.gnupg/S.gpg-agent.ssh`` or similar).
+
+Usually you would use the SSH Auth Agent. For this the private SSH key has to be registered at the SSH Agent:
```console
% ssh-add ~/.ssh/id_rsa
@@ -56,16 +56,17 @@ Enter passphrase for ~/.ssh/id_rsa: **********
Identity added: ~/.ssh/id_rsa (~/.ssh/id_rsa)
```
-The DTail client communicates with the SSH Agent through ``~/.ssh/ssh_auth_socket`` whenever a new session to a DTail server is established.
-
To test whether SSH is setup correctly you should be able to SSH into the servers with the OpenSSH client and your private SSH key through the SSH Agent without entering the private keys passphrase. The following assumes to have an OpenSSH server running on ``serv-001.lan.example.org`` and an OpenSSH client installed on your laptop or workstation. Please notice that DTail does not require to have an OpenSSH infrastructure set up but DTail uses by default the same public/private key file paths as OpenSSH. OpenSSH can be of a great help to verify that the SSH keys are configured correctly:
```console
-% ssh serv-001.lan.example.org
-%
-% exit
+workstation01 ~ % ssh serv-001.lan.example.org
+serv-001 ~ %
+serv-001 ~ % exit
+workstation01 ~ %
```
+Please consult the OpenSSH documentation of your distribution if the test above does not work for you.
+
## Run DTail client
Now it is time to connect to the DTail servers through the DTail client: