青龙面板[Qinglong] icon

青龙面板[Qinglong]

青龙面板计划任务节点.详细API请参考:https://qinglong.online/api/

Overview

This node integrates with the QingLong panel API to manage various system resources such as crontabs, subscriptions, environment variables, configurations, scripts, dependencies, logs, and system information. Specifically, for the "日志管理" (Log Management) resource with the operation "获取指定日志文件" (Get Specified Log File), it retrieves the content or details of a specific log file from the QingLong system.

Common scenarios where this node is beneficial include:

  • Automating retrieval of log files for monitoring or auditing purposes.
  • Integrating log data into workflows for alerting or analysis.
  • Fetching specific log details dynamically based on workflow inputs.

Practical example:

  • A workflow that triggers on an event and uses this node to fetch the latest error log file from a specified path and filename, then processes or sends the log content via email or messaging platforms.

Properties

Name Meaning
日志路径 (logPath) The directory path where the log file is located. This is required to specify the location of the log file in the QingLong system.
文件名 (logFile) The name of the log file to retrieve. Required to identify which log file to fetch from the given path.

Output

The node outputs JSON data under the json field of the first item in the output array. The key result contains the response from the QingLong API corresponding to the requested log file detail or content.

  • The structure of result depends on the QingLong API's response for the log detail or single log file endpoint.
  • The node does not explicitly handle binary data for logs; it returns textual or structured JSON data representing the log content or metadata.

Example output snippet:

{
  "result": {
    // QingLong API response for the log file detail or content
  }
}

Dependencies

  • Requires an API authentication token credential configured in n8n to access the QingLong API.
  • The node calls QingLong API endpoints such as /open/logs/detail or /open/logs/{filename} depending on the operation.
  • Proper network access to the QingLong server is necessary.
  • No additional external libraries beyond those bundled with n8n are required.

Troubleshooting

  • Common issues:

    • Incorrect or missing log path or filename parameters will cause the API call to fail or return empty results.
    • Authentication failures if the API token credential is invalid or expired.
    • Network connectivity issues to the QingLong server.
    • Unsupported operations or resource names will throw errors indicating the operation is not implemented.
  • Error messages:

    • "任务模块的<operation>操作暂未实现" means the requested operation is not yet implemented in the node.
    • API errors returned by QingLong will be wrapped and surfaced by the node; check the message for details.
  • Resolutions:

    • Verify that the 日志路径 and 文件名 inputs are correct and correspond to existing logs.
    • Ensure the API token credential is valid and has sufficient permissions.
    • Confirm network connectivity and QingLong server availability.
    • Use only supported operations listed in the node’s properties.

Links and References

Discussion