Documentation Home
MySQL Enterprise Monitor 3.2 Manual
Related Documentation Download this Manual
PDF (US Ltr) - 3.7Mb
PDF (A4) - 3.7Mb
EPUB - 2.7Mb
HTML Download (TGZ) - 2.6Mb
HTML Download (Zip) - 2.7Mb


26.3.1 Scripting Blackouts

You can write a script to black out a server, rather than opening a web browser and typing entries into the address bar. This section documents a sample blackout script that can be run from the command line.

Create the following file and save it as blackout.sh or blackout.bat depending on your platform.

  curl -G -k --user myadmin:mypassword "https://servicemanager:18443/rest" 
  --data-urlencode "command=blackout" --data-urlencode "server_name=servername:3306" 
  --data-urlencode "blackout_state=true"

On Unix systems, use the chmod +x blackout.sh command to make the file executable.

  • myadmin:mypassword: the username and password of a user with blackout rights.

  • "https://servicemanager:18443/rest": the url and port number of the service manager.

  • "command=blackout": establishes the context for setting the state.

  • "server_name=servername:3306": Specify the server to black out using the name that appears in the Server Tree, including the colon and port number.

  • "blackout_state=true": sets the blackout state of the selected server. The selected server is greyed-out in the dashboard.

To confirm that a server is blacked out, check that its name is greyed out in the Monitor UI. To end the blackout, run the same script, changing the final argument to "blackout_state=false".

Note

Restarting MySQL Enterprise Monitor does not reactivate a blacked out server.


User Comments
Sign Up Login You must be logged in to post a comment.