Bulletins
Bulletin retrieval, filtering, and clearing
Bulletin management for Apache NiFi.
Provides functions for retrieving and clearing bulletins from NiFi components. Clearing bulletins requires NiFi 2.7.0 or later.
Bulletins are alerts generated by NiFi components when they encounter errors, warnings, or other notable conditions. They automatically expire after 5 minutes by default, but can be manually cleared using the functions in this module.
- Each bulletin contains:
level: Severity (INFO, WARN, ERROR)
message: Human-readable description
timestamp/timestamp_iso: When the bulletin was generated
source_id/source_name: The component that generated it
stack_trace: Full Java stack trace for errors (NiFi 2.7.0+)
- nipyapi.bulletins.clear_all_bulletins(pg_id=None, before=None)[source]
Clear all bulletins from a process group and its controller services.
- Parameters:
- Returns:
Total number of bulletins cleared.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
Note
Controller services are cleared separately as they are not included in the process group clear API (may be fixed in future NiFi versions). FLOW_CONTROLLER bulletins cannot be cleared via API.
Example:
>>> cleared = nipyapi.bulletins.clear_all_bulletins() >>> print(f"Cleared {cleared} bulletins")
- nipyapi.bulletins.clear_controller_service_bulletins(service_id, before=None)[source]
Clear bulletins for a controller service.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_flow_analysis_rule_bulletins(rule_id, before=None)[source]
Clear bulletins for a flow analysis rule.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_input_port_bulletins(port_id, before=None)[source]
Clear bulletins for an input port.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_output_port_bulletins(port_id, before=None)[source]
Clear bulletins for an output port.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_parameter_provider_bulletins(provider_id, before=None)[source]
Clear bulletins for a parameter provider.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_process_group_bulletins(pg_id, before=None, component_ids=None)[source]
Clear bulletins for a process group and its descendants.
This cascades to all processors, ports, and other components within the process group hierarchy unless specific component_ids are provided.
- Parameters:
- Returns:
- Result with per-component details,
or None if the process group has no components.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
Note
This clears bulletins for processors, ports, and nested process groups but does NOT clear controller service bulletins. Use clear_all_bulletins() for comprehensive clearing including controller services.
The NiFi API returns an error when clearing bulletins from an empty process group (one with no components). This function handles that case gracefully by returning None.
Example:
>>> # Clear all bulletins in a process group hierarchy >>> nipyapi.bulletins.clear_process_group_bulletins(pg.id) >>> # Clear only specific components >>> nipyapi.bulletins.clear_process_group_bulletins( ... pg.id, component_ids=[proc1.id, proc2.id] ... )
- nipyapi.bulletins.clear_processor_bulletins(processor_id, before=None)[source]
Clear bulletins for a processor.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
Example:
>>> # Clear all bulletins for a processor >>> nipyapi.bulletins.clear_processor_bulletins(proc.id) >>> # Clear bulletins before a specific time >>> nipyapi.bulletins.clear_processor_bulletins( ... proc.id, before="2025-01-01T00:00:00.000Z" ... )
- nipyapi.bulletins.clear_registry_client_bulletins(client_id, before=None)[source]
Clear bulletins for a registry client.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_remote_process_group_bulletins(rpg_id, before=None)[source]
Clear bulletins for a remote process group.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.clear_reporting_task_bulletins(task_id, before=None)[source]
Clear bulletins for a reporting task.
Clears all bulletins with timestamp <= before.
- Parameters:
- Returns:
Result of the clear operation.
- Return type:
- Raises:
VersionError – If NiFi version < 2.7.0
- nipyapi.bulletins.get_bulletin_board(pg_id=None, source_name=None, message=None, limit=None, descendants=True)[source]
Retrieve bulletins from the bulletin board with optional filtering.
The bulletin board provides a unified view of bulletins across all components in the flow.
- Parameters:
pg_id (str, optional) – Filter to bulletins from this process group ID. If None, returns bulletins from all groups.
source_name (str, optional) – Filter by source component name (regex).
message (str, optional) – Filter by message content (regex).
limit (int, optional) – Maximum number of bulletins to return.
descendants (bool) – Include bulletins from child process groups (default True). Only applies when pg_id is specified. If False, only returns bulletins from components directly in the specified process group.
- Returns:
- List of bulletin objects with direct field access.
Returns empty list if no bulletins match.
- Each bulletin has these fields:
id (int): Unique bulletin identifier
level (str): Severity - ‘INFO’, ‘WARN’, or ‘ERROR’
message (str): Human-readable description
category (str): Bulletin category
source_id (str): ID of the component that generated it
source_name (str): Name of the source component
source_type (str): Type of source (e.g., ‘PROCESSOR’)
group_id (str): Parent process group ID
timestamp (str): When the bulletin was generated
timestamp_iso (str): ISO 8601 formatted timestamp
node_address (str): Cluster node address (if clustered)
stack_trace (str): Java stack trace for errors (NiFi 2.7.0+)
- Return type:
Example:
>>> # Get bulletins from a PG and all its children (default) >>> bulletins = nipyapi.bulletins.get_bulletin_board(pg_id="abc-123") >>> for b in bulletins: ... print(f"{b.source_name}: {b.message}") >>> # Get bulletins only from components directly in the PG >>> bulletins = nipyapi.bulletins.get_bulletin_board(pg_id="abc-123", descendants=False)
- nipyapi.bulletins.get_bulletins()[source]
Retrieve current controller-level bulletins.
Returns system-wide bulletins including those from the flow controller, reporting tasks, and controller services at the controller level.
- Returns:
Controller bulletins with nested bulletin lists.
- Return type:
Note
Unlike component bulletins, flow controller bulletins (FLOW_CONTROLLER source type) cannot be cleared via API. They expire automatically after 5 minutes per NiFi’s default bulletin retention settings.
Example:
>>> bulletins = nipyapi.bulletins.get_bulletins() >>> for b in bulletins.bulletins or []: ... print(f"{b.bulletin.level}: {b.bulletin.message}")