Ad Widget

Collapse

Item for SQL backup running

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RuudH
    Junior Member
    • Nov 2011
    • 11

    #1

    Item for SQL backup running

    All,

    I want to create a Zabbix items that has a value of 1 when the SQL backup is running, and a value of 0 when it's not. With that I can check how long backups are running.
    In my Window Application Log it's notice when the backup starts and stops.

    How can I create this item and fill it with the correct value based on entries in the application log ?

    Any other suggestions are welcome too ofcourse

    Thanx
  • SQLSteinar
    Junior Member
    • May 2013
    • 4

    #2
    Backup running item

    Suggestion:

    Create a job in SQL Server that runs this code every 1 minute for example:

    declare @backupsrunning int
    select @backupsrunning = count(*) from sys.sysprocesses where cmd like '%backup%'
    exec sp_user_counter1 @backupsrunning

    It will return 0 if no backups are running and 1 or more if backups (including log backups) are running

    Then create an item that monitors the perfmon counter: perf_counter["\SQLServer:User Settable(User counter 1)\Query"]

    This approach uses the user defined option for SQL Server performance monitoring wich I have blogged about here: http://sqlservice.se/sv/start/blogg/...r-own-way.aspx

    Comment

    Working...