/build/static/layout/Breadcrumb_cap_w.png

OVAL Scan Smart Labels

I created the following two MySQL queries to be used with OVAL scanning.  By using these I can be sure that all of my computers have OVAL scans once each month, but not more than once each month.  This solves the problem of computers that are offline when I perform the OVAL scan. 

The first query looks for all machines that have not had a successful scan in the past month, and the second query looks for all machines that have never had a successful scan.  I created a Smart Label for each query and then use both Smart Labels in my OVAL schedule.  I can then set my OVAL scan schedule to be some short period, like once every five hours, but it will only scan those computers that have not already had a successful scan in the past month.  This could be further improved by excluding any computer that cannot have an OVAL scan performed, but in our case that would not exclude too many computers so I'm not worried enough about it to try to improve it in that way.

*****First Query*****************************************************************************

SELECT DISTINCT
    MACHINE.*
FROM
    KBOT,
    KBOT_LOG,
    MACHINE
WHERE
    KBOT.ID = KBOT_LOG.KBOT_ID
        AND MACHINE.ID = KBOT_LOG.MACHINE_ID
        AND KBOT.NAME = 'OVAL Test Runner'
        AND KBOT_LOG.STATUS = '1'
GROUP BY MACHINE.ID
HAVING MAX(KBOT_LOG.START_TIME) < DATE_SUB(CURDATE(), INTERVAL 1 MONTH)

*****Second Query*****************************************************************************

SELECT
    *
FROM
    MACHINE
WHERE
    (MACHINE.ID NOT IN (SELECT
            MACHINE.ID
        FROM
            KBOT,
            KBOT_LOG,
            MACHINE
        WHERE
            KBOT.ID = KBOT_LOG.KBOT_ID
                AND MACHINE.ID = KBOT_LOG.MACHINE_ID
                AND KBOT.NAME = 'OVAL Test Runner'
                AND KBOT_LOG.STATUS = '1'))

Comments

  • Learn more information on
    <a href="http://www.wikipedia.com">wikipedia</a> - sethgodfrey 9 years ago
This post is locked
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ