IBM Support

How to create a custom host disk threshold Event rule in Netezza(PDA)

Question & Answer


Question

How do I create a custom event rule for host disk threshold events in the Netezza (PDA) appliance?

Answer

The host disk space is not managed by the hwDiskFull event, but by the hwNeedsAttention event. The system manager registry settings that control the host disk space thresholds are:
sysmgr.hostFileSystemUsageThresholdOneToRiseEvent = 80
sysmgr.hostFileSystemUsageThresholdTwoToRiseEvent = 90
sysmgr.hostFileSystemUsageThresholdToStopSystem = 95

The system will raise a hwNeedsAttention event as these thresholds are exceeded. Since this will generate a 'generic' message, there may be times where a user would want to have reported a custom message that may be more meaningful so that appropriate actions can be taken.

NOTE: The same event hwNeedsAttention will be triggered for these thresholds, so there is currently no way to distinguish between the individual entries, nor which specific filesystem crossed the threshold.

To illustrate, here are the eventmgr messages when triggered by these thresholds (notice that the only difference is the reasonCode):

When the host disk space passed the 80% full threshold:


2014-05-05 10:38:16.187027 PDT Info: received & processing event type = hwNeedsAttention, event args = 'hwId=1072, hwType=host, location=lower host, devSerial=KQWWGHM, eventSource=system, errString=File system usage exceeded threshold, reasonCode=1051' event source = 'System initiated event'

When the host disk space passed the 90% full threshold:
2014-05-05 10:40:57.819199 PDT Info: received & processing event type = hwNeedsAttention, event args = 'hwId=1072, hwType=host, location=lower host, devSerial=KQWWGHM, eventSource=system, errString=File system usage exceeded threshold, reasonCode=1061' event source = 'System initiated event'

And this is the email that is sent from the default hwNeedsAttention event for the above:
Subject: NPS system nz80409-h2 - host 1094 Needs attention. System initiated.

NPS system nz80409-h2 - host 1094 Needs attention. System initiated.

location:lower host
error string:File system usage exceeded threshold
devSerial:KQWWGHM
event source:System initiated


To create a custom event, we will have it specifically trigger on the eventType hwNeedsAttention and the errString:

nzevent add -name 'Hostdiskthreshold' -on yes -eventType hwNeedsAttention -eventArgsExpr '$errString ~File*system*threshold' -notifyType email -dst 'xxxx@us.ibm.com' -ccDst '' -msg 'NPS system $HOST has a host disk exceeding 80% threshold. $eventSource.' -bodyText '$notifyMsg\n\nlocation:$location\nerror string:$errString\ndevSerial:$devSerial\nevent source:$eventSource\nHost disk exceeded 80% threshold.\n' -callHome no -eventAggrCount 0

Note it is parsing the errString for the host file system threshold message. While this is not as flexible as the hwDiskFull event, it at least provides a method to customize letting you know that this threshold has been exceeded, in which case you can trigger actions such as sending you a custom email, execute a custom script, etc. The example can be customized as needed for specific situations.

Here is an example email received from the Hostdiskthreshold event created above:

Subject: NPS system nz80409-h2 has a host disk exceeding 80% threshold. System initiated.

Email body text:

NPS system nz80409-h2 has a host disk exceeding 80% threshold. System initiated.

location:lower host
error string:File system usage exceeded threshold
devSerial:KQWWGHM
event source:System initiated
Host disk exceeded 80% threshold.

[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Administration","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
17 October 2019

UID

swg21981140