Skip to content

Instantly share code, notes, and snippets.

@DennisAnaniev
Last active November 23, 2021 15:40
Show Gist options
  • Save DennisAnaniev/74d5b603a60ac36a733ca6a024ad8a7f to your computer and use it in GitHub Desktop.
Save DennisAnaniev/74d5b603a60ac36a733ca6a024ad8a7f to your computer and use it in GitHub Desktop.
https://www.zabbix.com/documentation/current/ru/manual/config/items/itemtypes/odbc_checks
yum search postgre | grep odbc
yum install postgresql-odbc.x86_64 unixODBC-devel -y
odbcinst -j
vim /etc/odbc.ini
[zabbix]
Description = PostgreSQL connection to ZabbixDB
Driver = PostgreSQL
Database = zabbix
Servername = localhost
UserName = zabbix
Password = Z@bbix123
Port = 5432
isql -v zabbix
select pg_database_size('zabbix');
Discovery rule
select table_name from information_schema.tables where table_schema='public' ;
item_prototype
SELECT pg_total_relation_size('{#TABLE_NAME}');
SELECT pg_total_relation_size('history');
@DennisAnaniev
Copy link
Author

DennisAnaniev commented Nov 23, 2021

image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment