VyOS icon

VyOS

Interact with VyOS router via HTTP API

Overview

This node allows interaction with a VyOS router via its HTTP API, specifically focusing on managing the router's configuration. The "Show Config" operation under the "Configuration" resource retrieves configuration data from the VyOS device. Users can fetch either the entire configuration or specific parts of it by specifying a path. This is useful for network administrators who want to programmatically inspect or audit router settings without manually logging into the device.

Practical examples include:

  • Retrieving the full router configuration to back it up or analyze.
  • Fetching specific interface settings (e.g., IP address of eth0) to verify network setup.
  • Automating compliance checks by extracting certain configuration parameters regularly.

Properties

Name Meaning
Configuration Path Space-separated path elements specifying which part of the configuration to retrieve. Leave empty to get the full configuration. Example: interfaces ethernet eth0 address
Additional Fields Collection of optional fields to customize output:
- Format Output Boolean option to format the output for better readability (true/false).
- Include Metadata Boolean option to include API response metadata such as success or error fields (true/false).

Output

The node outputs JSON data representing the requested configuration information from the VyOS router.

  • If no configuration path is specified, the output contains the full configuration as a nested JSON object.
  • If a configuration path is provided, the output contains only the relevant subset of the configuration.
  • When "Format Output" is enabled, the JSON is structured for easier reading.
  • If "Include Metadata" is enabled, additional fields indicating the success status or any errors from the API response are included alongside the configuration data.

The node does not output binary data.

Dependencies

  • Requires an active connection to a VyOS router accessible via HTTP API.
  • Needs an API authentication credential (an API key or token) configured in n8n to authenticate requests.
  • The node expects the base URL and SSL validation preferences to be set through these credentials.
  • No other external dependencies are required.

Troubleshooting

  • Common Issues:

    • Incorrect or unreachable VyOS host URL will cause connection failures.
    • Invalid or missing API authentication credentials will result in authorization errors.
    • Providing an invalid configuration path may return empty results or errors.
    • SSL certificate issues if the router uses self-signed certificates and SSL validation is not disabled.
  • Error Messages:

    • Connection refused or timeout: Check network connectivity and correct host URL.
    • Unauthorized or authentication failed: Verify API credentials and permissions.
    • Invalid configuration path: Confirm the path syntax and existence on the router.
    • SSL certificate errors: Enable the option to ignore SSL issues if using self-signed certs.

Resolving these typically involves verifying the node’s credential settings, ensuring the router is reachable, and confirming the correctness of the configuration path input.

Links and References

Discussion