From 59eda289758848db9d66cbe10ea0f154a099b600 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 30 Sep 2021 09:40:51 +0200 Subject: [PATCH 1/5] WATO: Clearer instructions for HTML log integration --- web_plugins/wato/robotmk_wato_params_discovery.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web_plugins/wato/robotmk_wato_params_discovery.py b/web_plugins/wato/robotmk_wato_params_discovery.py index fb9ac7e7..0e7bf84f 100644 --- a/web_plugins/wato/robotmk_wato_params_discovery.py +++ b/web_plugins/wato/robotmk_wato_params_discovery.py @@ -62,12 +62,12 @@ help=_("""Robotmk can display two action icons right of each discovered service which allows to open the last error log and the current log.
In order to make this work, just follow these two steps:

1. In rule Robotmk (Linux, Windows), configure Robotmk clients to Transmit HTML logs to server.
- 2. Add the following lines to $OMD_ROOT/etc/apache/conf.d/check_mk.conf (replace --SITE-- with your site name):

+ 2. Add the following lines to $OMD_ROOT/etc/apache/conf.d/check_mk.conf (replace --SITE-- with your site name) and execute omd reload apache:

Alias /--SITE--/check_mk/addons "/omd/sites/--SITE--/local/share/addons"
-
+ < Directory "/omd/sites/--SITE--/local/share/addons">
Options +Indexes
AllowOverride None
-


+ < /Directory>

3. In Global settings > Custom icons and actions, create two custom actions:
* id:robotmk_last_log, tite: "Robot Framework: last HTML log", icon: robotmk80.png, action URL: addons/robotmk/$HOSTNAME_URL_ENCODED$/$SERVICEDESC$/suite_last_log.html
* id:robotmk_last_error_log, tite: "Robot Framework: last error HTML log", icon: robotmk80_dot.png, action URL: addons/robotmk/$HOSTNAME_URL_ENCODED$/$SERVICEDESC$/suite_last_error_log.html
From 8c45b007ebc7289367f58f61444eba6f78d9bb34 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 30 Sep 2021 09:49:12 +0200 Subject: [PATCH 2/5] Improved documentation for bakery, log file permissions (closes #174) --- web_plugins/wato/robotmk_wato_params_bakery.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web_plugins/wato/robotmk_wato_params_bakery.py b/web_plugins/wato/robotmk_wato_params_bakery.py index f0922595..c5ffe3e1 100644 --- a/web_plugins/wato/robotmk_wato_params_bakery.py +++ b/web_plugins/wato/robotmk_wato_params_bakery.py @@ -203,8 +203,9 @@ def outputdir(self, val): helptext_execution_mode_agent_parallel = "This is only a placeholder for the parallel execution of RF suites. Please choose another mode." helptext_execution_mode_external = """ The Checkmk agent starts the Robotmk controller as a synchronous check plugin in the agent check interval.

- Important note for Checkmk 1.6: The rule Deploy custom files with agent (package robotmk-external) must be used to place the runner within the agent's bin directory (there is no other way in Checkmk 1 to deploy files to that folder).
- From there, you can start the runner with any external tool (e.g. systemd timer/cron/task scheduler).

+ Important note for Checkmk 1.6: The rule Deploy custom files with agent (package robotmk-external) must be used to place the runner within the agent's bin directory (there is no other way in Checkmk 1 to deploy files to that folder).

+ You can start the runner from the bin folder with any external tool (e.g. systemd timer/cron/task scheduler) and in the user context of your choice.
+ Make sure that the output/log dir (see below) can be written by the user which executes robotmk-runner.py or choose another location with the setting Change default directories below.

If no suites are specified, the runner will execute all suites listed in robotmk.yml.
If no suites are defined at all, the runner will execute all suites found in the Robot suites directory.

Use cases for this mode:
From f17fa37b891f9534bd3ae38547eac7d9885dfdb0 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 30 Sep 2021 09:56:59 +0200 Subject: [PATCH 3/5] CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ba50582..faf5817e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Changed + +* Improved the documentation for logdir permissions in external mode (#174) + ## 1.2.1.1 - 2021-09-29 ### Changed From 1eb9677cacf446273e958b40b7e4f4f78e7f01ab Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 30 Sep 2021 09:57:06 +0200 Subject: [PATCH 4/5] CHANGELOG: v1.2.1.2 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index faf5817e..76a5efc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 1.2.1.2 - 2021-09-30 ### Changed From 2851fa02b5120782a46a855fa4c7018508754578 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 30 Sep 2021 09:57:07 +0200 Subject: [PATCH 5/5] Version bump: v1.2.1.2 --- agents_plugins/robotmk.py | 2 +- bakery/v1/robotmk.py | 2 +- bakery/v2/robotmk.py | 2 +- checks/v1/robotmk | 2 +- checks/v2/robotmk.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agents_plugins/robotmk.py b/agents_plugins/robotmk.py index 9dcb501a..0c406e29 100755 --- a/agents_plugins/robotmk.py +++ b/agents_plugins/robotmk.py @@ -49,7 +49,7 @@ local_tz = datetime.utcnow().astimezone().tzinfo -ROBOTMK_VERSION = 'v1.2.1.1' +ROBOTMK_VERSION = 'v1.2.1.2' class RMKConfig(): _PRESERVED_WORDS = [ diff --git a/bakery/v1/robotmk.py b/bakery/v1/robotmk.py index 6e456c2e..ed9473c0 100644 --- a/bakery/v1/robotmk.py +++ b/bakery/v1/robotmk.py @@ -18,7 +18,7 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -ROBOTMK_VERSION = 'v1.2.1.1' +ROBOTMK_VERSION = 'v1.2.1.2' import cmk.utils.paths import os diff --git a/bakery/v2/robotmk.py b/bakery/v2/robotmk.py index eb8c8cb3..62b35e31 100644 --- a/bakery/v2/robotmk.py +++ b/bakery/v2/robotmk.py @@ -18,7 +18,7 @@ # to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, # Boston, MA 02110-1301 USA. -ROBOTMK_VERSION = 'v1.2.1.1' +ROBOTMK_VERSION = 'v1.2.1.2' from typing import Iterable, TypedDict, List from pathlib import Path diff --git a/checks/v1/robotmk b/checks/v1/robotmk index 5bffa62e..197d239b 100644 --- a/checks/v1/robotmk +++ b/checks/v1/robotmk @@ -34,7 +34,7 @@ from collections import namedtuple iam = "robotmk" # DO NOT DELETE inventory_robotmk_rules = [] -ROBOTMK_VERSION = 'v1.2.1.1' +ROBOTMK_VERSION = 'v1.2.1.2' DEFAULT_SVC_PREFIX = 'Robot Framework E2E $SUITEID$SPACE-$SPACE' HTML_LOG_DIR = "%s/%s" % (os.environ['OMD_ROOT'], 'local/share/addons/robotmk') diff --git a/checks/v2/robotmk.py b/checks/v2/robotmk.py index 7a2abbaf..17209b5e 100644 --- a/checks/v2/robotmk.py +++ b/checks/v2/robotmk.py @@ -35,7 +35,7 @@ from cmk.base.plugins.agent_based.agent_based_api.v1 import * from cmk.utils.exceptions import MKGeneralException -ROBOTMK_VERSION = 'v1.2.1.1' +ROBOTMK_VERSION = 'v1.2.1.2' DEFAULT_SVC_PREFIX = 'Robot Framework E2E $SUITEID$SPACE-$SPACE' HTML_LOG_DIR = "%s/%s" % (os.environ['OMD_ROOT'], 'local/share/addons/robotmk')