This content has been marked as final. Show 6 replies
Here is an example of the emcli get_blackouts command showing a blackout created from the agent side using emctl.
$ emcli get_blackouts
Name Created By Status Status ID Next Start Duration Reason Frequency Repeat Start Time End Time Previous End TZ Region TZ Offset
agent_bo_2_2012-06-11 14:32:06 <SYSTEM> Ended 11 none -00:01 Added via emctl utility once none 2012-06-11 14:32:07 none 2012-06-11 14:34:30 PST8PDT +00:00
I used sysman to log on emcli.
that helped me get it to work.. I was able to do:
emcli login -username=sysman -password="my_password"
emcli delete_blackout -name="NAME_DATE_TIME" -created="<SYSTEM>"
that deleted the specified blackout
one more issue..
when the blackout is created by emctl I specify the name.. but it adds a date and time stamp to the name I give it..
is there a way to either:
keep emctl from time stamping the name of the blackout
or use the delete_blackout -name= with a wildcard..
I have already tried -name="NAME*" and -name="NAME%"
A blackout created by the emctl utility always have a date/time stamp in its name as you found out, and the emcli delete_blackout verb does not support the use of wildcards. However, if you use the "emcli create_blackout" to create a blackout, then you can specify an exact blackout name (e.g. without a date/time stamp in the name).