> This page is for Remediation Orchestrator.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/remediation-orchestrator/llms.txt.

# history

**Experimental.** For evaluation. Interfaces, configuration, and behavior may change incompatibly.

Records and queries node events and breakfix timelines supplied by workflows and integrations.

### Prerequisites

* None.

### Setup

* Add to tenant TOML:

```toml
[modules.history]
```

* [Module documentation](https://github.com/dsx-ai-factory/remediation-orchestrator/blob/1785e695a8bff76c910115b3c96398a5a59a7183/modules/history/README.md).

> **Note**
>
> This module must be enabled in your Remediation Orchestrator config before it is available to scripts.

This module is used to record node history.

## Members

* [ASSIGNED_TO_ENGINEER](#assigned_to_engineer)
* [ASSIGNED_TO_OPERATOR](#assigned_to_operator)
* [ASSIGNED_TO_PROVIDER](#assigned_to_provider)
* [AUTOMATED_REMEDIATION](#automated_remediation)
* [CHILD_WORKFLOW_COMPLETED](#child_workflow_completed)
* [CHILD_WORKFLOW_SCHEDULED](#child_workflow_scheduled)
* [CHILD_WORKFLOW_STARTED](#child_workflow_started)
* [DIAGNOSED](#diagnosed)
* [ENTERED_BREAKFIX](#entered_breakfix)
* [EXITED_BREAKFIX](#exited_breakfix)
* [GPURTM_FAILURE_PREDICTED](#gpurtm_failure_predicted)
* [QUARANTINE](#quarantine)
* [REPAIR](#repair)
* [ROUTED_TO_POOR_PERFORMERS](#routed_to_poor_performers)
* [SCREENTEST](#screentest)
* [SEEN](#seen)
* [SLOW_NODES_RELEASED](#slow_nodes_released)
* [SLOW_NODES_REVIEW_PENDING](#slow_nodes_review_pending)
* [SLOW_NODES_TESTING](#slow_nodes_testing)
* [SLOW_NODES_TEST_DISCARDED](#slow_nodes_test_discarded)
* [SLOW_NODES_TEST_FAILED](#slow_nodes_test_failed)
* [UNSEEN](#unseen)
* [VALIDATION](#validation)
* [check_integrity](#check_integrity)
* [close_breakfix](#close_breakfix)
* [close_ticket](#close_ticket)
* [current_breakfix_events](#current_breakfix_events)
* [delete](#delete)
* [delete_breakfix](#delete_breakfix)
* [fix_exited_breakfix_open_tickets](#fix_exited_breakfix_open_tickets)
* [is_broken](#is_broken)
* [last_event](#last_event)
* [record_v2](#record_v2)
* [set_breakfix_id](#set_breakfix_id)
* [set_cluster_id](#set_cluster_id)
* [set_occurred_at](#set_occurred_at)
* [set_tag_values](#set_tag_values)

## ASSIGNED_TO_ENGINEER

Assigned to engineer state

## ASSIGNED_TO_OPERATOR

Assigned to operator state

## ASSIGNED_TO_PROVIDER

Assigned to provider state

## AUTOMATED_REMEDIATION

Automated remediation state

## CHILD_WORKFLOW_COMPLETED

Child workflow finished executing

## CHILD_WORKFLOW_SCHEDULED

Parent scheduled a child workflow

## CHILD_WORKFLOW_STARTED

Child workflow began executing

## DIAGNOSED

Diagnosed as bad state

## ENTERED_BREAKFIX

Entered breakfix state

## EXITED_BREAKFIX

Exited breakfix state

## GPURTM_FAILURE_PREDICTED

GPURTM predicted a failure and drained the node

## QUARANTINE

Node is held in breakfix pending bulk action

## REPAIR

Repair state

## ROUTED_TO_POOR_PERFORMERS

Workload canary measured the node as slow and reserved it for investigation

## SCREENTEST

Screen test recorded a result for the node

## SEEN

Node seen by Slurm sonar

## SLOW_NODES_RELEASED

Slow-node pipeline handed the node back out of the screen-test reservation

## SLOW_NODES_REVIEW_PENDING

Slow-node pipeline parked the node for manual review after it passed

## SLOW_NODES_TESTING

Slow-node pipeline moved the node into the screen-test reservation

## SLOW_NODES_TEST_DISCARDED

Slow-node pipeline discarded a screen test failure because the test never ran

## SLOW_NODES_TEST_FAILED

Slow-node pipeline drained the node for a failed screen test

## UNSEEN

Node not seen by Slurm sonar

## VALIDATION

Validation state

## check_integrity

Checks the integrity of the history records.

The cluster ID to check the integrity of.

Optional: only check records from this time onwards (RFC3339 format)

Optional: only check records up to this time (RFC3339 format)

## close_breakfix

Records events to close all tickets associated with the breakfix, and an exit event.

The ID the breakfix to close.

The time to set for occcurred at.

## close_ticket

Records a record history to close the tickets associated with the event history record.

The ID of the history record opening the ticket.

The time to set for occcurred at.

The reason to close the ticket.

## current_breakfix_events

Returns every event in the hostname's current open breakfix record, ordered by occurred_at then id, both ascending.

The hostname in the current tenant.

A list of NodeHistory values, or an empty list if no record is open.

## delete

Deletes a history record identified by its ID.

The ID the history record.

## delete_breakfix

Deletes all history records of a breakfix identified by its ID.

The ID the breakfix.

## fix_exited_breakfix_open_tickets

Fixes integrity issues of type 'exited_breakfix_with_open_ticket' by closing open tickets with proper cleanup reason.

The cluster ID to check and fix issues for.

Optional: only fix issues from this time onwards (RFC3339 format)

Optional: only fix issues up to this time (RFC3339 format)

Number of tickets that were fixed.

## is_broken

Checks if a host is in the midst of an open breakfix.

The cluster ID to check.

The hostname to check.

Whether the node is broken based on its history.

## last_event

Gets the last event for a host from its history.

Cluster ID to check.

The hostname to check.

Optional list of event types to exclude from consideration.

Optional list of event types to include in consideration.

Optional dictionary of tag key/value filters. Matching is case-insensitive; use % as a wildcard. All entries must match.

The last event for the node, or None if no history exists.

## record_v2

Records a node history event.

The cluster ID the node belongs to.

The hostname.

The state of the node to record.

The time to record the event at.

A dictionary of tags to record with the event.

## set_breakfix_id

Updates the breakfix ID of the history record identified by its ID.

The ID the history record.

The ID of the breakfix to set for the record.

## set_cluster_id

Updates the cluster ID of the history record identified by its ID.

The ID the history record.

The cluster ID to set for the record.

## set_occurred_at

Updates the occurred at timestamp of the history record identified by its ID.

The ID the history record.

The time to set for occcurred at.

## set_tag_values

Sets the values of the specified tags of a history record.

The ID the history record.

The tags to overwrite.