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

pg.stat_table: Zabbix trapper unsupported if table created with double quotes #48

Open
andreyhammer opened this issue Nov 23, 2018 · 2 comments

Comments

@andreyhammer
Copy link

If table created like:
CREATE TABLE "Table" ( ... );
pgsql_tbl_funcs.sh return error like:
relation public.table not found
because public.table != public.Table
I fixed this issue by addin double quotes around ${TABLENAME} in select pg_total_relation_size:
select '\"$HOST_NAME\"', 'psql.table_total_size[$DBNAME,$SCHEMANAME,$TABLENAME]', $TIMESTAMP_QUERY, (select pg_total_relation_size('${SCHEMANAME}.\"${TABLENAME}\"'))" 2>&1

please review and fix if necessary

@pengbo0328
Copy link
Contributor

Thank you for reporting this issue.

I will test the fix.

@pengbo0328
Copy link
Contributor

pengbo0328 commented Apr 26, 2019

I fixed this issue:
8c35c63

Thank you for your report.
Could you close this issue.

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