Forum Discussion

Kris_Wolton's avatar
12 years ago

Add Exchange, SQL and AD last backup graphs/NOC

There are several scripts that will return the last backup date/time of the database for the above apps.rnThis is a critical feature for us as our last monitor solution reported on this and we have missed a few failed backups since switching a few of our clients to LM.

  • Most people will have these on their systems, it would be great if LM would report last successful backup and generate an alert if last nights didn\'t work.

  • Example of Exchange DB last backup script:rn = :computername

    = [DateTime]::Now

    Server: +

    Current time: +

    = get-MailboxDatabase -server -status

    foreach ( in )

    (

    = .lastfullbackup

    if (!)

    (

    = n/a

    )

    else

    (

    = -

    = .TotalHours

    = (0:N0) -f

    )

    = .lastincrementalbackup

    if (!)

    (

    = n/a

    )

    else

    (

    = -

    = .TotalHours

    = (0:N0) -f

    )

    if ( -gt 24) ( = 0)

    elseif ( -lt 24) ( = 1)

    = new-object PSObject

    | add-member NoteProperty -name Database -value .Name

    | add-member NoteProperty -name Last Full Date -value

    | add-member NoteProperty -name Last Full (hrs ago) -value

    | Add-Member NoteProperty -name Last Inc (hrs ago) -value

    | Add-Member NoteProperty -name backup -value

    )