Httpsql
Http server to monitoring SQL databases
Install / Use
/learn @little-brother/HttpsqlREADME
Httpsql is a http server to provides a simple way of monitoring SQL databases via a http request by predefined queries.
How to build app
- Download and install Golang
- Download dependencies
go get -v -d ./ - Build application
go build -ldflags="-s -w"
Also you can download binary.
How to use
Before continue you must create config.json in app folder. Below is an example:
The following links will be available for this configuration:
/returns all database aliases:demoanddemo2/demoreturns all available metrics for databasedemoand their description/demo/nowreturnsmydbdate and time/demo/count?table=ordersreturns row count formydb.orders/demo/minmax?table=orders&column=pricereturns minimal and maximumpriceinmydb.orders/demo/getbyid?table=orders&id=10returns order detail with id =10/demo2/count?table=customersreturns customer count inmydb2.customers/demo2/minmax?table=...
In query #param defines a url parameter param that value will be substituted directly into the query. To avoid sql injections, all characters except a-Z0-9_.$ will be removed from value and length is limited to 64 characters. $param defines a placeholder parameter and can contains any symbols.
<br>
Request result is json or text(csv). By default data format defines by http Accept header. You can lock format by adding json or text to requested url e.g. /demo2/count?table=customers&text.
<br>
| One permanent connection is used for each database. If necessary, the connection will be restored. | |---|
Supported databases
|DBMS|Driver|Dns example| |-----|--------|----------| |MySQL|mysql|myuser@tcp(192.168.0.101)/mydb| |PosgreSQL|postgres|host=192.168.0.101 user=home password=password dbname=mydb sslmode=disable| |MSSQL|mssql|sqlserver://username:password@host/instance?param1=value¶m2=value<br>sqlserver://username:password@host:port?param1=value¶m2=value| |ADODB|adodb|Provider=Microsoft.Jet.OLEDB.4.0;Data Source=my.mdb;| |ODBC|odbc|Driver={Microsoft ODBC for Oracle};Server=ORACLE8i7;Persist Security Info=False;Trusted_Connection=Yes| |ClickHouse|clickhouse|tcp://127.0.0.1:9000?username=&debug=true| |Firebird|firebirdsql|user:password@servername/foo/bar.fdb| |SQLite3|sqlite3|D:/aaa/bbb/mydb.sqlite|
Notice: most databases require additional configuration for remote connections
You can add other drivers but some of them requires additional software.
Related Skills
oracle
339.5kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
tmux
339.5kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
prose
339.5kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Command Development
83.9kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
