### Configure Extension Environment Variables Source: https://docs.ipfabric.io/latest/IP_Fabric_GUI/extensions?q= Example format for defining environment variables in the Extension Setup form, using KEY=VALUE pairs on separate lines. ```text API_KEY=your-secret-key DATABASE_URL=postgresql://localhost:5432/mydb DEBUG=true ``` -------------------------------- ### upgrade-local example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI Example of the upgrade-local command with a specific package path. ```bash /opt/ipf-system-upgrade/bin/cli upgrade-local /tmp/ipfabric-update-7-11-10.tar.zst.sig ``` -------------------------------- ### Run ipf-sso-setup-helper script Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso Start the automated SSO setup script from the CLI. It is pre-installed on IP Fabric version 7.2.X and guides through the configuration process. ```bash ipf-sso-setup-helper ``` -------------------------------- ### URL configuration example Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso?q= Example showing the required URL updates for the app, web, and dex sections using the system FQDN. ```json { "app": { "url": "https://demo.ipfabric.io/api" }, "web": { "url": "https://demo.ipfabric.io" }, "dex": { "url": "https://demo.ipfabric.io/dex" } } ``` -------------------------------- ### Restore Data & All System Services Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example command to restore full system data. ```bash sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -r backup-Full -d 2024-11-18T13:49:28 ``` -------------------------------- ### Full Backup List Output Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example output when listing full backups. ```bash root@system-backup:/# sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -l backup Nov 18 13:54:02 [INFO] Backup destination: local Nov 18 13:54:02 [INFO] Storage status: OK Nov 18 13:54:02 [INFO] Removing temp backup files. ## LIST ## backup-Full; 2024-11-18T13:49:28 ## LIST END ## ``` -------------------------------- ### Snapshot List Output Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example output when listing snapshots. ```bash root@system-backup:/# sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -l snapshots Nov 18 13:54:14 [INFO] Backup destination: local Nov 18 13:54:14 [INFO] Storage status: OK Nov 18 13:54:14 [INFO] Removing temp backup files. Nov 18 13:54:15 [INFO] Local backup DB same as online list ## LIST ## snapshot-e71519b9-b7fc-488d-841f-67983a12f6af; 2024-11-18T13:49:28 snapshot-e09c6b70-b232-4dd1-bec9-97ad1f96d40c; 2024-11-18T13:49:28 snapshot-d49e9715-3eb3-4b21-b41f-1ef9b6c5bead; 2024-11-18T13:49:28 snapshot-ab7e4ed6-e07f-47d0-8d95-a7581ec29acc; 2024-11-18T13:49:28 snapshot-45cf7507-ab1e-42f2-a18d-0ae26d5f4e61; 2024-11-18T13:49:28 snapshot-41844ce8-cc7a-4b60-b4a5-c59149e42d69; 2024-11-18T13:49:28 snapshot-12dd8c61-129c-431a-b98b-4c9211571f89; 2024-11-18T13:49:28 ## LIST END ## ``` -------------------------------- ### Database Backup List Output Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example output when listing database backups. ```bash root@system-backup:/# sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -l postgresdb Nov 18 13:54:30 [INFO] Backup destination: local Nov 18 13:54:30 [INFO] Storage status: OK Nov 18 13:54:30 [INFO] Removing temp backup files. Nov 18 13:54:31 [INFO] Local backup DB same as online list ## LIST ## postgresdb-test-10640358365-20250711-1026-7_5_0+0; 2025-07-11T10:26:46 ## LIST END ## ``` -------------------------------- ### Full Dex Configuration Example Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso?q= A complete example of the /etc/ipf-dex.yaml configuration file used for SSO integration. ```yaml # /etc/ipf-dex.yaml issuer: https:///dex staticClients: - id: ipfabric redirectURIs: - "https:///api/oauth2/external/" name: IP Fabric secret: storage: type: memory logger: level: debug web: http: 127.0.0.1:5556 telemetry: http: 127.0.0.1:5558 grpc: addr: 127.0.0.1:5557 oauth2: skipApprovalScreen: true connectors: - type: oidc id: sso_oidc name: SSO OIDC config: issuer: redirectURI: https:///dex/callback clientID: clientSecret: getUserInfo: true insecureEnableGroups: true scopes: - openid - profile - email - groups ``` -------------------------------- ### Restore Database Command Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example command to restore the database. ```bash sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -r postgresdb-test-10640358365-20250711-1026-7_5_0+0 -d 2025-07-11T10:26:46 ``` -------------------------------- ### Full backup file example Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/system/Backup_and_Maintenance/system_backup?q= Example of the files generated during a full backup process. ```text -rw-r--r-- 1 root root 54M Sep 27 11:14 ipfabric-94c370c9-duplicity-full.20230927T111440Z.vol1.difftar.gpg -rw-r--r-- 1 root root 3.3M Sep 27 11:14 ipfabric-94c370c9-duplicity-full-signatures.20230927T111440Z.sigtar.gpg -rw-r--r-- 1 root root 62K Sep 27 11:14 ipfabric-94c370c9-duplicity-full.20230927T111440Z.manifest.gpg ``` -------------------------------- ### Install ipfabric with optional dependencies Source: https://docs.ipfabric.io/latest/integrations/python Installs the ipfabric SDK with optional dependencies. `pd` enables Pandas DataFrame support, `cli` adds requirements for CLI tools, `examples` adds requirements for example scripts. Multiple extras can be specified. ```bash pip install "ipfabric[pd]~=6.8" ``` ```bash pip install "ipfabric[cli]~=6.8" ``` ```bash pip install "ipfabric[examples]~=6.8" ``` ```bash pip install "ipfabric[pd,cli]~=6.8" ``` -------------------------------- ### Path Diagram Tools Example Prompts Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/integration/mcp Example prompts for the path diagram tools (ipf_png_pathlookup_unicast, ipf_png_pathlookup_host-to-gateway, ipf_png_pathlookup_multicast). Use these to get a PNG diagram of the path instead of structured data. ```text Trace route from server A to server B with diagram Show multicast path for group 239.1.1.1 from source 10.0.1.5 with diagram ``` -------------------------------- ### Example versions.json output Source: https://docs.ipfabric.io/latest/System_Administration/system_update Example output of /var/lib/ipf-system-upgrade/versions.json showing the active channel and available updates. This example shows the production channel with no possible updates. ```json { "channel": "production", "possibleUpdates": [] } ``` -------------------------------- ### Example response from API version endpoint Source: https://docs.ipfabric.io/latest/integrations/python Example JSON response showing `apiVersion` and `releaseVersion` fields. Used to confirm the API version before installing a matching SDK. ```json { "apiVersion": "v6.8", "releaseVersion": "6.8.6+0" } ``` -------------------------------- ### Full Nginx configuration example with HSTS Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/system/hsts Example of the final configuration file content showing the HSTS header added to various location blocks. ```nginx # ---- HTML: never cache if served from /opt/ipf-frontend/html/ ---- location ~* \.html$ { root /opt/ipf-frontend/html/; add_header Cache-Control "no-cache, must-revalidate"; add_header Strict-Transport-Security "max-age=31536000" always; } # ---- Cache Non-HTML static files from /opt/ipf-frontend/html/ ---- location ~* ^/(?:[^/]+|public/(?:.*/)?[^/]+)\.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff2?)$ { root /opt/ipf-frontend/html/; add_header Cache-Control "public, max-age=31536000, immutable"; add_header Strict-Transport-Security "max-age=31536000" always; } # ---- SPA fallback for routes without an extension ---- location / { include /opt/ipf-frontend/nginx/frontend-headers; add_header X-Frame-Options "DENY"; add_header X-Content-Type-Options "nosniff"; add_header X-XSS-Protection "1; mode=block"; add_header Strict-Transport-Security "max-age=31536000" always; root /opt/ipf-frontend/html/; index index.html; try_files $uri /index.html; } ``` -------------------------------- ### Full Backup List Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI An example of a formatted list containing a full system backup. ```text ## LIST ## backup-Full; 2024-11-18T13:49:28 ## LIST END ## ``` -------------------------------- ### Example Log Text Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/dynamic-attributes/example_configs/log_version_name Example device log output from `show version` that the configuration processes. The regex extracts `VIOS-ADVENTERPRISEK9-M` as the image name. ```text d5xr01#show version Cisco IOS Software, IOSv Software (VIOS-ADVENTERPRISEK9-M), Version 15.6(2)T, RELEASE SOFTWARE (fc2) ``` -------------------------------- ### Example successful dist_upgrade.log output Source: https://docs.ipfabric.io/latest/releases/release_notes/previous_releases/5.0?q= The example output of a successful /var/log/nimpee/dist_upgrade.log shows the system cleaning up with exit code 0, then the system will reboot. ```bash osadmin@ipfabric:~$ tail -f /var/log/nimpee/dist_upgrade.log + echo --- exit_code: 0, cleaning up --- --- exit_code: 0, cleaning up --- + delete_if_exists /etc/apt/sources.list.d/ipf-update.list /etc/apt/sources.list.d/ipf-update.list.tmp /etc/apt/sources.list.tmp + [ -e /etc/apt/sources.list.d/ipf-update.list ] + [ -L /etc/apt/sources.list.d/ipf-update.list ] + [ -e /etc/apt/sources.list.d/ipf-update.list.tmp ] + [ -L /etc/apt/sources.list.d/ipf-update.list.tmp ] + [ -e /etc/apt/sources.list.tmp ] + [ -L /etc/apt/sources.list.tmp ] + return 0 ``` -------------------------------- ### Host-to-Gateway Path Lookup Example Prompts Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/integration/mcp Example prompts for the ipf_pathlookup_host-to-gateway tool. Use these to trace the path from a host to its default gateway. ```text Show path from 192.168.1.100 to its gateway How does host 10.0.5.25 reach its gateway? ``` -------------------------------- ### Example Configuration File (config.yml) Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/dynamic-attributes/configuration/05-rbac?q= A complete configuration example for IP Fabric dynamic attributes using a limited-scope token via the IPF_TOKEN environment variable. ```yaml --- ipfabric: base_url: 'https://ipfabric.example.com' auth: null # Uses IPF_TOKEN environment variable timeout: 30 verify: true snapshot_id: $last dry_run: true update_snapshot: true inventory: report_columns: - loginIp - siteName - vendor - platform default: overwrite: true attribute: REGION rules: - name: "Assign Region Based on Site" filters: - column: siteName value: unknown operator: neq value: api_endpoint: tables/inventory/devices column: siteName transform: upper regex: pattern: "^([^-]+)-" group: 1 mapping: LONDON: London-Region PARIS: Paris-Region FRANKFURT: Frankfurt-Region default_mapping_value: UNKNOWN ``` -------------------------------- ### Setup environment with ipfabric-snow env setup Source: https://docs.ipfabric.io/latest/integrations/service-now/Command-Line_Interface Interactive command to configure environment variables for IP Fabric and ServiceNow connectivity, with an option to save credentials to a .env file. ```bash ❯ ipfabric-snow env setup 2023-11-30 20:33:10.463 | INFO | ipfabric_snow.apps.env_setup:setup_environment:75 - Setting up the environment 2023-11-30 20:33:10.464 | INFO | ipfabric_snow.utils.env_manager:read_env_file:17 - env file path: ipfabric-snow/.env Username and password or token for SNOW? Please enter 'user' or 'token'. Default is token. [user/token] (token): user Please enter the SNOW_USER value: admin Please enter the SNOW_PASS value: Please enter the IPF_URL value: https://sa-eu-demo02a.hel1-cloud.ipf.cx Please enter the SNOW_URL value: https://dev88344.service-now.com Do you want to store sensitive data (passwords, tokens) in the .env file? [y/N]: y 2023-11-30 20:34:25.443 | INFO | ipfabric_snow.utils.env_manager:write_env_file:33 - env file path: ipfabric-snow/.env 2023-11-30 20:34:25.450 | INFO | ipfabric_snow.apps.env_setup:setup_environment:99 - Environment setup complete ``` -------------------------------- ### Example of incremental backup 1 files Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/system/Backup_and_Maintenance/system_backup Example output of the files created by the first incremental backup, which depends on the full backup. ```bash -rw-r--r-- 1 root root 28M Sep 27 11:17 ipfabric-94c370c9-duplicity-inc.20230927T111440Z.to.20230927T111735Z.vol1.difftar.gpg -rw-r--r-- 1 root root 1.6M Sep 27 11:17 ipfabric-94c370c9-duplicity-new-signatures.20230927T111440Z.to.20230927T111735Z.sigtar.gpg -rw-r--r-- 1 root root 11K Sep 27 11:17 ipfabric-94c370c9-duplicity-inc.20230927T111440Z.to.20230927T111735Z.manifest.gpg ``` -------------------------------- ### Example of full backup files Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/system/Backup_and_Maintenance/system_backup Example output of the files created by the first full backup. The number of vol files may vary (vol1, vol2, ..., volX) depending on the backup size. ```bash -rw-r--r-- 1 root root 54M Sep 27 11:14 ipfabric-94c370c9-duplicity-full.20230927T111440Z.vol1.difftar.gpg -rw-r--r-- 1 root root 3.3M Sep 27 11:14 ipfabric-94c370c9-duplicity-full-signatures.20230927T111440Z.sigtar.gpg -rw-r--r-- 1 root root 62K Sep 27 11:14 ipfabric-94c370c9-duplicity-full.20230927T111440Z.manifest.gpg ``` -------------------------------- ### GET request to download configuration Source: https://docs.ipfabric.io/latest/IP_Fabric_API/retrieving_configurations?q= Send a GET to `/tables/management/configuration/download?hash=XXXXXXXXXXXXX` with the hash from the first step to retrieve the plain text configuration. ```text GET /tables/management/configuration/download?hash=XXXXXXXXXXXXX ``` -------------------------------- ### .env File Example Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/ipf_webhook_listener Example .env file with uvicorn_ip and ipf_secret settings. The listener looks for .env in the current directory and then home directory; CLI arguments override these values. ```bash uvicorn_ip=127.0.0.1 ipf_secret=5b71eecda8fcf68c3f997ce9e963ea23 ``` -------------------------------- ### Install updates Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/add_system_repositories After enabling the system repositories, run these commands to update the package index and upgrade installed packages. ```bash apt-get update apt-get upgrade ``` -------------------------------- ### Install ipfabric-snow via Poetry Source: https://docs.ipfabric.io/latest/integrations/service-now?q= Clone the repository and install dependencies using Poetry. Requires Python 3.10+ and access to IP Fabric and ServiceNow. ```bash poetry install ``` -------------------------------- ### Establish Support VPN: Start VPN with nimpee-support-vpn Source: https://docs.ipfabric.io/latest/support/support_vpn?q= Final step of the CLI workflow to establish the support VPN. Run the command as the autoboss user to start the VPN connection. This command must be executed after switching to root. ```bash sudo -u autoboss nimpee-support-vpn start ``` -------------------------------- ### CLI help output Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI Example output from the CLI help command showing usage, subcommands, and options. ```text usage: cli [-h] [--versions-json-file VERSIONS_JSON_FILE] [--action-json-file ACTION_JSON_FILE] [--status-file STATUS_FILE] {tui,list-updates,upgrade,upgrade-local} ... IPF System Upgrade CLI tool positional arguments: {tui,list-updates,upgrade,upgrade-local} Command to execute tui Execute the Text User Interface (TUI). This is default if no command is given. list-updates List available updates upgrade Create an action file for a specific version upgrade-local Create an action file for upgrading from a local file options: -h, --help show this help message and exit --versions-json-file VERSIONS_JSON_FILE Path to the versions JSON file (default: /var/lib/ipf-system-upgrade/versions.json) [env var: IPF_SYSTEM_UPGRADE_VERSIONS_JSON_FILE] --action-json-file ACTION_JSON_FILE Path to the upgrade action JSON file (default: /var/lib/ipf-system-upgrade/upgrade-action.json) [env var: IPF_SYSTEM_UPGRADE_ACTION_JSON_FILE] --status-file STATUS_FILE Location of status file. (default: /var/lib/ipf-system-upgrade/upgrade-status.json) [env var: IPF_SYSTEM_UPGRADE_STATUS_FILE] In general, command-line values override environment variables which override defaults. ``` -------------------------------- ### Example output of listing TLS configuration files Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/Custom_TLS Example output showing two TLS-related files: ipf-ssl-params.conf and ipf-ssl-version.conf. The file sizes and dates help identify which files are present. ```bash root@ipfabric-server:~# ls /etc/nginx/conf.d/ -l | grep ssl -rw-r--r-- 1 root root 208 May 6 08:34 ipf-ssl-params.conf -rw-r--r-- 1 root root 64 May 6 08:34 ipf-ssl-version.conf ``` -------------------------------- ### Configuration Type and No Configuration Value Example Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/dynamic-attributes/configuration/04-config Example of a configuration rule specifying the config type and a fallback value when no configuration is present. ```yaml rules: - name: Configuration Type Example overwrite: true value: config: current # Default is current, can be set to startup no_config_value: IPF Unsupported ``` -------------------------------- ### Example of incremental backup 2 files Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/system/Backup_and_Maintenance/system_backup Example output of the files created by the second incremental backup, which depends on incremental backup 1 and the full backup. ```bash -rw-r--r-- 1 root root 28M Sep 27 11:20 ipfabric-94c370c9-duplicity-inc.20230927T111735Z.to.20230927T112005Z.vol1.difftar.gpg -rw-r--r-- 1 root root 1.6M Sep 27 11:20 ipfabric-94c370c9-duplicity-new-signatures.20230927T111735Z.to.20230927T112005Z.sigtar.gpg -rw-r--r-- 1 root root 11K Sep 27 11:20 ipfabric-94c370c9-duplicity-inc.20230927T111735Z.to.20230927T112005Z.manifest.gpg ``` -------------------------------- ### Install ipfabric-snow via PyPI Source: https://docs.ipfabric.io/latest/integrations/service-now?q= Install the ipfabric-snow CLI tool using pip. Requires Python 3.10+ and access to IP Fabric and ServiceNow. ```bash pip install ipfabric-snow ``` -------------------------------- ### Install ipfabric_nornir via pip Source: https://docs.ipfabric.io/latest/integrations/nornir Install the plugin using pip. IP Fabric instance is required for collecting information. ```bash pip install ipfabric_nornir ``` -------------------------------- ### ntpq -pn output example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/change_ntp?q= Example output from ntpq -pn showing the selected source (10.0.1.100) marked with * and other pool sources marked with +. ```plaintext remote refid st t when poll reach delay offset jitter ============================================================================== *10.0.1.100 .GPS. 1 u 64 128 377 0.523 -0.012 0.015 +0.debian.pool.n .PPS. 1 u 120 256 377 12.345 1.234 0.567 +1.debian.pool.n .PPS. 2 u 95 256 377 15.678 0.890 0.432 +2.debian.pool.n .ATOM. 2 u 200 256 377 20.123 -2.345 0.789 ``` -------------------------------- ### Example Output of Successful Local Backup Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example output of a successful local backup triggered via CLI. Shows informational log lines and non-fatal permission warnings. ```bash root@system-backup:/# sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -b find: ‘/root/.cache/duplicity/’: Permission denied find: Failed to restore initial working directory: /root: Permission denied Jul 11 11:09:34 [INFO] Backup destination: local Jul 11 11:09:34 [INFO] Storage status: OK Jul 11 11:09:34 [INFO] ** Backup has started ** Jul 11 11:09:34 [INFO] Cleaning up backup Jul 11 11:09:38 [INFO] Dumping up PostgresDB du: cannot access '/opt/ipf-nimpee-update/server/etc/config.json': No such file or directory Jul 11 11:10:26 [INFO] Creating backups list Jul 11 11:10:43 [INFO] ** Backup has finished ** Jul 11 11:10:43 [INFO] Removing temp backup files. rm: cannot remove '/var/backups/database/': Permission denied ``` -------------------------------- ### Multicast Path Lookup Example Prompts Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/integration/mcp Example prompts for the ipf_pathlookup_multicast tool. Use these to trace multicast traffic paths from source to receivers. ```text Show multicast path for group 239.1.1.1 from source 10.0.1.5 Analyze multicast distribution for 239.255.0.1 ``` -------------------------------- ### .env File Configuration Example Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/ipf_webhook_listener?q= Example of an .env file used to store configuration settings for the webhook listener. The application automatically searches for this file in the current working directory or the home directory. ```text uvicorn_ip=127.0.0.1 ipf_secret=5b71eecda8fcf68c3f997ce9e963ea23 ``` -------------------------------- ### ipfabric-snow env setup interactive Source: https://docs.ipfabric.io/latest/integrations/service-now/Command-Line_Interface?q= Interactive setup for the `ipfabric-snow` environment. Prompts for SNOW authentication type (user or token), credentials, IP Fabric and ServiceNow URLs, and whether to store sensitive data in the .env file. ```bash ❯ ipfabric-snow env setup 2023-11-30 20:33:10.463 | INFO | ipfabric_snow.apps.env_setup:setup_environment:75 - Setting up the environment 2023-11-30 20:33:10.464 | INFO | ipfabric_snow.utils.env_manager:read_env_file:17 - env file path: ipfabric-snow/.env Username and password or token for SNOW? Please enter 'user' or 'token'. Default is token. [user/token] (token): user Please enter the SNOW_USER value: admin Please enter the SNOW_PASS value: Please enter the IPF_URL value: https://sa-eu-demo02a.hel1-cloud.ipf.cx Please enter the SNOW_URL value: https://dev88344.service-now.com Do you want to store sensitive data (passwords, tokens) in the .env file? [y/N]: y 2023-11-30 20:34:25.443 | INFO | ipfabric_snow.utils.env_manager:write_env_file:33 - env file path: ipfabric-snow/.env 2023-11-30 20:34:25.450 | INFO | ipfabric_snow.apps.env_setup:setup_environment:99 - Environment setup complete ``` -------------------------------- ### Enable Debian system repositories Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/add_system_repositories Run this script to prepare /etc/apt/sources.list with the Debian system repositories configuration. The default content of /etc/apt/sources.list is either empty or a banner asking the user to place configuration in /etc/apt/sources.list.d/ depending on the first version deployed. ```bash /opt/ipf-debian-repositories/bin/ipf-debian-repositories.sh ``` -------------------------------- ### Run Local Upgrade from Directory Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI?q= Example of changing to the directory containing the upgrade package before running the tool. ```bash cd /tmp /opt/ipf-system-upgrade/bin/cli ``` -------------------------------- ### Install python-ipfabric matching IP Fabric version Source: https://docs.ipfabric.io/latest/IP_Fabric_API/Path_Lookup?q= Use pip to install the ipfabric package with a version matching your IP Fabric release. For example, for IP Fabric 6.4, use `pip install -U ipfabric==6.4.*`. ```bash pip install -U ipfabric==6.4.* ``` -------------------------------- ### Example .env file with token authentication Source: https://docs.ipfabric.io/latest/integrations/nornir Sample .env file contents for token-based authentication. Replace values with your environment. ```ini IPF_URL="https://demo3.ipfabric.io" IPF_TOKEN=TOKEN IPF_VERIFY=true ``` -------------------------------- ### Unicast Path Lookup Example Prompts Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/integration/mcp Example prompts for the ipf_pathlookup_unicast tool. Use these to trace the path between two IP addresses and get structured path data. ```text Show me the path from 10.0.1.5 to 10.0.2.10 Why can't 192.168.1.100 reach 172.16.0.50? ``` -------------------------------- ### Example .env file with username/password authentication Source: https://docs.ipfabric.io/latest/integrations/nornir Sample .env file contents for username/password authentication. Replace values with your environment. ```ini IPF_URL="https://demo3.ipfabric.io" IPF_USERNAME=USER IPF_PASSWORD=PASS ``` -------------------------------- ### Example IP Fabric Configuration File (config.yml) Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/dynamic-attributes/configuration/05-rbac Complete example configuration for IP Fabric dynamic attributes with a limited-scope token. Uses IPF_TOKEN environment variable for authentication, sets dry_run and update_snapshot flags, and defines an inventory report and a rule to assign region based on site. ```yaml --- ipfabric: base_url: 'https://ipfabric.example.com' auth: null # Uses IPF_TOKEN environment variable timeout: 30 verify: true snapshot_id: $last dry_run: true update_snapshot: true inventory: report_columns: - loginIp - siteName - vendor - platform default: overwrite: true attribute: REGION rules: - name: "Assign Region Based on Site" filters: - column: siteName value: unknown operator: neq value: api_endpoint: tables/inventory/devices column: siteName transform: upper regex: pattern: "^([^-]+)-" group: 1 mapping: LONDON: London-Region PARIS: Paris-Region FRANKFURT: Frankfurt-Region default_mapping_value: UNKNOWN ``` -------------------------------- ### Run Local Upgrade with File Path Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI?q= Example of running the upgrade tool by providing the full path to the upgrade package file as an argument. ```bash /opt/ipf-system-upgrade/bin/cli upgrade-local /full/path/to/ipfabric-update-.tar.zst.sig ``` -------------------------------- ### DMVPN status report example Source: https://docs.ipfabric.io/latest/IP_Fabric_API/intent_verification_rules?q= Example response from a GET request to /api/{api_version}/reports?snapshot= for a DMVPN status report. It shows the report structure with groups, apiEndpoint, checks, column, defaultColor, descriptions, name, webEndpoint, id, status, and result fields. ```json { "groups": [ { "id": "318508186", "custom": false, "name": "Stability" } ], "apiEndpoint": "/v1/tables/security/dmvpn", "checks": { "0": { "and": [ { "state": [ "eq", "UP" ] } ] } }, "column": "state", "custom": false, "defaultColor": 20, "descriptions": { "checks": { "0": "DMVPN tunnels that are in the 'UP' state.", "10": "", "20": "DMVPN tunnels that are in other than the 'UP' state.", "30": "" }, "general": "Verifies the operational state of Dynamic Multipoint VPN (DMVPN) tunnels.\n" }, "name": "DMVPN Tunnel State", "webEndpoint": "/technology/security/dmvpn", "id": "322178616", "status": -1, "result": {} } ``` -------------------------------- ### Job status response: running Source: https://docs.ipfabric.io/latest/IP_Fabric_API/techsupport Example response from /tables/jobs while the techsupport file is still being generated. ```json { "data": [ { "downloadFile": null, "id": "YOUR_JOB_ID", "isDone": false, "status": "running" }, ], } ``` -------------------------------- ### Create a snapshot with custom parameters Source: https://docs.ipfabric.io/latest/integrations/python/snapshots?q= Creates a snapshot with custom parameters. If a discovery process is already running, the snapshot ID is not provided until the new job starts; the job can be queried with get_job_by_scheduled_time. The example shows how to poll for the snapshot ID. ```python from ipfabric import IPFClient from pprint import pprint from time import sleep ipf = IPFClient() snapshot = ipf.create_snapshot( fail_if_running_snapshot=False, # Default is True and will fail if a snapshot is running. snapshot_name="New Snapshot via SDK", # Default is `''` snapshot_note="This is a new snapshot created via the SDK", # Default is `''` # The following are also available and default to `None` which will use the default values in Discovery Settings: networks=None, # {include: List[], exclude: List[]} # There must be 1 or more include networks; `['0.0.0.0/0']` will include all networks. # To disable on-prem discovery and to only discover Vendor API (AWS, Azure, Google) networks, set include to `['0.0.0.0/32']`. seeds=None, # List of IP addresses or subnets (/24 or smaller); Empty list will remove all seeds credentials=None, # List of saved or custom credentials; Empty list will remove all credentials # At least one credential is required for on-prem discovery. privileges=None, # List of saved or custom privileges; Empty list will remove all privileges disabled_assurance_jobs=None, # List[Literal["graphCache", "historicalData", "intentVerification"]] # To disable Vendor API's set `vendorApi=[]`; Vendor API validation has not been included yet. ) pprint(snapshot.model_dump()) """ {'error': False, 'job': {'downloadFile': None, 'finishedAt': None, 'id': '2065349813', 'isDone': False, 'name': 'discoveryNew', 'scheduledAt': 1727717798377, 'snapshot': None, 'startedAt': None, 'status': 'scheduled', 'username': 'justin.jeffery'}, 'message': 'Please wait till current running snapshot finishes to get the new ' 'snapshot ID.', 'params': {'snapshotName': 'New Snapshot via SDK', 'snapshotNote': 'This is a new snapshot created via the SDK'}, 'snapshot_running': True, 'success': True} """ if snapshot.snapshot_id: print(f"New snapshot ID: {snapshot.snapshot_id}") else: print(f"New snapshot will be created with the next job scheduled at: {snapshot.job_scheduled_at}") """New snapshot will be created with the next job scheduled at: 1727717798377""" while not snapshot.snapshot_id: sleep(30) job = ipf.jobs.get_job_by_id(snapshot.job_id) if job.snapshot: snapshot.job = job print(f"New snapshot ID: {job.snapshot}") pprint(job.model_dump()) """ {'downloadFile': None, 'finishedAt': None, 'id': '2065349813', 'isDone': False, 'name': 'discoveryNew', 'scheduledAt': 1727717798377, 'snapshot': '90027d66-4299-4e10-b009-2f0505793d69', 'startedAt': 1727717915672, 'status': 'running', 'username': 'justin.jeffery'} """ ``` -------------------------------- ### Example output of nginx -T | grep ssl Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/Custom_TLS Example output showing a warning about ssl_stapling, successful configuration test, and the two configuration files being loaded. The warning indicates that the issuer certificate for /etc/nginx/ssl/server.crt was not found. ```bash root@ipfabric-server:~# nginx -T | grep ssl 2025/06/17 12:17:19 [warn] 2494109#2494109: "ssl_stapling" ignored, issuer certificate not found for certificate "/etc/nginx/ssl/server.crt" nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful # configuration file /etc/nginx/conf.d/ipf-ssl-params.conf: # configuration file /etc/nginx/conf.d/ipf-ssl-version.conf: ``` -------------------------------- ### URL configuration example in api.json Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso Example of the URL configuration section in api.json. The url fields in the app, web, and dex sections must be updated with the FQDN of the IP Fabric system. The dex.url must match the issuer URL in ipf-dex.yaml. ```json { "app": { "url": "https://demo.ipfabric.io/api" }, "web": { "url": "https://demo.ipfabric.io" }, "dex": { "url": "https://demo.ipfabric.io/dex" } } ``` -------------------------------- ### GET /api/v7.5/snapshots (Removed in v8.0) Source: https://docs.ipfabric.io/latest/IP_Fabric_API/versioning?q= This endpoint previously allowed path-based versioning but has been removed as of IP Fabric v8.0. Requests that include a version segment in the URL path will return HTTP 410 Gone. This example illustrates the deprecated and removed path-based versioning approach. ```APIDOC ## GET /api/v7.5/snapshots (Removed in v8.0) ### Description This endpoint previously allowed path-based versioning but has been removed as of IP Fabric v8.0. Requests that include a version segment in the URL path will return HTTP 410 Gone. ### Method GET ### Endpoint /api/v7.5/snapshots ### Parameters #### Path Parameters - **v7.5** (string) - Required - The API version segment in the URL path. This is no longer supported. ### Request Example ``` GET /api/v7.5/snapshots HTTP/1.1 Host: your_ipf_instance ``` ### Response #### Error Response (410 Gone) - **HTTP 410 Gone** - Returned because path-based versioning is removed. ### Migration Guide Remove the `/v7.x` segment from all API request URLs. No other changes are required — payloads are the same. #### Correct Request Example ``` GET /api/snapshots HTTP/1.1 Host: your_ipf_instance ``` To pin a specific endpoint version, use the `X-API-Version` header instead. ``` -------------------------------- ### Run ipf-connection-tester with custom timeouts Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/troubleshooting?q= Example command to run the connection tester with increased timeout values. ```bash ipf-connection-tester ssh userName@device-IP-or-Hostname -r 60 -d 20 ``` -------------------------------- ### api.json full configuration example Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso Full example of the api.json configuration file for IP Fabric API. It includes the app, web, and dex sections with the dex provider configuration for SSO, including role assignments. The file must be created at /opt/ipf-api/conf.d/api.json during initial configuration. ```json { "app": { "url": "https:///api" }, "web": { "url": "https://" }, "dex": { "url": "https:///dex", "providers": [ { "name": "sso", "clientId": "ipfabric", "clientSecret": "", "roleAssignments": [ { "groupName": "any", "roleId": null }, { "groupName": "read-only-group-SSO", "roleName": "read-only-role-IPF" }, { "groupName": "admin-group-SSO", "roleName": "admin" } ] } ] } } ``` -------------------------------- ### Get Microsoft Graph user groups with PowerShell Source: https://docs.ipfabric.io/latest/IP_Fabric_Settings/administration/sso Retrieves Microsoft Entra ID (Azure AD) groups for a user using the Microsoft Graph PowerShell SDK. The first block sets the user variable and fetches group names; the second updates required modules if errors occur; the third shows example output. ```powershell $User = "ipf.user@ipfabric.io" $Groups = @() # Get Groups based on your user account. Get-MgUserMemberOf -UserId $User | ForEach-Object { $Groups += Get-MgGroup -GroupId $_.id | select DisplayName -ExpandProperty DisplayName} Write-Output " " "Groups for ${User}:" "---------------" $Groups ``` ```powershell Update-Module -Name Microsoft.Graph.Users, Microsoft.Graph.Authentication, Microsoft.Graph.Groups -Force ``` ```text Groups for ipf.user@ipfabric.io: --------------- Solution Architecture Everyone <...> ``` -------------------------------- ### Start Interactive TUI Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI?q= Commands to launch the interactive text user interface for the upgrade tool. ```bash /opt/ipf-system-upgrade/bin/cli ``` ```bash /opt/ipf-system-upgrade/bin/cli tui ``` -------------------------------- ### Merged Configuration Rule Example (YAML) Source: https://docs.ipfabric.io/latest/integrations/python/CLI_Tools/dynamic-attributes/configuration/04-config Shows the resulting merged rule after applying the default configuration to the example rule. The merged rule includes the default filters (vendor equals cisco), overwrite and overwrite_unsupported set to true/false, and an inventory field used internally for merging multiple configuration files. ```yaml rules: - name: HTTP Server filters: - value: cisco operator: eq column: vendor filter_string: null attribute: IP_HTTP_SERVER delete_attribute: null overwrite: true overwrite_unsupported: false merge_default_filters: true value: static: DISABLED regex: pattern: ^no ip http server group: 0 flags: - IGNORECASE - MULTILINE transform: null default_mapping_value: null mapping: {} null_value: ENABLED config: current no_config_value: IPF Unsupported inventory: null # Used Internally Only for merging multiple configuration files ``` -------------------------------- ### Initialize IPFClient with Snapshots Source: https://docs.ipfabric.io/latest/integrations/python/snapshots?q= Shows how to initialize the client with specific snapshot IDs like $last or $prev and how to switch the snapshot ID dynamically. ```python from ipfabric import IPFClient # Initialize client with the previous to the most recent snapshot ipf = IPFClient(snapshot_id="$prev") print(ipf.snapshot_id) # Should return the snapshot ID of the previous snapshot # Changing the SDK IPFClient's snapshot ipf.snapshot_id = "$last" print(ipf.snapshot_id) # Should return the snapshot ID of the last snapshot # All methods will now use this ID for returning data ``` -------------------------------- ### Deploy VM with virt-install Source: https://docs.ipfabric.io/latest/platform_first_steps/01-deployment?q= Deploy the virtual machine using the virt-install utility. Replace placeholders for vcpu and ram with values appropriate for your network size. ```bash virt-install --name=IP_Fabric --disk path=.qcow2 --graphics spice --vcpu= --ram= --network bridge=virbr0 --import ``` -------------------------------- ### Restore Specific Snapshot Command Example Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/backup_restore_CLI Example command to restore a specific snapshot. ```bash sudo -u autoboss /opt/nimpee/sys-backup-duplicity.sh -r snapshot-e71519b9-b7fc-488d-841f-67983a12f6af -d 2024-11-18T13:49:28 ``` -------------------------------- ### Example: show vlan and show spanning-tree vlan detail output Source: https://docs.ipfabric.io/latest/support/known_issues/Vendors/arista Example output from Arista EOS showing VLANs and spanning tree details. The 'show spanning-tree vlan detail' command stops when it encounters VLAN 2 (BAD_VLAN) which is not assigned to any ports, resulting in incomplete path lookups. ```text arista#show vlan VLAN Name Status Ports ----- -------------------------------- --------- ------------------------------- 1 default active 2 BAD_VLAN active 5 GOOD_VLAN active Et1, Et2 arista#sho span vlan det Spanning tree instance for vlan 1 VL1 is executing the rapid-pvst Spanning Tree protocol Bridge Identifier has priority 4096, sysid 1, address 0000.0000.0000 Configured hello time 2.000, max age 20, forward delay 15, transmit hold-count 6 We are the root of the spanning tree No spanning tree information available for vlan 2 ``` -------------------------------- ### InitNornir with explicit options Source: https://docs.ipfabric.io/latest/integrations/nornir Configure connection details directly in Python: base_url, token (or username/password), verify, platform_map, and default credentials. ```python from nornir import InitNornir nr = InitNornir( inventory={ "plugin": "IPFabricInventory", "options": { "base_url": "https://ipfabric.local", "token": "Token", # or "username":"admin", "password":"mySecretPassword", "verify": True, "platform_map": "netmiko", # "netmiko" (Default), "napalm", or "genie", "default": {"username": "device_username", "password": "device_password"}, }, }, ) ``` -------------------------------- ### Start interactive TUI explicitly Source: https://docs.ipfabric.io/latest/System_Administration/Command_Line_Interface/How_to/upgrade_CLI The 'tui' subcommand explicitly starts the interactive TUI. ```bash /opt/ipf-system-upgrade/bin/cli tui ```