-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Genericsqlplugin #2785
Genericsqlplugin #2785
Conversation
fixed initialization
conversion to string of tag values tested oracle,sqlserver,mysql
conversion to string of tag values tested oracle,sqlserver,mysql
updated README input list
updated docu
Have you tried with a postgresql DB? Is this plugin that something i can try to use with Redshift? |
@lucadistefano Can you review #2286 |
added dependencies
the plugin potentially can work with all drivers that implements the database/sql api for postgres I can try in the next days, it should be sufficient set driver="pq" |
@lucadistefano I would like to test it for Redshift. Is this going to be merged with master? |
This has a lot of overlap with #2286. We need to converge on a single plugin before we can consider it for inclusion. |
yes I agree with you there is the need to converge in a single plugin.
I tried to solve all those limitations. any feedback is wellcome! |
updated readme with warn on not imported oracle libs
@danielnelson
the result is:
The merge is under discussion. |
implemented null_as_zero for all datatypes removed duplicated log for error in conversion now the field_value column can be forced to a choosen datatype
beautified log
I found a way for to use drivers with external shared lib deps without to link it in telegraf: Oracle driver with golang 1.8 plugins featureFollow the docu in https://github.com/mattn/go-oci8 for build the oci8 driver. For let i use in telegraf, do the following:
build it with
in the input plugin configuration specigy the path of the created shared lib
The steps of above can be reused in a similar way for other proprietary and non proprietary drivers |
add dbname tag better log/handle nil string
better error handling and logging added option for get measurement name from row fixed bug in int64 to str added option for ignore errors on row parsing
@danielnelson can I do something for help go further with the PR? |
@baburajvelayudhan Do you have a public fork you can share those changes? Would be happy to review or contribute to get this moving forward. Personally, I would prefer a minimally-viable solution with simple table queries for now. |
Really need this! |
@baburajvelayudhan do you mind sharing any public fork you may have for others to review and contribute? Would love to see how close we are to possibly getting this plugin in. |
@baburajvelayudhan - Did you get any further with your request!? Would like to try it out also! |
Any updates on this one? All other FRs are being closed in favor of it so would be nice to know where we stand. |
I don't work anymore with telegraf and unfortunately i am not in a position to continue work on this due to my current job committments. |
@sjwang90 Are you working on this one since you added the WIP label? Just want the situation transparent since no one is assigned right now. |
@Artanicus Nope I'm not working on it. There were previously others involved. If you're interested in taking this on please go ahead. |
Hey guys, with merging #8735 we are now having a generic SQL input plugin in master and, if everything goes well, in 1.19. Please, if you can spend some time, test the current master! If you find problems or miss some features, please create an issue or cook-up a PR. |
The plugin executes simple queries or query scripts on multiple servers.
It permits to select the tags and the fields to export, if is needed fields can be forced to a choosen datatype.
Supported drivers are go-mssqldb (sqlserver) , oci8 ora.v4 (Oracle), mysql (MySQL), pq (Postgres)
it is highly flexible and can do both type of counters gathering: horizontal and vertical .
horizontal: where each counter is on different columns of a row and the counter name is the name of the column
vertical : where each counter is on different row and the counter name is value of a specified column
Required for all PRs: