Hi ELK Folks,
I have an issue with pulling the data by calling a SQL Stored Procedure. I am using logstash agent to push the data and we are trying to pull in SQL Data in the form of a Stored Procedure.
Its keep on throwing an error saying that the syntax is wrong...
I checked the documentation to find what is the correct syntax to use in the .conf file to call data from a stored procedure..
Any inputs here folks..
Hi Magnus Bäck,
We got the solution here. Instead of the statement (where we add the sql stament) we called a file with the stored proc with value 'statement_filepath" and it worked fine.
Thanks
Vikram Y
Hi Vamsidhar,
If u use the full sql statement then use this in ur logstash config file:
statement => "SELECT Distinct([StartInterv****
If u use a Stored Proc, then save a txt file with the stored proc name and use this in ur logstash config file:
statement_filepath => "C:\Users\filename.txt"
Thanks for the quick response, i tried the below method but am still getting the error, please check the config file and the text file below and let me know what i am doing wrong here.
Not sure how it worked for you guys... It seems that plugin runs the given SQL as subquery to figure out the column names for prepping the output JSON...
Even placing the SQL in the file and using statement_filepath => "c:\mysql.sql" didn't work...
I can't run logstash with SQL Stored Procedure. I put the sql statemente in a separate file but I receive the same error always
How I can disable the debug mode?. --log.level=?
I used this command line "./logstash -f importsql.conf --log.level=error" in my osx installation. But always I receive the error SQLServerException due it tries to do [Select top (1) count(*) as [Count] from (exec .......) as [T1].
Please can anyone help me?
Here a list of possible values for logging...
--log.level LEVEL
Set the log level for Logstash. Possible values are:
fatal: log very severe error messages that will usually be followed by the application aborting
error: log errors
warn: log warnings
info: log verbose info (this is the default)
debug: log debugging info (for developers)
trace: log finer-grained messages beyond debugging info
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.