Axinom Mosaic Libraries
    Preparing search index...

    Function createPostgresPoolConnectivityMetric

    • Creates a Gauge metric with the name ax_postgres_<pgPoolType>_connectivity which can be added to a metric Registry. This metric will have a value of 1 if the Database can be reached via the corresponding Pool (within the given timeout), or a value of 0 otherwise.

      Parameters

      • logger: DbLogger
      • pgPool: Pool

        The Postgres Pool to use for checking the connectivity. The connectivity test will be done at the point of metric collection.

      • pgPoolType: "envOwnerPool" | "loginPool" | "dbOwnerPool"

        The Postgres Pool to check connectivity for.

      • timeoutInMilliSeconds: number = 10000

        The maximum time the connectivity check will run during metric collection. Defaults to 10000ms.

      Returns Metric<string>

      A Gauge metric with a name ax_postgres_<pgPoolType>_connectivity.