-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4edb103
commit 2539c1c
Showing
5 changed files
with
774 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
CREATE FUNCTION pgexporter_used_space(text) RETURNS bigint | ||
AS '$libdir/pgexporter_ext' | ||
LANGUAGE C IMMUTABLE STRICT; | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_used_space FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_used_space TO pg_monitor; | ||
|
||
CREATE FUNCTION pgexporter_free_space(text) RETURNS bigint | ||
AS '$libdir/pgexporter_ext' | ||
LANGUAGE C IMMUTABLE STRICT; | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_free_space FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_free_space TO pg_monitor; | ||
|
||
CREATE FUNCTION pgexporter_total_space(text) RETURNS bigint | ||
AS '$libdir/pgexporter_ext' | ||
LANGUAGE C IMMUTABLE STRICT; | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_total_space FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_total_space TO pg_monitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
CREATE FUNCTION pgexporter_version() RETURNS text | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_version FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_version TO pg_monitor; | ||
|
||
CREATE FUNCTION pgexporter_os_info(OUT name text, | ||
OUT version text, | ||
OUT architecture text, | ||
OUT host_name text, | ||
OUT domain_name text, | ||
OUT process_count int, | ||
OUT uptime_seconds int | ||
) | ||
RETURNS SETOF record | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_os_info FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_os_info TO pg_monitor; | ||
|
||
CREATE FUNCTION pgexporter_cpu_info(OUT vendor text, | ||
OUT model_name text, | ||
OUT number_of_cores int, | ||
OUT clock_speed_hz int8, | ||
OUT l1dcache_size int, | ||
OUT l1icache_size int, | ||
OUT l2cache_size int, | ||
OUT l3cache_size int | ||
) | ||
RETURNS SETOF record | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_cpu_info FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_cpu_info TO pg_monitor; | ||
|
||
CREATE FUNCTION pgexporter_memory_info(OUT total_memory int8, | ||
OUT used_memory int8, | ||
OUT free_memory int8, | ||
OUT swap_total int8, | ||
OUT swap_used int8, | ||
OUT swap_free int8, | ||
OUT cache_total int8 | ||
) | ||
RETURNS SETOF record | ||
AS 'MODULE_PATHNAME' | ||
LANGUAGE C STRICT; | ||
|
||
REVOKE ALL ON FUNCTION pgexporter_memory_info FROM PUBLIC; | ||
GRANT EXECUTE ON FUNCTION pgexporter_memory_info TO pg_monitor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.