mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-05-04 00:48:04 +00:00
Update README.md
This commit is contained in:
parent
ddf582dcdf
commit
48e00bf01f
@ -6,9 +6,11 @@ Supported Postgres versions: 9.1 and up.
|
|||||||
## Building and running
|
## Building and running
|
||||||
|
|
||||||
make
|
make
|
||||||
export DATA_SOURCE_NAME="login:password@(hostname:port)/dbname"
|
export DATA_SOURCE_NAME="postgres://postgres:password@localhost/?sslmode=disable"
|
||||||
./postgres_exporter <flags>
|
./postgres_exporter <flags>
|
||||||
|
|
||||||
|
See the github.com/lib/pg module for other ways to format the connection string.
|
||||||
|
|
||||||
### Flags
|
### Flags
|
||||||
|
|
||||||
Name | Description
|
Name | Description
|
||||||
@ -35,4 +37,4 @@ for l in StringIO(x):
|
|||||||
print """"{0}" : {{ prometheus.CounterValue, prometheus.NewDesc("pg_stat_database_{0}", "{2}", nil, nil) }}, """.format(column.strip(), ctype, description.strip())
|
print """"{0}" : {{ prometheus.CounterValue, prometheus.NewDesc("pg_stat_database_{0}", "{2}", nil, nil) }}, """.format(column.strip(), ctype, description.strip())
|
||||||
```
|
```
|
||||||
Adjust the value of the resultant prometheus value type appropriately. This helps build
|
Adjust the value of the resultant prometheus value type appropriately. This helps build
|
||||||
rich self-documenting metrics for the exporter.
|
rich self-documenting metrics for the exporter.
|
||||||
|
Loading…
Reference in New Issue
Block a user