Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create plugin to monitor backup status / last backup of VMs via IBM Spectrum Protect (TSM, Tivoli) #512

Open
atc0005 opened this issue Nov 12, 2021 · 7 comments

Comments

@atc0005
Copy link
Owner

atc0005 commented Nov 12, 2021

In our environment, the Notes field of a Virtual Machine (VM) is used to record IBM Spectrum Protect backup metadata like this:

vm1.example.com
Client Contact: John Doe
<Last Backup (IBM Spectrum Protect)>
Last Run Time='11/09/2021 00:10:18'
Status='Successful'
Data Transmitted='104.83 GB'
Duration='03:59:36'
Type='Incremental Forever - Incremental'
Schedule='TSMVE3_EXAMPLE_BACKUP1'
Data Mover='TSMVE3_EXAMPLE_DM3'
Snapshot Type='VMware Tools'
Application Protection=' '
Transport='(nbd)'
</Last Backup>

The first two lines appear to be static, set by the sysadmin(s) who support the virtual machine while everything within this block is managed by IBM Spectrum Protect:

<Last Backup (IBM Spectrum Protect)>
Last Run Time='11/09/2021 00:10:18'
Status='Successful'
Data Transmitted='104.83 GB'
Duration='03:59:36'
Type='Incremental Forever - Incremental'
Schedule='TSMVE3_EXAMPLE_BACKUP1'
Data Mover='TSMVE3_EXAMPLE_DM3'
Snapshot Type='VMware Tools'
Application Protection=' '
Transport='(nbd)'
</Last Backup>

This plugin would be responsible for collecting VMs for evaluation much in the same way as the check_vmware_tools plugin, accepting a list of VMs to exclude, resource pools to include/exclude, etc.

This plugin would then parse the Notes field pulling out relevant backup details for evaluation (particularly the Last Run Time metadata field). Optional flags would be accepted to specify the number of days since the last successful backup (with useful defaults) to determine overall plugin state.

Parsed metadata fields (along with perhaps a raw copy of the Notes field) would be emitted via LongServiceOutput.

@atc0005
Copy link
Owner Author

atc0005 commented Nov 12, 2021

See also #506. I've reached out to one of my contacts to learn whether IBM Spectrum Protect supports saving the backup metadata in other fields (e.g., a specified Custom Attribute). If other fields are supported, this plugin should allow specifying and evaluating those also.

The first iteration of the plugin should probably focus on the Notes field exclusively until confirmation is received that other fields are also supported by IBM Spectrum Protect.

@tubby1981

This comment has been minimized.

@atc0005

This comment has been minimized.

@atc0005 atc0005 self-assigned this Jan 1, 2022
@atc0005
Copy link
Owner Author

atc0005 commented Jan 16, 2022

Note to self:

Attempt to generalize this plugin. See #506 for the work done to make it generalized to specific Custom Attributes vs explicitly intended for Commvault software. Likewise, the plugin created for this GH issue should instead focus on evaluating VMs for old/missing backups specific to the Notes field.

@atc0005
Copy link
Owner Author

atc0005 commented Jan 23, 2022

Note to self:

Attempt to generalize this plugin. See #506 for the work done to make it generalized to specific Custom Attributes vs explicitly intended for Commvault software. Likewise, the plugin created for this GH issue should instead focus on evaluating VMs for old/missing backups specific to the Notes field.

Perhaps accept a regex pattern that denotes the start of the metadata block and the end of the block, then another regex pattern for denoting metadata block entries.

Aside from the last backup date & result, perhaps expose those values (at least internally) as a map of key/value pairs with no specific meaning other than values to emit in LongServiceOutput.

@tubby1981

This comment has been minimized.

@atc0005

This comment has been minimized.

@atc0005 atc0005 added the enhancement New feature or request label Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants