pgnodemx
Capture node OS metrics via SQL queries
pgnodemx : Capture node OS metrics via SQL queries
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 6450 | pgnodemx | pgnodemx | 2.0.1 |
STAT | Apache-2.0 | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --sLd-r | No | Yes | Yes | Yes | yes | no |
| Relationships | |
|---|---|
| Need By | pg_proctab |
| See Also | system_stats pgmonitor pg_stat_ch pgsentinel pg_datasentinel pg_stat_kcache pgmeminfo pgbouncer_fdw pgpool_adm pgexporter_ext pg_statvfs |
| Siblings | pg_proctab |
Preload; Pigsty fixes unavailable cgroups.
Packages
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| el8.aarch64 | N/A | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| el9.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| el9.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| el10.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| el10.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| d12.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| d12.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| d13.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| d13.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u22.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u22.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u24.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u24.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u26.x86_64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
| u26.aarch64 | PIGSTY 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 | PGDG 2.0.1 |
Source
github.com/CrunchyData/pgnodemx
pgnodemx-2.0.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Config this extension to shared_preload_libraries:
Create this extension with:
Usage
pgnodemx: SQL functions to access node OS metrics from PostgreSQL
pgnodemx provides SQL access to OS-level metrics including cgroup statistics, /proc filesystem data, and system information. Requires pg_monitor role membership.
cgroup Functions
/proc Functions
System Information
Environment Variables
Kubernetes DownwardAPI
Configuration
| Parameter | Default | Description |
|---|---|---|
pgnodemx.cgroup_enabled |
on |
Enable cgroup functions |
pgnodemx.containerized |
off |
Force containerized cgroup paths |
pgnodemx.cgrouproot |
/sys/fs/cgroup |
cgroup mount location |
pgnodemx.kdapi_enabled |
on |
Enable Kubernetes DownwardAPI |
pgnodemx.kdapi_path |
/etc/podinfo |
DownwardAPI files location |