collect_rsi_batch
Collect RSI/SCF diagnostics from multiple Junos devices concurrently, saving output files to a specified directory. Filter targets by hostname or tag for efficient batch operations.
Instructions
Collect RSI/SCF from multiple devices in parallel.
Uses ThreadPoolExecutor for concurrent collection. Default 20 workers
matches junos-ops CLI default for RSI collection. Either hostnames
or tags selects the targets; if both are omitted, every router in
config.ini is targeted. When both are given, the intersection is used.
Args:
hostnames: List of target device hostnames
tags: Tag filter. Each list element is one tag group (comma-separated
tags AND together within a group); multiple list elements OR
together across groups. Combined with hostnames the result is
the intersection.
output_dir: Directory to save output files (empty uses config RSI_DIR or current dir)
max_workers: Maximum parallel threads (default 20)
config_path: Path to config.ini (empty string uses default search)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hostnames | No | ||
| tags | No | ||
| output_dir | No | ||
| max_workers | No | ||
| config_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |