---
title: Maintenance and Failure
slug: bhdo/maintenance-and-failure
createdAt: 2022-10-21T14:40:57.000Z
---

The Maintenance and Failure KPI ensures that every time there is a maintenance event or a fault / failure, the required topic is updated.

When creating an analytics flow, refer to details about this function processor by reviewing [Processor Flow Parameters](https://public-docs.litmus.io/bhdo/processor-flow-parameters#maintenancefailure).&#x20;

The following information describes this KPI:

- For **Maintenance events per cycle**, you can see the number of maintenance events (planned or unplanned) in a production cycle.
- For **Time since last maintenance**, If you know that a machine needs to be checked periodically, you can see the time elapsed between maintenance events.
- **Timestamp of last maintenance&#xA0;**&#x69;s used o keep track of the previous time maintenance occurred
- For **Number of faults / failures detected in a period**, you can see the number of failures that have occurred in a period.
- For **Time since last failure**, if you know that the machine needs to be checked periodically, you can see the time elapsed between failure events.
- **Timestamp of last failure&#xA0;**&#x69;s used to keep track of the previous time when a failure occurred.
- The **timer interval&#xA0;**&#x70;arameter is useful if the connected input tag is offline but you still want this KPI to look for a value evey few seconds, defined by the timer.
- Within the KPI you can define how you want to trigger the mechanism of a maintenance event, and a failure event.
  For example, if you define **Maintenance From**: `0 `and **Maintenance To**: `1`, this means that when the value from the input tag, with the definition on the connection as *maintenance*, goes from 0 to 1, it is an indication that there was a maintenance event.

  **Failure From**: `2 `and **Failure To**: `4 `means whenever the input tag the definition on the connection as \*failure \*goes from 2 to 4, it is an indication that there was a failure event.

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/Og-7ZkAPy5d6kxSfn6wF0_image.png" size="80" width="1261" height="406" caption="Expected output fields" position="center" showCaption="true"}

::Image[]{src="https://api.archbee.com/api/optimize/SSUUxKZUk9bFTEPNn_6Zo/XYMDs8cDOsuo9jRFB78lM_image.png" size="80" width="1129" height="625" caption="Maintenance and Failure visualization" position="center" showCaption="true"}

