GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bazauto/influxdb-sqlserver: Collect Microsoft SQL Server metrics for reporting to InfluxDB and visualize them with Grafana

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
Godeps
Godeps
 
 
config
config
 
 
etl
etl
 
 
grafana
grafana
 
 
log
log
 
 
scripts
scripts
 
 
sqlscripts
sqlscripts
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
influxdb-sqlserver
influxdb-sqlserver
 
 
influxdb-sqlserver.conf
influxdb-sqlserver.conf
 
 
influxdb-sqlserver.go
influxdb-sqlserver.go
 
 

Repository files navigation

Twitter | Email

influxdb-sqlserver

Collect Microsoft SQL Server metrics, send to InfluxDB and visualize with Grafana

influxdb-grafana

Getting Started

  • InfluxDB:
    • Install InfluxDB
    • Create database SQLSERVER
  • Grafana:
    • Install Grafana
    • Import dashboard from file provided in the repository
  • influxdb-sqlserver:
    • Install GO
    • Setup you GOPATH
    • Run go get github.com/zensqlmonitor/influxdb-sqlserver
    • Edit the configuration to match your needs
  • SQL Server:
    • Create a login - with a strong password - in every SQL Server instance you want to monitor:
     USE master; 
     GO
     CREATE LOGIN [linuxuser] WITH PASSWORD = N'mystrongpassword';
     GO
     GRANT VIEW SERVER STATE TO [linuxuser]; 
     GO
     GRANT VIEW ANY DEFINITION TO [linuxuser]; 
     GO

How to use GO code

  • Run in background: go run influxdb-sqlserver.go &
  • Build in the current directory: go build influxdb-sqlserver.go
  • Install in $GOPATH/bin: go install influxdb-sqlserver.go

Dependencies

  • Go 1.5
  • Microsoft SQL server driver (https://github.com/denisenkom/go-mssqldb)
  • TOML parser (https://github.com/BurntSushi/toml)

Command-line flags

-config (string) = the configuration filepath in toml format (default="influxdb-sqlserver.conf")
-h = usage

T-SQL Scripts provided

Scripts provided are lightweight and use Dynamic Management Views supplied by SQL Server

  • getperfcounters.sql: 1000+ metrics from sys.dm_os_performance_counters
  • getperfmetrics.sql: some special performance metrics
  • getwaitstatscat.sql: list of wait tasks categorized from sys.dm_os_wait_stats
  • getmemoryclerksplit.sql: memory breakdown from sys.dm_os_memory_clerks
  • getmemory.sql: available and used memory from sys.dm_os_sys_memory
  • getdatabasesizetrend.sql: database size trend, datafile and logfile from sys.dm_io_virtual_file_stats
  • getdatabaseio.sql: database I/O from sys.dm_io_virtual_file_stats
  • getcpu.sql: cpu usage from sys.dm_os_ring_buffers
Note

influxdb-sqlserver uses InfluxDB line protocol. If you add a sql query you have to return one column formatted with this protocol. For more details, see scripts provided in the repository and the InfluxDB documentation

License

MIT-LICENSE. See LICENSE file provided in the repository for details

About

Collect Microsoft SQL Server metrics for reporting to InfluxDB and visualize them with Grafana

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.