Commands file

Commands for monitoring alarms can be run in a batch from a command file.

If you have a list of commands to configure or update monitoring services, you can write these to a command file instead of typing them one at a time at the command line. Run all the commands together from the file using the gasadmin monitoring preload -d httpdispatch mycmdfile command.

Commands file structure

A commands file is a script file that contains one or more commands in plain text format. You can use it to create a list of commands you want to execute in order to perform various monitoring tasks. Take a look at the sample commands:
update --enable --service mygroup/VIP_web_service
#update --set-alarm DVM_NOT_STARTED --service mygroup/VIP_web_service
update --set-alarm DVM_NOT_CONNECTED --service mygroup/VIP_web_service
#update --set-alarm DVM_CRASH --service mygroup/VIP_web_service
update --set-alarm REQUEST_ERROR --service mygroup/VIP_web_service
update --set-alarm RESPONSE_ERROR --service mygroup/VIP_web_service
#update --set-alarm REAL_REQUEST_TIME --service mygroup/VIP_web_service
update --set-alarm REAL_DVM_START_TIME --service mygroup/VIP_web_service
update --set-alarm REAL_DVM_START_TIME --service Calculator
# ...
Commands are written basically as you would run them at the command line except the gasadmin monitoring part of the command is omitted as it is implicit in the preload command.

Write one command per line. Use the pound symbol (#) at the start of a line to add comments. You can also comment out a command you do not want to run by putting # at the beginning of the line with the command.