CRITICAL
FLAPPING
DEVIATING
UNKNOWN
CRITICAL
state should typically only propagate when the cluster quorum is in danger.DEVIATING
propagated state:DEVIATING
state in case a component is not running:.withId(componentId)
componentId
is passed as long and resolved.fullComponent()
Show Json
component menu or by using a topology query in analytics.then { component -> ... }
component
is the component variable, which has properties that can be accessed using .<property name>
. For example, .type
returns component type id.transparentState
component
stateChangesRepository
information that is not available if the runs as async. stateChangesRepository
can be used to return:element
properties and methods listed below can be used in async and synchronous propagation functions.element.name
- Returns the name of the current element.element.type
- Returns type of the current element.element.version
- Returns the component version (optional).element.runState()
- Returns the run state of the current element.element.isComponent()
- Returns True if element is a component and False if element is a relation.element.getDependencies().size()
- Returns the number of dependencies.element.getDependencies()
- Returns a set of the outgoing relations (for components) or a set of components (for relations).stateChangesRepository
methods listed below are only available in synchronous propagation functions.stateChangesRepository.getPropagatedHealthStateCount(<set_of_elements>, <health_state>)
Returns the number of elements in the set that have a certain health state, for example CRITICAL.stateChangesRepository.getHighestPropagatedHealthStateFromElements(<set_of_elements>)
Returns the highest propagated health state based on the given set of elements.stateChangesRepository.getState(element).getHealthState().intValue
Returns the health state of the element.stateChangesRepository.getState(element).getPropagatedHealthState().getIntValue()
Returns the propagated health state of the element.log.info("message")
. Logs will appear in stackstate.log
. Read how to enable logging for functions.