NCM Failed backups


I need a report on failed NCM backs of all NCM devices. Please help me with a query (SQL or SWQL)

Also, I have a requirement on custom alert where if NCM backup is failing then it should send an email notification.

Can anyone please suggest?

Thanks in Advance.