How to inject variables to input plugin

according to, this answer I realized I have to compare lastest row date and last run date.

but the problem is I don't know that.

I can find last run date from my $HOME path.


there is a date. like this. --- 2020-07-02 09:00:00 blahblah

I think I have to compare this my pg latest row's date column.

how can I get this as a variable in input plugin?

use sql_last_value if you want to track last records retrieved by logstash

it’s actually $LS_HOME rather than your user’s $HOME . LS_HOME defaults to /usr/share/logstash if you’re using deb / rpm installation

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.