A CLI tool to configure and change InsightFinder project settings
Project description
IFClient-Python
A command-line tool to validate, merge, plan, and apply configuration files for InsightFinder projects.
Installation
-
Clone the Repository:
git clone https://github.com/your-username/ifclient.git cd ifclient
-
Install Dependencies:
Using Poetry:
poetry installOr install in editable mode with pip:
pip install -e .
-
Set Up a Virtual Environment (optional but recommended):
python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate
Configuration File Structure
Your configuration files are organized hierarchically. A typical structure is like this but you not mandatory:
/config
|-- tool_config.yaml # Base tool configuration
|-- /projects
| |-- base1.yaml # Project base configuration
| |-- base2.yaml
|-- /instance-grouping-settings
| |-- grouping-data-1.yaml
| |-- grouping-data-2.yaml
|-- /component-metric-settings
|-- metric-setting-1.yaml
|-- metric-setting-2.yaml
You can find examples for all of these in the docs/examples folder in the repository. These files can be used as a starting point. The files are organised in the same way as show above. As mentiond before this is a recommonded but not a mandatory structure of organizing
Sample config.yaml
apiVersion: v1 # Configuration version
type: toolConfig # Schema validation type
baseUrl: "stg.insightfinder.com" # Base URL for deployment
projectBaseConfigs:
- /path/to/project-config.yaml # Can be absolute or relative paths
- /path/to/base/*.yaml # Wildcards are allowed
Sample Project Configuration (base1.yaml)
apiVersion: v1
type: projectBase
user: "user1"
project: "project_name"
projectDisplayName: "Project-Display-Name"
cValue: 1
pValue: 0.95
showInstanceDown: false
retentionTime: 11
UBLRetentionTime: 11
instanceGroupingData:
files:
- "../instance-grouping-data/grouping-data-1.yaml" # All file paths must be relative to the current file
- "../instance-grouping-data/grouping-data-2.yaml"
consumerMetricSettingOverallModelList:
files:
- "../consumer-metric-setting/metric-setting-*.yaml"
Sub-level configurations (for grouping or metric settings) follow similar conventions.
Usage
The tool provides several commands:
- validate: Validate all provided configuration files.
- generate: Merge configurations into one output file.
- apply: Apply the merged configuration via API calls.
Example Commands
# Validate configuration files in a directory
ifclient validate # Searches for all toolConfigs in current directory and recursively validates them
ifclient validate /path/to/configs # Validation with directory to search for all toolConfigs and apply validation recursively
ifclient validate /path/to/configs/config.yaml # Validation of any file and its subconfigs recursively(Need not be of type tool config)
# Generate a merged configuration file
ifclient generate /path/to/configs/config.yaml /path/to/outputs/output.yaml # Generate a yaml file as output with input of a toolConfig file
# Apply the merged configuration via API call
ifclient apply # Searches for all toolConfig files in current directory and recursively applies them
ifclient apply /path/to/configs # Searches for all toolConfig files in the specified directory and applies them recursively
ifclient apply /path/to/configs/config.yaml # Appies file and its subconfigs recursively
Environment Variables
Before running the tool, ensure that sensitive passwords are available as environment variables. The naming convention should be:
ifusername_PASSWORD
For example, if your InsightFinder username is jdoe, set the environment variable:
export jdoe_PASSWORD=your_password_here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insightfinder_client-0.1.0.tar.gz.
File metadata
- Download URL: insightfinder_client-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98c215ca02dbd054d4ab012b9be4169e7b6a5a2dcbf92ce6aadf2d59a076a4a1
|
|
| MD5 |
20d8aa3d40286d28dc3533f71fde4e32
|
|
| BLAKE2b-256 |
15223fa4fd35a984c121dee3c0560b884c9e46a029d1f47b787aab826d154c60
|
File details
Details for the file insightfinder_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: insightfinder_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f2c49ec6499d1745274bd40795e788aaa5941e25e7617ed81d113d47c0a6058
|
|
| MD5 |
3094282e5c38a36cd1049b9936f5629c
|
|
| BLAKE2b-256 |
faf16cdc213dc78efce9e5aa3cef9b1fd31754143183c46db381420447ae3527
|