There is no problem with my original SQL as I use it many other places. However....
Your reply got me to thinking that maybe something about the dates is not correct.
I did a quick test with logstash to see what dates would return in a query of Oracle's builtin functions. I have noticed that everything is coming back in UTC time, but according to my query it should be in America/New_York.
SELECT current_date, current_timestamp, dbtimezone, localtimestamp, sessiontimezone, sysdate, systimestamp FROM dual;
{"sysdate":"2017-04-13T14:43:00.000Z","@timestamp":"2017-04-13T14:43:00.462Z","current_timestamp":"2017-04-13T14:43:00.427Z","@version":"1","sessiontimezone":"America/New_York","localtimestamp":"2017-04-13T14:43:00.427Z"}
However even adjusting my query for the difference (subtract another 4 hours) doesn't return anything. I even went ahead and just passed it "- 1" to subtract whole date and still doesn't work.
I figured out turning on debug in logstash I could then also turn on debug in jdbc input filter. Below is the output from the log file.
[2017-04-13T11:06:59,195][DEBUG][logstash.agent ] no configuration change for pipeline {:pipeline=>"main"}
[2017-04-13T11:07:00,359][DEBUG][logstash.inputs.jdbc ] (0.143000s) SELECT * FROM (SELECT count(*) "COUNT" FROM (SELECT
to_char(collection_system_date,'MM/DD/YY HH24:MI:SS') collection_system_date
, ne_name
, collector_name
, collector_rpu_host_name
, collection_status
FROM
collector_statuses
WHERE
ne_model like 'cyan%'
AND collection_system_date >= sysdate - 1
AND collection_system_date <= sysdate
) "T1") "T1" WHERE (ROWNUM <= 1)
[2017-04-13T11:07:00,366][DEBUG][logstash.inputs.jdbc ] Executing JDBC query {:statement=>"SELECT\nto_char(collection_system_date,'MM/DD/YY HH24:MI:SS') collection_system_date\n, ne_name\n, collector_name\n, collector_rpu_host_name\n, collection_status\nFROM\ncollector_statuses\nWHERE\nne_model like 'cyan%'\nAND collection_system_date >= sysdate - 1\nAND collection_system_date <= sysdate\n", :parameters=>{:sql_last_value=>1970-01-01 00:00:00 UTC}, :count=>0}
[2017-04-13T11:07:00,466][DEBUG][logstash.inputs.jdbc ] (0.098000s) SELECT
to_char(collection_system_date,'MM/DD/YY HH24:MI:SS') collection_system_date
, ne_name
, collector_name
, collector_rpu_host_name
, collection_status
FROM
collector_statuses
WHERE
ne_model like 'cyan%'
AND collection_system_date >= sysdate - 1
AND collection_system_date <= sysdate
[2017-04-13T11:07:02,180][DEBUG][logstash.pipeline ] Pushing flush onto pipeline