Skip to main content

Módulos generados por el plugin

El plugin creará un agente con el nombre que le hayamos puesto con el parámetro "--agent_name" si no se usa este parámetro se quedara con "PostgreSQL" por defecto:

image-1646739709089.png

En este agente se crearán un módulo por cada consulta personalizada especificada en pandora_postgresql.conf, con el nombre que le hayamos asignado a cada una de estas.

Por ejemplo el siguiente conf:

number_connections:SELECT count(*) FROM pg_stat_activity;:generic_data:Number of Connections or running backend
connections_waiting_in_locks:SELECT count(*) FROM pg_stat_activity WHERE wait_event = 'Lock';:generic_data:Number of connections/backends waiting on locks
connections_idle_in_transaction:SELECT count(*) FROM pg_stat_activity WHERE wait_event = 'idle in transaction';:generic_data
number_users:SELECT COUNT(usename) FROM pg_stat_activity;:generic_data
number_roles:SELECT count(*) FROM pg_roles;:generic_data
psql_version:SELECT version();:generic_data_string
num_blocks:SELECT COUNT(*) FROM pg_locks;:generic_data
psql_diskspace:SELECT ROUND(SUM(pg_database_size(oid))/1024/1024) FROM pg_database;:generic_data
number_commits:SELECT sum(xact_commit) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
number_rollbacks:SELECT sum(xact_rollback) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
tuples_returned:SELECT sum(tup_returned) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
tuples_searched:SELECT sum(tup_fetched) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname )WHERE db.datname = 'postgres';:generic_data
tuples_inserted:SELECT sum(tup_inserted) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
tuples_updated:SELECT sum(tup_updated) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
tuples_removed:SELECT sum(tup_deleted) FROM (pg_database AS db JOIN pg_stat_database sdb ON db.datname=sdb.datname) WHERE db.datname = 'postgres';:generic_data
state:SELECT state FROM pg_stat_activity WHERE datname = 'postgres';:generic_data_string

Creará los siguientes módulos:

image-1646740864822.png