[ZBX-21855] Zabbix Agent2 6.0.10 - Unknown metric pgsql.custom.query Created: 2022 Nov 03 Updated: 2024 Apr 10 Resolved: 2022 Nov 17 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent2 plugin (G), Packages (C) |
Affects Version/s: | 6.0.10 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Critical |
Reporter: | f0ff | Assignee: | Zabbix Development Team |
Resolution: | Fixed | Votes: | 0 |
Labels: | agent2, plugins | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
CentOS Stream release 8 |
Issue Links: |
|
||||||||||||||||||||||||
Team: | |||||||||||||||||||||||||
Sprint: | Sprint 94 (Nov 2022) | ||||||||||||||||||||||||
Story Points: | 0.5 |
Description |
"Unknown metric pgsql.custom.query" error occurs after agent upgrade to version 6.0.10 |
Comments |
Comment by David Pech [ 2022 Nov 09 ] | ||||||
I can confirm the bug on Ubuntu 22.04. All collected metrics show error "Unknown metric pgsql.XXX". I have fixed this by downgrading to 6.0.9 - this version: | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 10 ] | ||||||
related to https://support.zabbix.com/browse/ZBX-21861 | ||||||
Comment by dimir [ 2022 Nov 10 ] | ||||||
Related or duplicate? | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 11 ] | ||||||
duplicate bc its related to the missing plugin for postgres ^^ solution for now is stick with <= 6.0.9 agent2 or maybe copy the plugin yourself into the folder from an older version havent tested this one | ||||||
Comment by Eriks Sneiders [ 2022 Nov 11 ] | ||||||
Hello to everyone! Postgresql plugin has been moved to a separate repository and now is a loadable plugin. We also have additional information on different plugin types available here and also more information on loadable plugins here. I hope this helps clear up the confusion. | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 14 ] | ||||||
As already said by Eriks, this functionality has been moved into a separate plugin. It is available as zabbix-agent2-plugin-postgresql package. Install that. | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 15 ] | ||||||
Propose adding zabbix-agent2-plugin-postgresql as a dependency of zabbix-agent2 in 6.0 only. This will restore the functionality with a simple package update, as the now separate plugin will get pulled automatically. Are you ok with that, patrik, [email protected], f0ff ? | ||||||
Comment by David Pech [ 2022 Nov 15 ] | ||||||
Ok by me. Dropping Pgsql support in some hotfix version is not definitely not a backward compatible solution, but to change a package structure - this is ok for us. | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 15 ] | ||||||
yes this would not break useability also the other modules that where dropped (if there are any)
| ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 15 ] | ||||||
That does make sense. The other module was MongoDB. Removing that one did not cause any fuss though. | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 15 ] | ||||||
no but i also am not with the customer this week its possible that next week they complain that mongodb monitoring is broken maybe someone else will hit the same thing soon 6.0.10 is only 1 week released i think just staying compatible with 6.0 over the line is the best solution so no one gets into any unforeseen issues.
i dont mind for 6.2, 6.4 or 7 if it gets removed then we know that we need to change things and go over everything | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 16 ] | ||||||
Stay put for an update with a fix within a few hours. | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 16 ] | ||||||
Released 6.0.10-(release.)2 agent2 package. # rpm -qi --requires zabbix-agent2 | grep plugin zabbix-agent2-plugin-mongodb zabbix-agent2-plugin-postgresql # apt depends zabbix-agent2 zabbix-agent2 ... Depends: zabbix-agent2-plugin-mongodb Depends: zabbix-agent2-plugin-postgresql ... Update. | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 16 ] | ||||||
Thx @jurijs for fixing this | ||||||
Comment by David Pech [ 2022 Nov 16 ] | ||||||
Maybe, I don't understand, how you release the change, but - it doesn't work (yet?). Dependencies are not available:
Reading package lists... Done Building dependency tree... Done Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:
The following packages have unmet dependencies: zabbix-agent2 : Depends: zabbix-agent2-plugin-mongodb but it is not installable Depends: zabbix-agent2-plugin-postgresql but it is not installable E: Unable to correct problems, you have held broken packages. | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 16 ] | ||||||
[email protected], Everything is available if you have zabbix-release package installed and it is up to date. What's the output of: dpkg -L zabbix-release cat /etc/apt/sources.list.d/zabbix-agent2-plugins.list ? | ||||||
Comment by David Zumbrunnen [ 2022 Nov 16 ] | ||||||
Thank you, @yurii for putting the resolution of this issue onto the "fast lane". Like @dpech said: The dependencies were added to "zabbix-agent2", but the dependency packages are still not there. They are still missing in the 6.0 and 6.2 repos: | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 16 ] | ||||||
david.zumbrunnen, This fix is for 6.0 only, since it is a LTS version. For higher version, the plugins still need to be installed manually.
The plugins reside in a separate repo, serving all versions of Zabbix. At least as of now. The repo files are shipped with zabbix-release package. If you installed Zabbix using official instructions, plugins should be available. | ||||||
Comment by Andres Tarallo [ 2022 Nov 16 ] | ||||||
Experienced BUG on Rocky 8.6, was updated to zabbx_agent2 6.0.10 release 1 on November 7th. As I found this support ticket updated to release 2. Most metrics work now. However there are metrics that show as "not supported"
| ||||||
Comment by David Pech [ 2022 Nov 16 ] | ||||||
We do have automated installation through ansible, that uses directly zabbix-agent2 package (but it downloads the dependencies automatically). We don't have "zabbix-release" package installed.
deb-src http://repo.zabbix.com/zabbix/6.0/ubuntu/ jammy main deb http://repo.zabbix.com/zabbix/6.0/ubuntu/ jammy main | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 16 ] | ||||||
Then you will have to add https://repo.zabbix.com/zabbix-agent2-plugins/1/ubuntu/pool/main/z/zabbix-agent2-plugin-postgresql/ and https://repo.zabbix.com/zabbix-agent2-plugins/1/ubuntu/pool/main/z/zabbix-agent2-plugin-mongodb/ repo to your setup. Unfortunately, there is no other way around this in your case. AFAIK ansible queries repo files installed on the system. If you'd have zabbix-release package installed, then the transition would be seamless. May we have a look at your playbook, the have a better idea? | ||||||
Comment by David Pech [ 2022 Nov 16 ] | ||||||
Guys, I apologise, but I don't think that this approach as a breaking change during a hotfix package 6.0 update, is a good one. You will definitely get more angry reactions, if sysadmins need to solve the situation manually with adding a new repo. We are using default comminuty.zabbix with role zabbix-agent https://docs.ansible.com/ansible/latest/collections/community/zabbix/index.html#description I suggest for 6.0 to revert these 2 plugins back to basic package, or to push both packages to basic zabbix repository. | ||||||
Comment by Steve DESTIVELLE [ 2022 Nov 17 ] | ||||||
Agree with David. 🙏 | ||||||
Comment by David Zumbrunnen [ 2022 Nov 17 ] | ||||||
I've now installed the additional repo, updated zabbix-agent2, including the 2 plugin packages. Values are coming in again - but not all (e.g. "pgsql.db.size" is now missing: "unknown metric"). This change - in a patch version! - is breaking a lot of stuff! I kindly ask you, to revert it. It's an LTS version. | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 17 ] | ||||||
I'm planning to add plugin packages to main 6.0 repository, to resolve the issue with LTS. (today) For 6.2, the automation scripts will have to updated on the user side. Having that said, the fact that we cannot rely on zabbix-release package for introducing new repositories is a big problem, since we may require to do that in the future for various reasons. | ||||||
Comment by patrik uytterhoeven [ 2022 Nov 17 ] | ||||||
Hi Jurijs i don't see any issue with newer versions having extra repos. When upgrading to a new version of zabbix 6.2, 6.4 .... we have to free up time and test things adapt roles etc ... most companies have internal repositories and ansible scripts to rollout update installations. its not fun if in the middle of an LTS version you see that things break and have to spend time suddenly changing things. in newer versions it shouldn't be a problem as time is being reserved to do these kind of things. Thats usually why we dont upgrade same day or week we need to test stuff and make needed changes. thx for the efforts in trying to fix this
Patrik
| ||||||
Comment by Eriks Sneiders [ 2022 Nov 17 ] | ||||||
Hi all! david.zumbrunnen and atarallo_uy, I've tried locally for my self to download Zabbix agent 2 and postgresql plugin from https://repo.zabbix.com/ I used Ubuntu 22.04 versions and the mentioned keys:
Work for me with a default postgresql docker set-up. I just wanted to mention that I could not reproduce the issue with separate key checks. Regards, Eriks | ||||||
Comment by Jurijs Klopovskis [ 2022 Nov 17 ] | ||||||
Added mongodb and postgresql plugins to main 6.0 repo. This should fix update issues with ansible. We will not revert the change, because this will cause even more disruption for users that have already upgraded successfully. Whatever bugs may occur, must be fixed within the plugin. As esneiders already said, we could not reproduce any issues with the metrics. atarallo_uy, david.zumbrunnen, please open separate issues if metric problems persist. Potentially these problems may coincide but be unrelated to the plugin separation. | ||||||
Comment by David Zumbrunnen [ 2022 Nov 17 ] | ||||||
Thank you, @yurii. Regarding the "differences before/after plugin extraction" with the metrics: I'll investigate some more and open separate issues, if needed. | ||||||
Comment by Ansgar Klein [ 2022 Nov 17 ] | ||||||
Thank you! I can confirm that installation from "single repo" is working for us (Ubuntu 22.04, RHEL 8) | ||||||
Comment by f0ff [ 2022 Nov 17 ] | ||||||
@Jurijs, thank you for your prompt response and participation in solving the problem. |