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
* Add a build info metric
Add a standard Prometheus build info metric to make monitoring rollouts
easier.
* Update prometheus vendoring.
* Fix build error
Fix missing bool in builtinMetricMaps.
Signed-off-by: Ben Kochie <[email protected]>
(cherry picked from commit aeec47e)
// BuildDate is set during build to the ISO-8601 date and time.
45
+
varBuildDatestring
46
+
47
+
// Revision is set during build to the git commit revision.
48
+
varRevisionstring
49
+
50
+
// Version is set during build to the git describe version
51
+
// (semantic version)-(commitish) form.
52
+
varVersion="0.0.1-rev"
53
+
54
+
// VersionShort is set during build to the semantic version.
55
+
varVersionShort="0.0.1"
56
+
57
+
var (
58
+
listenAddress=kingpin.Flag("web.listen-address", "Address to listen on for web interface and telemetry.").Default(":9187").Envar("PG_EXPORTER_WEB_LISTEN_ADDRESS").String()
59
+
metricPath=kingpin.Flag("web.telemetry-path", "Path under which to expose metrics.").Default("/metrics").Envar("PG_EXPORTER_WEB_TELEMETRY_PATH").String()
60
+
disableDefaultMetrics=kingpin.Flag("disable-default-metrics", "Do not include default metrics.").Default("false").Envar("PG_EXPORTER_DISABLE_DEFAULT_METRICS").Bool()
61
+
disableSettingsMetrics=kingpin.Flag("disable-settings-metrics", "Do not include pg_settings metrics.").Default("false").Envar("PG_EXPORTER_DISABLE_SETTINGS_METRICS").Bool()
62
+
autoDiscoverDatabases=kingpin.Flag("auto-discover-databases", "Whether to discover the databases on a server dynamically.").Default("false").Envar("PG_EXPORTER_AUTO_DISCOVER_DATABASES").Bool()
63
+
queriesPath=kingpin.Flag("extend.query-path", "Path to custom queries to run.").Default("").Envar("PG_EXPORTER_EXTEND_QUERY_PATH").String()
64
+
onlyDumpMaps=kingpin.Flag("dumpmaps", "Do not run, simply dump the maps.").Bool()
65
+
constantLabelsList=kingpin.Flag("constantLabels", "A list of label=value separated by comma(,).").Default("").Envar("PG_EXPORTER_CONSTANT_LABELS").String()
66
+
excludeDatabases=kingpin.Flag("exclude-databases", "A list of databases to remove when autoDiscoverDatabases is enabled").Default("").Envar("PG_EXPORTER_EXCLUDE_DATABASES").String()
67
+
)
68
+
69
+
// Metric name parts.
70
+
const (
71
+
// Namespace for all metrics.
72
+
namespace="pg"
73
+
// Subsystems.
74
+
exporter="exporter"
75
+
// Metric label used for static string data thats handy to send to Prometheus
76
+
// e.g. version
77
+
staticLabelName="static"
78
+
// Metric label used for server identification.
79
+
serverLabelName="server"
34
80
)
35
81
36
82
// ColumnUsage should be one of several enum values which describe how a
0 commit comments