REST Get Events
Returns a list of events in the cluster, and information on each event.
To retrieve events reported in the cluster (Node Inactive, DiskFailed, Volumed Degraded), use the following command:
curl -s -X GET --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer [JWT]" https://[LightOS Node]:443/api/v2/events[JWT] would be the Lightbits cluster JWT. The easiest option is to add the JWT to a variable, as shown in the example below. [LightOS Node] would be the name or IP of one of the Lightbits cluster's nodes.
Sample Command
curl -s -X GET --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $LIGHTOS_JWT" https://localhost:443/api/v2/events | jqSample Output
{ [1/526] "events": [ { "ID": "0f0315f1-d6a4-4ce7-84a5-e2e4222346eb", "Time": "2021-09-29T22:02:42.546106057Z", "Type": "Node", "Severity": "Info", "EventName": "NodeEnteredActiveState", "EventCode": 200, "ReportingService": "CM", "AssociatedEventID": "", "Status": "Available", "CauseCode": 1, "Description": "NoCause", "ComponentNodeInfo": { "ID": "9c623d83-cf12-5fee-b0f2-60385064d306", "Name": "" } }, { "ID": "ab8fd2c8-1dfb-4372-8a80-4ed93f36c418", "Time": "2021-09-29T22:02:42.265900664Z", "Type": "Node", "Severity": "Info", "EventName": "NodeEnteredActiveState", "EventCode": 200, "ReportingService": "CM", "AssociatedEventID": "", "Status": "Available", "CauseCode": 1, "Description": "NoCause", "ComponentNodeInfo": { "ID": "606e6e52-4583-56fd-884b-d0f19cbb1b16", "Name": "" } }, { "ID": "58403a7f-f381-4729-aa27-ffc8e04833a2", "Time": "2021-09-29T22:02:42.085657598Z", "Type": "Node", "Severity": "Info", "EventName": "NodeEnteredActiveState", "EventCode": 200, "ReportingService": "CM", "AssociatedEventID": "", "Status": "Available", "CauseCode": 1, "Description": "NoCause", "ComponentNodeInfo": { "ID": "1cadd6d4-2499-561d-a9d5-e42cd44e20a0", "Name": "" } } ], "nextToken": ""}Was this page helpful?