Monitoring involves deciding what to monitor and configuring alarms for a Genero
Application Server (GAS) session or service.
Monitoring the GAS involves setting monitoring
alarms to capture critical events, such as when a DVM fails to start, when a DVM crashes,
when there are request/response errors, and so on. GAS monitoring configuration can be done on a
service or on a service session.
For this quick start, you will set a DVM_NOT_STARTED
monitoring alarm on a
service running on the GAS. All configuration will be done at the command line using the gasadmin tool.
-
At the command line, check what services are running.
gasadmin session --list
The standard output shows details of the services and applications (if any) running on the
dispatcher. In the sample output, the "Calculator" Web service is started and has a session id. The
service name is "
demo/Calculator
", as Calculator is in the
demo
group. When configuring monitoring for services, you must use the format of
[group/]service_name
.
Session list: (httpdispatch)
- d98290172c8f7c0d861db329f1ce6597 (demo/Calculator)
Port: 59226
Type: WebServices
Pid : 17184
GSID:
-
Check if any monitoring alarm has been set.
You check by session id or service name, using the gasadmin monitoring status
command.
- To check monitoring status by session id:
gasadmin monitoring status --session
d98290172c8f7c0d861db329f1ce6597
The output message shows the session monitoring
status as disabled.
Monitoring status for session :d98290172c8f7c0d861db329f1ce6597
MONITORING: disabled.
LEVEL: MIN.
- To check monitoring status by service name:
gasadmin monitoring status --service
demo/Calculator
The output message shows the session monitoring status as
disabled.
Monitoring status for service :demo/Calculator
MONITORING: disabled.
LEVEL: MIN.
-
Enable monitoring.
You enable monitoring by session id or service name, using the
gasadmin monitoring
update
command.
-
To enable monitoring for a session:
gasadmin monitoring update --enable --session
d98290172c8f7c0d861db329f1ce6597
The output message shows the session monitoring status as enabled.
Update monitoring configuration for session :d98290172c8f7c0d861db329f1ce6597
Ok.
-
Configure or update monitoring.
You configure monitoring by session id or service name, using the
gasadmin monitoring
update --set-alarm alarm_type
command option. The configuration takes
effect immediately.
-
Set the DVM not started alarm on a session.
gasadmin monitoring update --set-alarm DVM_NOT_STARTED --session
d98290172c8f7c0d861db329f1ce6597
-
Set the DVM not started alarm on a service.
gasadmin monitoring update --set-alarm DVM_NOT_STARTED --service
demo/Calculator
-
Check the monitoring configuration.
You check the monitoring status by repeating step 2. The output message this
time should show the monitoring status as enabled with the configured alarms.
-
Reset configuration.
You can remove the monitoring configuration by session id or service name using the
gasadmin monitoring reset
command. Choose from the following:
-
Reset the session monitoring configuration.
gasadmin monitoring reset --session d98290172c8f7c0d861db329f1ce6597
The output message shows the session monitoring status.
Reset status for session :d98290172c8f7c0d861db329f1ce6597
Ok.
-
Reset the monitoring configuration for a service.
gasadmin monitoring reset --service demo/Calculator
The output message shows the service monitoring status.
Reset monitoring for service :demo/Calculator
Ok.
What to do nextHaving completed this quick start you
have a basic knowledge of working with monitoring. There are many more ways of using this feature: