Webhook JSON data
The sample code in the following example is used to create a webhook server that truncates the information, which is posted by the mmhealth command. The structure of the posted JSON data helps you to parse the data to get the information, which is needed to take further actions.
The posted data is in the JSON format and contains information on the reporting node name that sends health events with event-specific details.
The JSON data for the POST event is defined as:
version: string reportingController: string reportingInstance: string events:
array
Each entry in the events array is defined as follows:
cause: string
code: string
component: string
container_restart: boolean
container_unready: boolean
description: string
entity_name: string
entity_type: string
event: string
event_type: string
ftdc_scope: string
identifier: string
internalComponent: string
is_resolvable: boolean
message: string
node: string
priority: integer
remedy: string
requireUnique: boolean
scope: string
severity: string
state: string
time: DateTime
TZONE: string
user_action: string
full_identifier: string
full_identifier
, to correlate events. For example, two
different events: disk_failed
and disk_ok
occur for a disk in a
file system. These events can be correlated by using the full_identifier to know the latest disk
state such as recovered. - For node local events, such as
gpfs_down
,gpfs_up
, thefull_identifier
field has the following properties:clusterid
nodeid
- component
internal_component
- identifier
- For cluster-wide events, such as
pool_data_high
,gpfs_up
, thefull_identifier
field has the following properties:clusterid
- component
internal_component
- identifier
The following example shows what the JSON data might contain when the mmhealth command posts to the configured webhook.

{
"version": "2",
"reportingController": "spectrum-scale",
"reportingInstance": "gpfs-14.localnet.com",
"events": [
{
"cause": "A file system was unmounted.",
"code": "999305",
"component": "filesystem",
"container_restart": false,
"container_unready": false,
"description": "A file system was unmounted.",
"entity_name": "t123fs",
"entity_type": "FILESYSTEM",
"event": "fs_unmount_info",
"event_type": "INFO_EXTERNAL",
"ftdc_scope": "",
"identifier": "t123fs",
"internalComponent": "",
"is_resolvable": false,
"message": "The file system t123fs was unmounted normal.",
"node": "6",
"priority": 99,
"remedy": null,
"requireUnique": true,
"scope": "NODE",
"severity": "INFO",
"state": "UNKNOWN",
"time": "2023-05-03T16:44:56+02:00",
"TZONE": "CEST",
"user_action": "N/A",
"full_identifier": "317908494475311923/6/filesystem//t123fs"
}
]
}
