ViewHealthStateChangedEvent
. These events are generated when the health state of the entire view changes.HealthStateChangedEvent
. These events are generated when an element's own health state changes.PropagatedHealthStateChangedEvent
. These events are generated when the propagated health state of an element changes.log.info("message")
. Logs will appear in stackstate.log
. Read how to enable logging for functions.view
or scope
can be used, or an alias.view.name
- returns the view name.view.description
- returns the view description.view.query
- returns an STQL query of the view.view.identifier
- returns the globally unique URN value that identifies the view.event
, this can be modified if you choose.event.triggeredTimestamp
- returns the time (epoch in ms) at which the state change occurred.event.causeId
- returns the UUID of the event that triggered the health state change.event.newState
- returns the current state of the element. For HealthStateChangedEvents and ViewHealthStateChangedEvents.event.oldState
- returns the previous state of the element. For HealthStateChangedEvents and ViewHealthStateChangedEvents.event.stackElement
- returns the node ID of the element that has changed its state. For HealthStateChangedEvents only.event.stateChanges
- returns the chain of elements through which the health state change propagated. For PropagatedHealthStateChangedEvents only.event.viewHealthState
- returns the node ID of the health state object for the view that changed its state. For ViewHealthStateChangedEvents onlyview
or scope
can be used, or an alias.view.getName
- returns the name of the view.view.getDescription
- returns the view description.view.getQuery
- returns an STQL query of the view.view.getIdentifier
- returns the globally unique URN value that identifies the view.event
, this can be modified if you choose.event.getCauseId
- returns the UUID of the event that triggered the health state change.event.getTriggeredTimestamp
- returns the time (epoch in ms) at which the state change occurred.event.getNewStateRef
- returns an object representing the current state of the element. For HealthStateChangedEvents and ViewHealthStateChangedEvents.event.getOldStateRef
- returns an object representing the previous state of the element. For HealthStateChangedEvents and ViewHealthStateChangedEvents.event.getStateChanges
- returns the chain of elements through which the health state change propagated. For PropagatedHealthStateChangedEvents only.webhookPlugin.sendMessage(url, "json")
smsPlugin.sendSMSMessage(token, "to", "message")