{"id":13529681,"url":"https://github.com/zensqlmonitor/influxdb-sqlserver","last_synced_at":"2026-01-14T18:41:10.192Z","repository":{"id":144201995,"uuid":"48822315","full_name":"zensqlmonitor/influxdb-sqlserver","owner":"zensqlmonitor","description":"Collect Microsoft SQL Server metrics for reporting to InfluxDB and visualize them with Grafana","archived":false,"fork":false,"pushed_at":"2023-11-06T08:29:16.000Z","size":10245,"stargazers_count":72,"open_issues_count":3,"forks_count":30,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-01T17:45:10.512Z","etag":null,"topics":["grafana","influxdb","sqlserver"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zensqlmonitor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2015-12-30T22:37:32.000Z","updated_at":"2024-05-12T05:09:36.000Z","dependencies_parsed_at":"2023-06-18T05:15:21.843Z","dependency_job_id":null,"html_url":"https://github.com/zensqlmonitor/influxdb-sqlserver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zensqlmonitor/influxdb-sqlserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zensqlmonitor%2Finfluxdb-sqlserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zensqlmonitor%2Finfluxdb-sqlserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zensqlmonitor%2Finfluxdb-sqlserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zensqlmonitor%2Finfluxdb-sqlserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zensqlmonitor","download_url":"https://codeload.github.com/zensqlmonitor/influxdb-sqlserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zensqlmonitor%2Finfluxdb-sqlserver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430880,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","influxdb","sqlserver"],"created_at":"2024-08-01T07:00:38.499Z","updated_at":"2026-01-14T18:41:10.177Z","avatar_url":"https://github.com/zensqlmonitor.png","language":"Go","funding_links":[],"categories":["Collecting data into InfluxDB"],"sub_categories":["Projects"],"readme":"[Twitter](https://twitter.com/zensqlmonitor) |\n[Email](mailto:sqlzen@hotmail.com)\n\n# influxdb-sqlserver\nCollect Microsoft SQL Server metrics, send to InfluxDB and visualize with Grafana\n\n![influxdb-grafana](https://cloud.githubusercontent.com/assets/16494280/13547132/aca6b6ca-e2c5-11e5-9f97-d6ff90918daa.png)\n\n\n## Getting Started\n\n- InfluxDB: \n\t- [Install InfluxDB](https://influxdb.com/docs/v0.9/introduction/installation.html)\n\t- [Create database SQLSERVER](https://influxdb.com/docs/v0.9/introduction/getting_started.html) \u003cbr /\u003e\n- Grafana:\n\t- [Install Grafana](http://docs.grafana.org/installation/)\n\t- Import dashboard from file provided in the [repository](https://github.com/zensqlmonitor/influxdb-sqlserver/tree/master/grafana) \u003cbr /\u003e\n- influxdb-sqlserver:\n\t- [Install GO](https://golang.org/doc/install)\n\t- [Setup you GOPATH](https://golang.org/doc/code.html#GOPATH)\n\t- Run ``` go get github.com/zensqlmonitor/influxdb-sqlserver ```\n\t- Edit the configuration to match your needs  \u003cbr /\u003e\n- SQL Server:\n\t- Create a login - with a strong password - in every SQL Server instance you want to monitor:  \u003cbr /\u003e\n\t```SQL \n\tUSE master; \n\tGO\n\tCREATE LOGIN [linuxuser] WITH PASSWORD = N'mystrongpassword';\n\tGO\n\tGRANT VIEW SERVER STATE TO [linuxuser]; \n\tGO\n\tGRANT VIEW ANY DEFINITION TO [linuxuser]; \n\tGO\n\t```\n\t\n### How to use GO code\n\n- Run in background: ``` go run influxdb-sqlserver.go \u0026 ```\n- Build in the current directory: ``` go build influxdb-sqlserver.go ```\n- Install in $GOPATH/bin: ``` go install influxdb-sqlserver.go ```\n\n### Dependencies\n\n- Go 1.5\n- Microsoft SQL server driver (https://github.com/denisenkom/go-mssqldb)\n- TOML parser (https://github.com/BurntSushi/toml)\n\n### Command-line flags\n ``` \n-config (string) = the configuration filepath in toml format (default=\"influxdb-sqlserver.conf\")\n-h = usage\n ``` \n \n## T-SQL Scripts provided\nScripts provided are lightweight and use Dynamic Management Views supplied by SQL Server\n\n- getperfcounters.sql: 1000+ metrics from sys.dm_os_performance_counters\n- getperfmetrics.sql: some special performance metrics\n- getwaitstatscat.sql: list of wait tasks categorized from sys.dm_os_wait_stats\n- getmemoryclerksplit.sql: memory breakdown from sys.dm_os_memory_clerks\n- getmemory.sql: available and used memory from sys.dm_os_sys_memory\n- getdatabasesizetrend.sql: database size trend, datafile and logfile from sys.dm_io_virtual_file_stats\n- getdatabaseio.sql: database I/O from sys.dm_io_virtual_file_stats\n- getcpu.sql: cpu usage from sys.dm_os_ring_buffers \n\n\n##### Note\n\ninfluxdb-sqlserver uses InfluxDB line protocol. If you add a sql query you have to return one column formatted with this protocol.\nFor more details, see scripts provided in the repository and the InfluxDB [documentation](https://influxdb.com/docs/v0.9/write_protocols/line.html)\n\n\n\n## License\n\nMIT-LICENSE. See LICENSE file provided in the repository for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzensqlmonitor%2Finfluxdb-sqlserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzensqlmonitor%2Finfluxdb-sqlserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzensqlmonitor%2Finfluxdb-sqlserver/lists"}