How to run postgres in Ruby filter?


(veer) #1

hi ,
i am trying to check jdbc connection is available or not in ruby filter it is possible or not.


(Magnus Bäck) #2

I'm sure it's possible, but why do you want to do that? What's the purpose?


(veer) #3

if database is stopped when data inserting into table then we can find database is not running
and how to run any reference example to do ?


(Magnus Bäck) #4

if database is stopped when data inserting into table then we can find database is not running

I don't understand what you mean. Please elaborate.


(veer) #5

input{
-- filebeat logfiles
}
filter{
In this filter i am calling ruby code and i want to check database is available or not,if l database not available i will stop logstash is it possible

}
output{
jdbc{

}

}
myError:
no such file to load -- dbi loading require "dbi"


(Magnus Bäck) #6

Why do you need to stop Logstash if the database is unavailable?


(veer) #7

Controlling purpose it is possible to connect DB in Ruby filter any reference


(Magnus Bäck) #8

As far as I can tell that sentence doesn't answer my question.


(system) #9

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