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
Flags
[...]
--test
Testing run (single pass run returning collected '/metrics' to the standard output to be revised).
To limit the test run to a certain list of metrics use the '-M' option.
-M, --metrics LIST
Limit testing run (see the '--test' option) to a list of comma (',') separated metric names.
Only the SQL queries of the selected metrics will be run (eg. '--test --metrics pg_up,pg_uptime'
will run the SQL queries of the 'pg_up' and 'pg_uptime' metrics).
[...]
I also suggest to apply --metrics LIST to --explain similarly, if possible.
The --dry-run option should not produce any output instead of eg. warnings or errors etc. In fact, it must not even try to perform the connection to the Postgres etc. Therefor it's "dry run" (!) and everybody expects that it does literally nothing, no real action (which connection certainly is).
To dump the actual configuration I suggest to provide another option, say --show-config, --dump-config or --format-config or similar and to apply --metrics LIST to it as well.
That way you could easily
see what's configured for certain metric (eg. --show-config -M pg_up);
check if there is no error or discrepancy in the configuration (eg. --dry-run);
test the metric of interest (eg. --test -M pg_up).
The exporter should return proper exit codes so that these features could be used in scripts etc.
Whether to provide also environment variables for the suggested options remains a question. I generally do not see any point in not doing so (it could be good for container users who tend to use environment variables).
I think all these things are somewhat related one to each other so I aggregated them in this single feature request, sorry for that.
The text was updated successfully, but these errors were encountered:
mjf
changed the title
Add option to test metrics and options to limit metrics used for tests, explains and configuration dumps
Add option to test selected metric(s) and also options to select metric(s) used for test, explain and configuration dump
Jun 1, 2022
mjf
changed the title
Add option to test selected metric(s) and also options to select metric(s) used for test, explain and configuration dump
Add option to test selected metric(s) and also options to select metric(s) to test, explain and configuration dump
Jun 1, 2022
Hello. I suggest to add
I also suggest to apply
--metrics LIST
to--explain
similarly, if possible.The
--dry-run
option should not produce any output instead of eg. warnings or errors etc. In fact, it must not even try to perform the connection to the Postgres etc. Therefor it's "dry run" (!) and everybody expects that it does literally nothing, no real action (which connection certainly is).To dump the actual configuration I suggest to provide another option, say
--show-config
,--dump-config
or--format-config
or similar and to apply--metrics LIST
to it as well.That way you could easily
--show-config -M pg_up
);--dry-run
);--test -M pg_up
).The exporter should return proper exit codes so that these features could be used in scripts etc.
Whether to provide also environment variables for the suggested options remains a question. I generally do not see any point in not doing so (it could be good for container users who tend to use environment variables).
I think all these things are somewhat related one to each other so I aggregated them in this single feature request, sorry for that.
The text was updated successfully, but these errors were encountered: