Invoke-IcingaCheckMSSQLBackupStatus shows old databases

Hello,
we had some database migrations in the last weeks and the Invoke-IcingaCheckMSSQLBackupStatus still shows the old databases as missing backups.
I’ve tried to clear the cache on the MSSQL Server, but that does not work.

Is this an icinga2 issue or does this information comes from the MSSQL server itself? Becase the dbs are not available anymore.

Thanks.

If it helps here is the current query of the check:

SELECT
                msdb.dbo.backupset.database_name,
                msdb.dbo.backupset.backup_start_date,
                msdb.dbo.backupset.backup_finish_date,
                msdb.dbo.backupset.is_damaged,
                msdb.dbo.backupset.type,
                msdb.dbo.backupset.backup_size,
                msdb.dbo.backupset.backup_set_uuid,
                msdb.dbo.backupmediafamily.physical_device_name,
                msdb.dbo.backupmediafamily.device_type,
                sys.databases.state,
                sys.databases.recovery_model,
                DATEDIFF(MI, msdb.dbo.backupset.backup_finish_date, GETDATE()) AS last_backup_minutes,
                DATEDIFF(MI, msdb.dbo.backupset.backup_start_date,  msdb.dbo.backupset.backup_finish_date) AS last_backup_duration_min
            FROM msdb.dbo.backupmediafamily
                INNER JOIN msdb.dbo.backupset ON msdb.dbo.backupmediafamily.media_set_id = msdb.dbo.backupset.media_set_id
                LEFT JOIN sys.databases ON sys.databases.name = msdb.dbo.backupset.database_name
            WHERE sys.databases.source_database_id IS NULL

Thanks. Due to the quite big history i changed the “IncludeDays” Variable of the check to my needs. That solves the issue.