Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with grpsum and macro #58

Open
Denden54 opened this issue Nov 3, 2019 · 3 comments
Open

Issue with grpsum and macro #58

Denden54 opened this issue Nov 3, 2019 · 3 comments

Comments

@Denden54
Copy link

Denden54 commented Nov 3, 2019

I have an issue with the grpsum function for cluster monitoring.

The grpsum is based on this item :
psql.primary_server[{$PGSCRIPTDIR},{$PGSCRIPT_CONFDIR}]

But in the grpsum item, zabbix change the macros with the macros values (so zabbix is looking for the item psql.primary_server["/usr/local/bin","/usr/local/etc"], but the "real item" in the item list of zabbix is show as psql.primary_server[{$PGSCRIPTDIR},{$PGSCRIPT_CONFDIR}].

Zabbix is sending us the error : No items for key psql.primary_server["/usr/local/bin","/usr/local/etc"] in group(s) MYGROUP"

@pengbo0328
Copy link
Contributor

You need to create a "PostgreSQL Cluster" host group and add all PostgreSQL host to that group.

@Denden54
Copy link
Author

Denden54 commented Nov 15, 2019

Hello,

This is not a group issue. All my clusters hosts are in the zabbix group. The zabbix group is set in the macro as the documentation recquire.

The issue is that the grpsum command is looking for "psql.primary_server["/usr/local/bin","/usr/local/etc"]" item in hosts in the groups definied. But the item in the host item lists is "psql.primary_server[{$PGSCRIPTDIR},{$PGSCRIPT_CONFDIR}]". So for zabbix, it's not the same item.

To resolve this issue, i had to remove macro in the item and use directly the path of script and conf in the items.

@pengbo0328
Copy link
Contributor

Which template did you apply to each PostgreSQL host?
If you linked the template "Template App PostgreSQL" to each PostgreSQL host, then the macro $PGSCRIPTDIR and {$PGSCRIPT_CONFDIR} will be expanded in the host item, because the the macros are defined in the template "Template App PostgreSQL".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants