This article describes how to apply or remove a blackout schedule for one or more agents based on their agent type using the fglcmd command-line utility.
This method is useful when a blackout must be applied to all agents of a specific type (for example, all DB_SQL_Server agents) without manually selecting each agent in the Foglight UI.
Administrators may need to apply or remove blackout schedules for a large number of agents simultaneously during planned maintenance activities, application deployments, infrastructure changes, or troubleshooting events. Using the fglcmd utility allows a blackout schedule to be assigned or removed for all agents of a specific type without manually updating each agent through the Foglight UI.
Common use cases include:
bin directory.fglcmd.{bat|sh} -usr <username> -pwd <password> -cmd agent:setschedule -type DB_SQL_Server -schedulename "Beginning of the day" -force
-type - Agent type to target (for example, DB_SQL_Server).-schedulename - Name of the blackout schedule to apply.-force - Applies the schedule without prompting for confirmation.DB_SQL_Server is the agent type.Beginning of the day is the blackout schedule being applied.-type parameter to target multiple agent types.bin directory.fglcmd.{bat|sh} -usr <username> -pwd <password> -cmd agent:setschedule -type DB_SQL_Server -none -force
This command removes the blackout schedule from all matching agents.