i am trying to use the db2 health monitor alert to run a script. i set
up the health monitor to run a script when the tablespace utailization
is too high. in the end, the script should send a syslog message. for
now, i am just trying to figure out what message db2 is sending, by
printing out the parameters db2 is sending.
set up:
Indicator Name = ts.ts_util
Default = No
Type = Threshold-based
Warning = 60
Alarm = 90
Unit = %
Sensitivity = 0
Formula =
((ts.ts_used_pages/ts.ts_usable_pages)*100);
Actions = Enabled
Threshold or State checking = Enabled
Script pathname =
/export/home/userid/health_scripts/ts_util.script
Condition = Warning
Script type = OS
System =
Working directory =
/export/home/userid/health_scripts/
Command line parameters = space
Userid = userid
Contents of ts_util.script:
#!/usr/bin/bash
#
# Handle tablespace utilization warnings
#
cat $1 >> tempfile;
When the health alert is triggered, I get the following in db2diag.log:
2005-10-31-17.54.48.525264 Instance:userid Node:000
PID:6256(db2hmon 0) TID:4 Appid:none
Health Monitor HealthIndicator::update Probe:500
ADM10501W Health indicator "Table Space Utilization" ("ts.ts_util")
breached
the "upper" warning threshold of "60 %" with value "71 %" on "table
space"
"userid.TEST .SYSCATSPACE". Calculation:
"((ts.ts_used_pages/ts.ts_usable_pages)*100);" = "((28192 / 39968) *
100)" =
"71 %". History (Timestamp, Value, Formula): "()"
2005-10-31-17.54.48.529877 Instance:userid Node:000
PID:6256(db2hmon 0) TID:17 Appid:none
Health Monitor HealthIndicator::update Probe:1500
ADM10504E The health monitor failed, with sqlcode "4404", to initiate
an alert
action, running "script"
"/export/home/userid/health_scripts/ts_util.script" on
system "SYSTEMNAME", when the Health Indicator "Table Space
Utilization" ("ts.ts_util") went into the "Warning" alert state on
"table
space" "userid.TEST .SYSCATSPACE".
Any thoughts as to why I am getting that error? the permissions on the
script file are wrx for all. I have been unable to find the format of
the db2 alert message sent. Thanks in advance.