Closed oak-11 closed 2 years ago
Yes, you can download the binary for Windows you find in the releases.
Thanks. However I am getting this error - C:\windows-amd64>prometheus-sql 2022/05/08 22:28:17 prometheus-sql starting up... Usage of prometheus-sql: -config string Configuration file to define common data sources etc. -host string Host of the service. (default "0.0.0.0") -lax Tolerate invalid files in queryDir -port int Port of the service. (default 8080) -queries string Path to file containing queries. (default "queries.yml") -queryDir string Path to directory containing queries. -service string Query of SQL agent service. 2022/05/08 22:28:17 Error: URL to SQL Agent service required.
As the error states you cannot start prometheus-sql without any arguments. You need to specify the URL to where you run your SQL agent and then a config file.
Do have a look at the examples in this repo even if they are using docker you see that -service etc are specified.
I am using Windows and have sql server installed on it (localhost). I do not see any related examples for using -service for sql server on Windows. I tried giving driver: sqlserver and other connection details in the queries.yml file but it didn't help.
prometheus-sql does not connect to any databases itself. The service that do connect to the databases are SQL agent which prometheus-sql wants a URL to: https://github.com/chop-dbhi/sql-agent
So you need to run that too to be able to get it all working.
Thanks. But this sql-agent can be run only using docker right? I do not see any exe file for Windows. Installation note also mentions so.
True, it does not seem it got any binary for Windows and that can be due to the fact it integrate with other databases like Oracle.
Ok, thanks for your quick replies.
Can this be used directly on Windows?