MachineDown-MG

0 Likes
over 10 years ago

I modified the out-of-the box MachineDown KS so that you can specify the name of a Management Group (MG) that you created in Control Center.  You need to run the following SQL Store Procedure against the NQCCDB. I modified the SQL Store Procedure to exclude servers in Maintenance and Pending Maintenance.


/*******



USE [NQCCDB]

GO



/****** Object:  StoredProcedure [dbo].[_MGServerList]    Script Date: 11/16/2010 18:08:54 ******/

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[_MGServerList]') AND type in (N'P', N'PC'))

DROP PROCEDURE [dbo].[_MGServerList]

GO



USE [NQCCDB]

GO



/****** Object:  StoredProcedure [dbo].[_MGServerList]    Script Date: 11/16/2010 18:08:54 ******/

SET ANSI_NULLS ON

GO



SET QUOTED_IDENTIFIER ON

GO





Create PROCEDURE [dbo].[_MGServerList]



      varchar(50)

     

--WITH ENCRYPTION



AS



BEGIN



/*

      This store procedure can be used to return the list of Window servers within a specified MG of Typedid of 2. 


       It will ignore servers in Maintenance and pending Maintenance */



Declare @ManagementGroupID uniqueidentifier



set @ManagementGroupID = (select ManagementGroupID from ManagementGroup

where ((Status & 0x08000000) = 0)

AND Name = )



select Server as [Name] from dbo.fnComputerServer(@ManagementGroupID) where typeid = 2 AND   NOT (Status & 0x4000 = 0x4000)
AND   NOT (Status & 0x00002000 = 0x00002000) and VersID is not NULL



End



GO


/*************


You will deploy the MachineDown-MG to an AppManager agent machine.  This KS will ignore machines in Maintenance Mode.


Cheers.



NetIQ does not test or validate any software, code or other materials provided in, on or through NetIQ Cool Solutions (collectively, "Materials"), so please use caution when downloading or accessing any Materials from Cool Solutions and ensure that you have reasonable and current security, spyware and anti-virus measures in place on your computer and/or network prior to downloading. Additionally, do not use any Materials downloaded from Cool Solutions in any production environment without first testing the Materials to ensure they are compatible with your version of NetIQ software or any other hardware or software present in your network or environment. Cool Solutions is not a substitute for authorized NetIQ support and should not be used as such. NETIQ COOL SOLUTIONS AND ANY MATERIALS ARE PROVIDED ON AN AS-IS, AS-AVAILABLE BASIS WITHOUT ANY WARRANTY OF ANY KIND. By downloading this file, you are agreeing to these terms of use. To report a problem please contact: coolguys-netiq@netiq.com. Your use of Cool Solutions is governed by the Cool Solutions Terms and Conditions. https://www.netiq.com/communities/coolsolutions/terms-and-conditions/

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended