1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

Want a command to find out all the nodes that have been failing or missing backups

Discussion in 'Scripting' started by rohitrohitgeorge, Aug 31, 2012.

  1. rohitrohitgeorge

    rohitrohitgeorge New Member

    Joined:
    Feb 15, 2012
    Messages:
    3
    Likes Received:
    0
    Want a command to find out all the nodes that have been failing or missing backups that have been failing or missing backups CONTINUOSULY for past 7 days.

    Not all nodes failed or missed. but nodees that have been CONTINUOSULY missing and failing for past 7 days.

    Thanks in Advance
    Rohit
     
  2.  
  3. Trident

    Trident Senior Member

    Joined:
    Apr 2, 2007
    Messages:
    287
    Likes Received:
    26
    Occupation:
    IT operations
    Location:
    Oslo, Norway
    Hi,

    This a sample, you can add a date statement too. Make sure your events table has data retention for 7 days.

    Code:
    select NODE_NAME,count(STATUS) from events where status<>'Completed' group by node_name having count(STATUS)>5
    
     
    Last edited: Aug 31, 2012
  4. gimlet

    gimlet New Member

    Joined:
    Apr 25, 2008
    Messages:
    154
    Likes Received:
    4
    Occupation:
    Infrastructure Monkey
    Location:
    St. Louis, Missouri
    Here's a query I use to see if any nodes have not backed up anything in the previous 24 hours:

    select nodes.node_name as "NO BACKUP" from nodes where not exists (select distinct entity from summary where (end_time
    between current_timestamp - 24 hours and current_timestamp) and (entity=nodes.node_name))
     

Share This Page