Coder Social home page Coder Social logo

zabbix_mssql_template's Introduction

Zabbix template for Microsoft SQL Server monitoring via perfmon, services and ODBC.

This template monitors SQL Server databases status, jobs status, server performance.

Requirements:
  • Zabbix 2.2
  • unixODBC
  • freeTDS
Installation:
  • Before install template, create in Zabbix Value Mapping:

    Name of mapping: MS SQL Server database state

    Value Mapped to
    0 ONLINE
    1 RESTORING
    2 RECOVERING
    3 RECOVERY PENDING
    4 SUSPECT
    5 EMERGENCY
    6 OFFLINE
    7 Database Does Not Exist on Server
  • and Zabbix Regular expressions:

    Name of regexp: MSSQL Databases for discovery
    Expression: ^(master|model)$
    Expression type: Result is FALSE
    
    Name of regexp: MSSQL Jobs for discovery
    Expression: ^(test)$
    Expression type: Result is FALSE
    
  • To use ODBC, install unixODBC and freeTDS.

    Sample config ODBC:

    /etc/odbcinst.ini
    [FreeTDS]
      Description = FreeTDS Driver v0.91
      Driver = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
      Setup = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
      UsageCount = 1 
    
    /etc/odbc.ini
    [1c_base]
      Driver = FreeTDS
      ServerName = 1c_base
    
    /etc/freetds/freetds.conf
    [1c_base]
      host = 10.1.0.1
      port = 1433
      client charset = UTF-8
      tds version = 8.0
  • And configure SQL Server to access data for ODBC user [zab]:

    CREATE LOGIN [zab] WITH PASSWORD=N'****', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],     CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
    
    GRANT VIEW SERVER STATE to [zab]
    GRANT VIEW ANY DEFINITION TO [zab]
    GRANT SELECT ON sys.sysaltfiles TO [zab] 

    And create user mapping to read data from master and msdb.

zabbix_mssql_template's People

Contributors

artos220 avatar nikin2 avatar

Watchers

James Cloos avatar Dmitri Aleksandrov 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.