Giter Site home page Giter Site logo

erxtesting / influxdb-sqlserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bazauto/influxdb-sqlserver

0.0 2.0 0.0 10.02 MB

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

License: MIT License

Go 31.11% Shell 16.63% TSQL 52.26%

influxdb-sqlserver's Introduction

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

influxdb-sqlserver's People

Contributors

erxtesting avatar zensqlmonitor avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.