tuniak
(tuniak)
November 14, 2022, 5:28pm
1
Dear community,
I would like to go back to this closed topic:
Hallo @all,
Das Plugin " “mk_sap” funktioniert nur sauber mit Python2
Es kann nicht mit Python3 gestartet werden. Auch das kompilieren der NWRFC Librarys mit Python3 (hier bei mir mit 3.6 getestet) schlägt fehl.
Schon jemand mit Python3 zum laufen gebracht?
Danke
as you may know, sles15 SP4 is delivered without python2 version, therefore this plugin is not working anymore
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
__version__ = "2.3.0b1"
# This agent plugin has been built to collect information from SAP R/3 systems
# using RFC calls. It needs the python module pyrfc.
# pyrfc requires following libs (installable via pip3: Sphinx Cython setuptools-git
# via apt or yum/dnf: gcc gcc-c++ python3-devel) (and the nwrfcsdk (can be downloaded from SAP
# download portal) installed to be working. To install pyrfc export the SAPNWRFC_HOME:
# "export SAPNWRFC_HOME=/usr/sap/nwrfcsdk". You can configure the agent plugin
# using the configuration file /etc/check_mk/sap.cfg (a sample file can be
# found in Checkmk git at agents/sap/sap.cfg) to tell it how to connect to
# your SAP instance and which values you want to fetch from your system to be
# forwarded to and checked by Checkmk.
#
# Tested Versions:
This file has been truncated. show original
“This plugin will only work with python2 as sapnwrfc is not available for python 3.”
I’ve found some forked version with pyrfc intead of sapnwrfc
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (C) 2019 tribe29 GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
__version__ = "2.1.0i1"
# This agent plugin has been built to collect information from SAP R/3 systems
# using RFC calls. It needs the python module pyrfc.
# pyrfc requires following libs (installable via pip3: Sphinx Cython setuptools-git
# via apt or yum/dnf: gcc gcc-c++ python3-devel) (and the nwrfcsdk (can be downloaded from SAP
# download portal) installed to be working. To install pyrfc export the SAPNWRFC_HOME:
# "export SAPNWRFC_HOME=/usr/sap/nwrfcsdk". You can configure the agent plugin
# using the configuration file /etc/check_mk/sap.cfg (a sample file can be
# found in Checkmk git at agents/sap/sap.cfg) to tell it how to connect to
# your SAP instance and which values you want to fetch from your system to be
# forwarded to and checked by Checkmk.
#
# Tested Versions:
This file has been truncated. show original
any chance to make this “official” check_mk plugin?
thank you
1 Like
CoLa
(F. L.)
November 17, 2022, 1:32pm
2
until now, you have to use https://github.com/stefan7018/checkmk/blob/master/agents/plugins/mk_sap.py with pyrfc.
Unfortunately, @Checkmk_tribe has not commented more on this topic.
Hi there,
we have a major problem currently: We cannot find a valid number of users to test the change. But as we have to support the change on GitHub later on, we want to assure, that the plugin is working with all the possible setups.
If someone can help in this case, please contact me directly.
fmacq
(François)
January 13, 2023, 6:55am
4
Dear Marcel
I can work on this topic.
We have R/3 SAP and I’m trying to monitor things directly.
I was able to integrate the python3 fork but not all the lines exported are uploaded to checkmk.
Thanks for your help on how I can help
Best Regards
François
Approyocto
(Sean Gilmour)
January 13, 2023, 8:11pm
5
We heavily utilize the pyrfc edition of the plug, and have helped ( I think ) a few others do the same, so hit me up if you need help, or testing.
TLI
(Thomas Lippert)
January 15, 2023, 5:43pm
6
Please contact either Marcel or myself directly, and we will share an MKP with the reworked plugin for testing. We have done the work, but without proper test coverage we cannot add it to the product
creator22
(Creator22)
April 12, 2023, 10:25am
7
dear community, any update on this topic? we are facing same issue with latest SP on sles15 (there is no python2 available)
Hi - I updated the pull request on Github some days ago: We’re currently working on the merge. After that, I have a list of improvements, and we will decide, which of them are quick wins and which do need some more work.
So the PR should be merged any time soon. Depending on the developer, who currently takes care, that the tests are not failing anymore and our code requirements are met.
3 Likes
system
(system)
Closed
April 24, 2024, 12:17pm
9
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.