Skip to content

Is this an error in the template or did I miss something? #157

Description

@osborm

The Discover PostgreSQL Databases discovery rule contains three item prototypes that I don't understand. They also share the same item name with some other item prototypes which is confusing me.

The following three item prototypes are defined twice in the Discover PostgreSQL Databases LLD rule:

PostgreSQL Database rows deleted/sec on {#PATH}
PostgreSQL Database rows inserted/sec on {#PATH}
PostgreSQL Database rows updated/sec on {#PATH}

The keys are different for each multiply defined item name, so we have:

PostgreSQL Database rows deleted/sec on {#PATH}
pg.db.tup_deleted[{$PG_CONN},{$PG_DB},{#DATABASE}]
pg.table.n_tup_del[{$PG_CONN},{#DATABASE}]

PostgreSQL Database rows inserted/sec on {#PATH}
pg.db.tup_inserted[{$PG_CONN},{$PG_DB},{#DATABASE}]
pg.table.n_tup_ins[{$PG_CONN},{#DATABASE}]

PostgreSQL Database rows updated/sec on {#PATH}
pg.db.tup_updated[{$PG_CONN},{$PG_DB},{#DATABASE}]
pg.table.n_tup_upd[{$PG_CONN},{#DATABASE}]

the difference seems to be whether the item pulls data from pg_stat_database or pg_stat_all_tables

From what I can figure out from looking at the source code, it doesn't make sense to use pg.table.n_tup_ins, pg.table.n_tup_del or pg.table.n_tup_upd without supplying a table name which these prototypes do not.

However I am seeing values even when a table name is not supplied.

Can anyone explain this? Or should I just remove the three item prototypes in question?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions