Module: check_mk
Branch: master
Commit: 8113ab828ee227612718e137f2128c0e9fa3b3d9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8113ab828ee227…
Author: Sergey Kipnis <sk(a)mathias-kettner.de>
Date: Thu Mar 28 16:32:42 2019 +0100
[CMK-1791] - removing plugin player from the main thread. We do not need it any more. Stub left for the future
Change-Id: I8445eaf79c2d9fcd42d58bd9b71811541456c167
---
agents/wnx/src/engine/service_processor.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/agents/wnx/src/engine/service_processor.cpp b/agents/wnx/src/engine/service_processor.cpp
index 4b10a58..acaffba 100644
--- a/agents/wnx/src/engine/service_processor.cpp
+++ b/agents/wnx/src/engine/service_processor.cpp
@@ -229,10 +229,14 @@ int ServiceProcessor::startProviders(AnswerId Tp, std::string Ip) {
}
// Plugins Processing
- if (0 && groups::plugins.enabledInConfig()) {
+#if 0
+ // we do not use anymore separate plugin process(player)
+ // code is here as future refernce to use again separate process
+ if (groups::plugins.enabledInConfig()) {
cma::cfg::SetupPluginEnvironment();
kickPlugins(Tp, Ip);
}
+#endif
if (max_timeout_ <= 0) {
max_timeout_ = cma::cfg::kDefaultAgentMinWait;
Module: check_mk
Branch: master
Commit: da23bff22c97cf38328aba3eabcc0e2d33656d91
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=da23bff22c97cf…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Fri Mar 29 15:30:01 2019 +0100
mk_sap_hana: More generic way to find out SID and INSTANCE
Change-Id: I14652079421bf516aab2044da687f627772d967f
---
agents/plugins/mk_sap_hana | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/agents/plugins/mk_sap_hana b/agents/plugins/mk_sap_hana
index caafd7c..946f1e1 100755
--- a/agents/plugins/mk_sap_hana
+++ b/agents/plugins/mk_sap_hana
@@ -486,15 +486,15 @@ function do_query () {
# | |
# '----------------------------------------------------------------------'
-
# pgrep might not be available on older distros:
# shellcheck disable=SC2009
ps -efw | grep "[H]DB.*sapstartsrv" | while read -r line; do
- # (!<= is a look behind assertion, so we find \w{3} <- 3 alpha-numerical characters, that follow " /usr/sap/" <- note the leading space
- SID=$(echo "$line" | grep -Po '(?<= /usr/sap/)\w{3}')
-
- # same logic as above, but look for 2 \d digits
- INSTANCE=$(echo "$line" | grep -Po "(?<= /usr/sap/${SID}/HDB)\d{2}")
+ # 'sapstartsrv' may have different base paths:
+ # /hana/shared/ABC/HDB10/exe/sapstartsrv pf=/hana/shared/ABC/profile/ABC_HDB10_FOOBAR -D -u USER
+ # /usr/sap/ABC/HDB10/exe/sapstartsrv pf=/hana/shared/ABC/profile/ABC_HDB10_FOOBAR -D -u USER
+ # From these paths we extract: SID=ABC, INSTANCE=10
+ SID=$(echo "$line" | sed 's/.*\/\(.*\)\/.*\/exe\/sapstartsrv.*/\1/g')
+ INSTANCE=$(echo "$line" | sed -e 's/.*\/\(.*\)\/exe\/sapstartsrv.*/\1/g' -e 's/[^0-9]//g')
# grep only the first word = the user running the instance
INSTANCE_USER=$(echo "$line" | grep -Po "^\s*(\w+)")