influxdb-sqlserver

command module
v0.0.0-...-58c5833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2017 License: MIT Imports: 17 Imported by: 0

README

Twitter | Email

influxdb-sqlserver

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

influxdb-grafana

Getting Started

  • InfluxDB:
  • Grafana:
  • influxdb-sqlserver:
  • 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
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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/zensqlmonitor/go-mssqldb
Transaction Manager requests http://msdn.microsoft.com/en-us/library/dd339887.aspx
Transaction Manager requests http://msdn.microsoft.com/en-us/library/dd339887.aspx
_workspace/src/golang.org/x/crypto/md4
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
Package md4 implements the MD4 hash algorithm as defined in RFC 1320.
Package config provides the influxdb-sqlserver specific configuration options.
Package config provides the influxdb-sqlserver specific configuration options.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL