20111110 setting a blackout in grid control - plembo/onemoretech GitHub Wiki

title: Setting a blackout in GRID Control link: https://onemoretech.wordpress.com/2011/11/10/setting-a-blackout-in-grid-control/ author: lembobro description: post_id: 1500 created: 2011/11/10 12:48:15 created_gmt: 2011/11/10 16:48:15 comment_status: closed post_name: setting-a-blackout-in-grid-control status: publish post_type: post

Setting a blackout in GRID Control

Oracle's GRID Control (a/k/a "Oracle Enterprise Manager") is used by some enterprises for monitoring and control of systems. The following are some notes on setting blackouts using the command line. To do any of this you need to log in on the affected host as the system user that runs the GRID Agent. See Documentation for details. Check for existing blackouts:

emctl status blackout

To black out the entire host for an hour:

emctl start blackout [Label] -nodeLevel -d 1:00

(sans the brackets) The "Label" here can be anything descriptive, like "Portal1". If you leave out the "-nodeLevel" switch only the host will be blacked out, any other targets will continue to be monitored. To stop the blackout:

emctl stop blackout [Label]

To set a blackout for a specific target on the host you need to first know what targets are being monitored. Check for them using this command:

emctl config agent listtargets

You should get something back like:

[[email protected] ~]$ emctl config agent listtargets
Oracle Enterprise Manager 10g Release 5 Grid Control 10.2.0.5.0.  

Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. [portal.host1.example.com:3872, oracle_emd] [portal.host1.example.com_Discoverer, oracle_discoverer] [portal.host1.example.com_HTTP Server, oracle_apache] [portal.host1.example.com_OC4J_BI_Forms, oc4j] [portal.host1.example.com_OC4J_Portal, oc4j] [portal.host1.example.com_Portal:portal, oracle_portal] [portal.host1.example.com, oracle_ias] [host1.example.com, host]

To set a blackout on any one of these components, you would use a command like this:

emctl start blackout prtweb1 "portal.host1.example.com_HTTP Server:oracle_apache" -d 1:00

This syntax is not at all intuitive, and the documentation really does the subject a grave injustice by using the overly simplistic (and actually quite wrong) example it does. The key here is to enclose the "[TargetName:[TargetType]]" string in quotes if it contains any whitespace. If you don't do that the agent won't be able to find the target. To give another example:

emctl start blackout disco portal.host1.example.com_Discoverer:oracle_discoverer -d 2 0:00

Which blacks out Discoverer for your weekend. Good times.

Copyright 2004-2019 Phil Lembo