Skip to main content

Hey I am trying to create a database connection to an MS SQL server. When I test the connection, I get the following error:Database connection unsuccessful: Failed to connect to x.x.x.x:1433 - self signed certificateI assume that means that Cribl Stream tries to make an encrypted connection to the SQL database? If so, what certificate is it using? Is there a way to force not using a cert if I wanted to test it that way? Nothing in the connection settings has a place for certificate information.

I will hold off on this for now, but if someone has more advice on what to try, reach out please. Really want to test this more to replace some DB Connect stuff


Is User ID or User Id? And Semicolon at the end?


is the SQL Server on Azure? one thing I'm seeing in <https://tediousjs.github.io/node-mssql/#tedious|the docs of the library we're using under the hood> is to try adding `;Encrypt=True`


SQL server is at our data center, my Cribl test server is in AWS. Firewalls have already had the ports opened so comms is there.


<@U01C35EMQ01&gt; i based my connection string off of this page. https://connectionstrings.com/sql-server/


User ID is what they had


so assumed it was good


also verified that my db connect connection to the same server is not using a secured connection but according to my Palo logs, the Cribl Stream box is using mssql-db-encrypted


doubt that is my issue though


great conversations here, thanks


I see both cases are used without issue on that page 🙂 so nevermind.


Probably a good idea to link to those docs from ours so that users know all the options, etc. that are supported.


You could try adding Integrated Security=false and Trusted_Connection=false (or just one of it)


Is your DBConnect on a windows box?


nope db connect is on a Linux box


ok spun up a different test Cribl Stream box on same network as mostof my SQL servers. i have a successful connection to a different SQL server so the one with the untrusted domain one must have a weird requirement on it.Anyway, for database collection, what is the proper javascript expression that contains my SQL query in it? Would be nice for the docs to have some generic examples


I can work on updating the docs with a simple example


you can just do a regular query in here! something like `SELECT * from database.table WHERE column = whatever`. you can use `${earliest}` and `${latest}` if you want to leverage the Collector's start and end times


tried a normal SQL query and it complained, i wll try again


can you provide the query?


yeah hang on


SELECT * FROM "database"."dbo"."table"Even if i remove the quotes, it tells meUnexpected identifier 'database'


did you wrap the entire thing in ` ` ?


did not know i needed that


🙂 Those quotes again!


Reply