vector icon indicating copy to clipboard operation
vector copied to clipboard

New sink: MySQL

Open gartemiev opened this issue 4 years ago • 16 comments

Hi, your tool vectordev is really cool, but it lacks of 1 feature which We actively use by using rsyslog, that is output to Postgres and MySQL.

It would be really great if you add such kind of sinks to vectordev.

You can have a look at rsyslog module as an example which We currently use: https://www.rsyslog.com/doc/master/configuration/modules/ompgsql.html

Thank you in advance!

gartemiev avatar Feb 25 '21 09:02 gartemiev

@binarylogic @jszwedko any chance to add this feature in the nearest time? I would extremely be grateful for it!!!

gartemiev avatar May 27 '21 13:05 gartemiev

Hi team , we use this great product, but it would be very helpful to use it in end-to-end mode, and postgres support is required for us.

savadom13 avatar May 31 '21 10:05 savadom13

Hi @gartemiev @savadom13 ! Thanks for letting us know! We don't currently have this work planned yet, but knowing that additional users want it will help us prioritize.

jszwedko avatar Jun 01 '21 18:06 jszwedko

Yes, it will be convenient to have PostgreSQL and MySQL support here.

panolex avatar Jun 02 '21 09:06 panolex

Agree. Should be very useful feature.

ilevchuk-onapp avatar Jun 02 '21 09:06 ilevchuk-onapp

I find this feature very useful. Postgres and MySQL are very popular DBs and widely used in companies of different sizes and industries. Having implemented the proposed feature will increase user-base of your product and rating of it as well.

project747 avatar Jun 02 '21 09:06 project747

It will be great to add this feature, we also interested

nstolyarenko avatar Jun 02 '21 10:06 nstolyarenko

We currently have your product operating in our dev environment - we would like to also deploy in our other environments, if postgres and mysql sinks were supported we could make that move. Thanks for great product.

jdautomate avatar Jun 02 '21 14:06 jdautomate

Yes! We need this feature as well as long as we actively use PostgreSQL for pushing our logs for analytic.

yankos avatar Jun 04 '21 13:06 yankos

We are also interested in adding this feature, especially for PostgreSQL.

vteslia avatar Jun 07 '21 08:06 vteslia

I just want to note that some DB abstraction library should probably be used. The background is to avoid having to maintain DB specific code as much as possible and support additional SQL databases in one go.

I don’t know Rust much, but those two options come up:

  • https://docs.rs/odbc/0.17.0/odbc/
  • https://github.com/tokio-rs/rdbc

The same applies to #8357. Logstash also does it like that: Jdbc input plugin

Also note the previous discussion about adding a postgres sink in #939.

PS: I am a bit overwhelmed with all the comments basically saying "I need this". That is what the GitHub reactions are for. (Just my personal opinion).

ypid-geberit avatar Aug 17 '21 12:08 ypid-geberit

After running into a pretty bad bug in influxdb, we are migrating our metrics to timescaledb. We are quite happy with our migration to vector for log collection and would love to replace telegraf with vector as well. (Telegraf currently reads from Kafka and writes to influx). The only thing stopping us is a postgres/timescaledb sink.

For us it would be fine if this sink strictly handles writing to existing tables, we would actually prefer to handle schema migrations ourselves.

karlbohlmark avatar Sep 03 '21 15:09 karlbohlmark

As there is still no SQL sink, there is a workaround with HTTP sink. Run script with http server and write logs to database from there. It might be easily done with Python and FastAPI + SQLalchemy

cuamckuu avatar Mar 04 '22 12:03 cuamckuu

Repurposing this just for a mysql sink. https://github.com/vectordotdev/vector/issues/939 is tracking a postgres sink.

jszwedko avatar Dec 28 '22 16:12 jszwedko

This would be hugely beneficial to us as well. We love vector and use it a ton. For our use case, until we get MySQL sink, we were thinking of continuing to use vector as an aggregator and use Fluentd sink and then forward things to mysql.

mehta-ankit avatar Sep 19 '23 13:09 mehta-ankit

Starrocks should be a good option to sink, it's a new sql and nonsql paradigm very similar to MySQL but using modern in-memory columnar store. The final effect is data source is a MySQL jdbc connection string

jmmc-tools avatar Jun 05 '24 06:06 jmmc-tools

I am also interested in this feature.

MrHamel avatar Nov 16 '24 08:11 MrHamel

databend source would be great

lddlww avatar Dec 18 '24 06:12 lddlww

I currently use logstash to sync logs between my PG database and OpenSearch. It would be very helpful if Vector could use databases as a data source.

uranru avatar Mar 10 '25 14:03 uranru