You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you see instead? Under which circumstances?
In the README:
### Adding new metrics
The exporter will attempt to dynamically export additional metrics if they are added in the
future, but they will be marked as "untyped". Additional metric maps can be easily created
from Postgres documentation by copying the tables and using the following Python snippet:
x = """tab separated raw text of a documentation table"""
for l in StringIO(x):
column, ctype, description = l.split('\t')
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
rich self-documenting metrics for the exporter.
And I cannot find any way to add this Python code. And checked the code, there is no there method to add new metric except Adding new metrics via a config file.
What did you do?
Read the README about how to add a new metric.
What did you expect to see?
Find the method about how to add a new metric.
What did you see instead? Under which circumstances?
In the README:
And I cannot find any way to add this Python code. And checked the code, there is no there method to add new metric except
Adding new metrics via a config file
.Check the commit, the document comes from the very early commit 2a08787#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R31 looks it means I need to create a new view in PostgreSQL using PL/Python, then add a new metric type in
metricMaps
and recompile postgres_exporter.I think this is a document mistake.
The text was updated successfully, but these errors were encountered: