Comments (10)
I did some testing. i was wrong with "zabbix_api.py".
it is only used if you use "Monitoring type: Zabbix" in Server Setup.
with this it seems to work.
but we use "Monitoring type: ZabbixProblemBased", with this type of server setup the issue accure.
if understand the code correct this Monitoring Type did not use the definitions in zabbix_api.py. it use a own written light defintion to connect to the api.
and in this implementation i cannot find the fix for zabbix api need "username" from version 6.4 on, and not "user" parameter to logon.
in ZabbixProblemBased.py line 99 login methode is defined with
def login(self, username, password): self.logger.debug("Login in as " + username) self.zbx_auth = self.do_request('user.login', {'user': username, 'password':
password}) `
it should cover zabbix version there, i guess.
from nagstamon.
ok, more informations.
with "Monitoring type: ZabbixProblemBased" using class ZabbixLightApi that didn´t cover zabbix version >=6.4 user usernamen and not user for logon parameter. i have tested it with this code change in "ZabbixProblemBased.py" :
`
def api_version(self, **options):
# kicked out check auth to be able to check vesion before being logged in to use the correct username keyword
obj = self.do_request('apiinfo.version', options, no_auth=True)
return obj #['result']
def login(self, username, password):
self.logger.debug("Login in as " + username)
# 21.03.2024 a.reese: add to cover zabbix api version login like zabbix_api.py
# check version to use the correct keyword for username which changed since 6.4
if self.api_version() < '6.4':
self.zbx_auth = self.do_request('user.login', {'user': username, 'password': password})
else:
self.zbx_auth = self.do_request('user.login', {'username': username, 'password': password})
`
and with zabbix 6.4.12 it is working for me.
i have no zabbix lower than this, to test if it also work with the older version.
maybe someone can test and implement this change to the main and create a release with a fix.
from nagstamon.
I can support that request. I do now have the same issue with Nagstamon 3.14.0.
Side information:
Nagstmon 3.10.0 still worked very well with zabbix 6.4.2 for me for many months.
Nagstamon 3.12.0 had the same issues with this zabbix 6.4.2, so I kept using 3.10.0.
Nagstamon 3.14.0 has the same issue as 3.12.0.
With the update of zabbix to 6.4.12 Nagstamon 3.10.0 does no longer work as well.
from nagstamon.
@reesealexander thanks for your research. I applied your patch and it is available now in latest testing release. Can you please try if it works as expected?
from nagstamon.
Hi @HenriWahl,
if tried to test but the program crash after i have setup a server wit monitoring typ "zabbix server problem based".
i have checked your new code and i think you have miss the function definition for "api_version"
Sorry but github or i´m not able to give this code a god looking format in this comment window.
def api_version(self, **options): obj = self.do_request('apiinfo.version', options, no_auth=True) return obj #['result']
thx Alex
from nagstamon.
@reesealexander I added in into the latest testing release.
from nagstamon.
Hi @HenriWahl ,
sorry it is still not working. program just crash after setup a server with monitoring type "zabbix server problem based".
i have taken a look into the function "api_version()" you have implemented into the Nagstamon/Servers/ZabbixProblemBased.py
and it is a copy of the some funtions from Nagstamon/thirdparty/zabbix_api.py
during my code changes i have discovered that this is not working due to a problem with the returned object in obj, that not include an array it is juts a string. works for some kind of reason different in the ZabbixProblemBased.py than in zabbix_api.py.
that is why i have changed the funtion to just return the "obj" variable. as you see in my comments from 2 days ago.
the ['result'] part is now a comment starting with #.
;-)
from nagstamon.
Ah OK, I thought this comment was a mistake. 🤪
from nagstamon.
@reesealexander I rebuilt with your change - can you test the latest testing release? It has the same version number for the sake of faster deployment.
from nagstamon.
Hi @HenriWahl ,
now it is working like expected. but i can only test with zabbix version 6.4.12.
Maybe some other user can test with older versions of zabbix.
from nagstamon.
Related Issues (20)
- Nagstamon 3.14 - Changing network does not refresh the application HOT 1
- Nagstamon-3.14.0-win64_setup.exe and threat W64/S-e4cd4610!Eldorado HOT 5
- nagstamon v3.14.0 on Win11 23H2 - icinga KeyError host_name HOT 2
- 3.14 locks up at start HOT 4
- Updating nagstatmon from 3.10.1 to 3.14.0 breaks on Windows 2022 HOT 4
- Nagstamon 3.14.0 and Zabbix 6.2.9 - All information copy not complate HOT 2
- Regex duration issue HOT 2
- ValueError when parsing QT_VERSION_STR HOT 10
- AttributeError with Icinga DB 1.2.0 / Icinga DB Web 1.1.2 HOT 2
- Help for integration HOT 3
- [Feature][Integration] Opsgenie HOT 2
- Display own columns from check_MK view in nagstamon HOT 2
- Sorting by duration not saved when restarting nagstamon (minor cosmetic problem) HOT 2
- Nagstamon 3.15-20240506, Fedora 40, Couldn't load VAAPI library HOT 8
- MacOS 14.5 no sound
- Nagstamon not filtering DOWN hosts for DURATION HOT 1
- Can you add universal release for Linux ? HOT 1
- Problem with settings in Nagstamon 3.14 in windows HOT 2
- check-mk saml auth with entra-id as idp HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nagstamon.