From 9bd49da3b2418ad37b3df7e967f326075e3ef549 Mon Sep 17 00:00:00 2001 From: Arseniy Kuznetsov Date: Thu, 20 Oct 2022 08:55:21 +0100 Subject: [PATCH] Update README.md --- README.md | 47 ++++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f014089..1962beb 100644 --- a/README.md +++ b/README.md @@ -35,26 +35,15 @@ For effortless visualization of the RouterOS metrics exported to Prometheus, MKT - latest from source repository: `❯ pip install git+https://github.com/akpw/mktxp` -- from [Docker](https://github.com/akpw/mktxp/pkgs/container/mktxp) : `❯ docker pull ghcr.io/akpw/mktxp:latest` +- from [Docker image](https://github.com/akpw/mktxp/pkgs/container/mktxp) : `❯ docker pull ghcr.io/akpw/mktxp:latest` + +- download a full dockerized [mktxp monitoring stack](https://github.com/akpw/mktxp-stack) ## Getting started -After installing MKTXP, you need to edit its main configuration file. You can do it directly from mktxp via running: - -```bash -❯ mktxp edit -``` - -This opens the config file in your default system editor. \ -In case you prefer a different editor, just run the ```edit``` command with its optional `-ed` parameter. \ -For example, to explicitly open the MKTXP config in nano: -``` -❯ mktxp edit -ed nano - -``` - -The configuration file comes with a sample configuration, making it easy to copy / edit parameters as needed: +To get started with MKXP, you need to edit its main configuration file. This essentially involves adding your Mikrotik devices ip addresses & authentication info, optionally modifying various MKTXP settings to specific needs. +The default configuration file comes with a sample configuration, making it easy to copy / edit parameters as needed: ``` [Sample-Router] enabled = False # turns metrics collection for this RouterOS device on / off @@ -84,12 +73,36 @@ The configuration file comes with a sample configuration, making it easy to copy use_comments_over_names = False # when available, forces using comments over the interfaces names ``` +#### Local install +If you have a local MKTXP installation, you can edit this file with your default system editor directly from mktxp: +```bash +❯ mktxp edit +``` +In case you prefer a different editor, run the ```edit``` command with its optional `-ed` parameter: +``` +❯ mktxp edit -ed nano +``` +Obviously, you can do the same via just open the config file directly: +``` +❯ nano ~/mktxp/mktxp.conf -For Docker instances, just mount your mktxp config files: +``` + +#### Docker image +For Docker instances, the easiest is to use a configered mktxp.conf file from a local installation. \ +You can also create a standalone one in a dedicated folder: +``` +mkdir mktxp +cd mktxp +nano mktxp.conf # copy & edit sample entry(ies) from above +``` +Now you mount this folder and run your docker instance with: ``` ❯ docker run -v ./mktxp:/home/mktxp/mktxp/ -it --rm ghcr.io/akpw/mktxp:latest ``` +#### MKTXP stack install + ## Mikrotik Device Config For the purpose of RouterOS device monitoring, it's best to create a dedicated user with minimal required permissions. \