Blackout profiles
Blackout profiles provide a simple yet powerful way to create complex blackout conditions. Multiple event conditions (e.g. on several hosts and/or objects) can be grouped together within a same profile.
Once a blackout profile has been created, it can be used to define a “profile blackout” – a blackout that will apply to all events matching one of the conditions set in the blackout profile.
i Even though blackout profiles are used in the “blackout” module, they are managed within a different ProactivePack module. You need to configure the module and its security in the “Blackout Profiles” ProactivePack module.
Blackout profile creation
To create a profile, first provide a name and description :
Once the profile has been created, click on “manage profiles” to access your profile, then click on “modify” :
The following dialog lets you add object conditions to your profile :
Configuration
The “Cellname_EM” parameter of the blackout profiles module configuration must be set to the same cell name as the “blackout” cell.
Basic permissions are set at module level and determine essentially which users or groups can view, create, and delete blackout profiles. For example :
Restricting access to profiles
Once a blackout has been created and is available in the ProactivePack console, users who have permission to manage blackouts can set permissions on which user group(s) can actually set blackouts on those profiles.
By default, a profile can be blacked out by any user who can access the “profile blackout” blackout type.
To set permissions on a profile :
1. Select the profile in the console
2. Using the context menu for the profile, select “manage permissions”
3. In the modal dialog, tick the checkbox in front of each user group who can blackout the selected profile
Adding objects to a Profile using msend
Definition
In order to add objects in a blackout profile using the msend command line with several arguments:
The classname to create periods is ADD_OBJ_TO_PROFIL.
Available slot names are:
Slot name |
Description |
NomProfil |
Profile to modify Restriction: Must match an existing profile |
Host |
Host to add to profile. Support regular expressions use |
Maintenance_application_class |
Object class to add to profile. Support regular expressions use |
Maintenance_instance |
Object to add to profile. Support regular expressions use |
Maintenance_parameter |
Metric to add to profile. Support regular expressions use |
Proprietaire |
Period owner |
Commentaire |
Comment on this blackout period |
Sample
Using the msend command line with arguments :
msend -n CellName -a ADD_OBJ_TO_PROFIL -b "NomProfil=Website;Host=server2;Maintenance_application_class=PROCESS;Maintenance_instance=httpd;Maintenance_parameter=.*"
will add object to existing profile.
Create Profile blackouts using msend
Definition
In order to create a blackout period using the msend command line with several arguments:
The classname to create periods is SET_MAINTENANCE_PROFIL.
Available slot names are:
Slot name |
Description |
NomProfil |
Profile to set in blackout mode Restriction: Must match an existing profile |
MaintStart |
Start timestamp Integer value: the number of seconds since 00:00:00 UTC on January 1, 1970 |
MaintStop |
Stop timestamp Integer value: the number of seconds since 00:00:00 UTC on January 1, 1970 |
Action |
Type of BLACKOUT. Must be one of: CLOS, BLACKOUT, REOPEN |
ApplyToNonClosedEvents |
Define if this period apply on events existing before period start Default: NO. Must be one of: NO, SinceBlackoutCreation, EveryExistingEvents |
Proprietaire |
Period owner |
Commentaire |
Comment on this blackout period |
Sample
Using the msend command line with arguments :
NowTS=$(date +%s)
StartTS=$(($NowTS + 10))
StopTS=$(($StartTS + 3600))
msend -q -n CellName -a SET_MAINTENANCE_PROFIL -b "NomProfil=Website;MaintStart=$StartTS;MaintStop=$StopTS;Action=REOPEN;Proprietaire=Robot;Commentaire='WebSite profile Blackout'"
Stop and delete running Profile periods using msend
This section describes how to stop existing Profil periods, this will have impact on existing events and will delete periods.
This can only be used on Profil / Date periods.
Definition
In order to stop a blackout period using the msend command line with several arguments:
The classname to delete existing periods is STOP_MAINTENANCE_PROFIL.
The following slots are identical to the creation ones:
Slot name |
Description |
DDA_ID |
Blackout Entry id (mc_udid) of existing Blackout (optional) |
NomProfil |
Application Class to set in blackout mode. Restriction: Case sensitive and must be exact name |
MaintStart |
Start timestamp Integer value: the number of seconds since 00:00:00 UTC on January 1, 1970 |
MaintStop |
Stop timestamp Integer value: the number of seconds since 00:00:00 UTC on January 1, 1970 |
MaintStopDelay |
Duration (en seconds) from event to real period removal. |
Commentaire |
Removal reason |
Sample
Using the msend command line with arguments :
msend -q -n CellName -a STOP_MAINTENANCE_PROFIL -b "NomProfil=Website;MaintStart=$StartTS;MaintStop=$StopTS;Action=REOPEN;Proprietaire=Robot;Commentaire='WebSite profile Blackout removal'"
Will stop and delete previously created blackout period. It will impact events and remove period definition.
Profiles reference
As for other modules, the main configuration files are in $PRODUCT_HOME/config but are overriden by the $PRODUCT_HOME/config/custom ones.
Review and update the following configuration parameters.
Parameter |
Description |
Default/typical value |
BlackoutMgtModuleName |
Name of the associated Blackout module |
BlackoutMgt |
CellName_EM |
Event management cell name for Blackout Management |
EM |