New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgresql: Enable to treat meta data at writer #3227
base: main
Are you sure you want to change the base?
Conversation
Other plugins already use |
Thanks for your comment! |
Hmm, libjansson is optional and only dpdk_telemetry plugin uses it. |
In addition, I'll update the document & sample schema to clarify that |
6731334
to
74ab8ee
Compare
I added a new function |
74ab8ee
to
6bcf750
Compare
TODO list:
|
841e7c8
to
d76b2cb
Compare
@collectd/trusted-contributors @dago or someone. |
d76b2cb
to
17b2afd
Compare
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
You need to add the following config into you Writer section to enable this feature: MetaData true This option will store all meta data in a metric. Or you can specify each meta data like the following setting: MetaData "network:username" "network:ip_address" ... Signed-off-by: Takuro Ashie <ashie@clear-code.com> postgresql: Use format_json_meta_data() to format meta data Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Add description about "MetaData" of "Writer". Signed-off-by: Takuro Ashie <ashie@clear-code.com>
It requires PostgreSQL 9.4 or later since it uses JSONB data type. Signed-off-by: Takuro Ashie <ashie@clear-code.com>
17b2afd
to
5e95fba
Compare
NOTE: CI build/experimental fails because of the following issue, it has nothing to do with this PR change. fix(epics): Fix include path -- at least on Debian unstable. |
ChangeLog: postgresql: Enable to handle meta data at writer
Although users may want to handle some meta data at SQL world but postgresql plugin doesn't provide a way to do it. For example a user may want to write
network:username
ornetwork:ip_address
to DB.This patch add a new optional argument
$10
on executing a SQL command to pass a JSON string which stores meta data.$10
is added only whenMetaData
option is added to<Writer>
so that users of old versions can safely upgrade to this version.