# Remote Agent Logs and Diagnostics

This guide explains where to find Remote Agent logs and what diagnostic data is useful when troubleshooting polling, provisioning, API connectivity, or worker problems.

# Start with the Panel

In the EasyDCIM panel, open the Remote Agent details and check the summary widgets first.

Look for:

  • Remote Agent online/offline status,
  • polling freshness,
  • API status: API OK, API Slow, API Timeout, API Error,
  • polling execution time,
  • queue or worker warnings,
  • graph data freshness warnings.

This usually shows whether the problem is caused by connectivity, a slow API response, a stale polling cycle, or worker processing.

# Basic CLI Checks

Run these commands on the Remote Agent server:

easydcim-control agent status
easydcim-control agent logs -f

Use the status command to confirm that required services are running. Use the logs command while reproducing the issue.

# Application Logs

Remote Agent logs are stored in:

/opt/easydcim_remote/storage/logs/

Useful files include:

Log file pattern Purpose
laravel-YYYY-MM-DD.log General Remote Agent application errors.
polling-log-YYYY-MM-DD.log Main polling cycle logs and API request diagnostics.
polling-log-[DEVICE_ID]-YYYY-MM-DD.log Device-specific polling logs.
commander-YYYY-MM-DD.log Commands executed by the agent through its command layer.
os-installation-YYYY-MM-DD.log OS installation and provisioning logs.
download-files-YYYY-MM-DD.log OS image and installation file download logs.
dhcpd.log, dhcpd.err DHCP service logs.
tftpd.log, tftpd.err TFTP service logs.
apache.log Agent HTTP endpoint logs.
cron.log, cron.err, cron-jobs.log Scheduled task logs.

Examples:

ls -lah /opt/easydcim_remote/storage/logs/
tail -200 /opt/easydcim_remote/storage/logs/laravel-$(date +%F).log
tail -200 /opt/easydcim_remote/storage/logs/polling-log-$(date +%F).log

For one device:

tail -200 /opt/easydcim_remote/storage/logs/polling-log-[DEVICE_ID]-$(date +%F).log

# Queue and Worker Diagnostics

Polling and provisioning jobs are processed by queue workers.

Check Horizon status:

easydcim-control agent shell -- php artisan horizon:status
easydcim-control agent shell -- php artisan horizon:supervisors

The queue is unhealthy if supervisors are missing, stopped, or not processing expected queues.

Expected queue groups include:

  • easydcim-remote-queue,
  • easydcim-remote-polling-queue,
  • easydcim-remote-os-queue.

If the API is reachable but graph data is stale, always check the queue workers. The agent may be able to contact the master panel but still fail to process polling jobs.

# API Connectivity Diagnostics

If logs show API timeouts or HTTP errors, test the polling endpoint as described in Remote Agent Polling.

# Searching for Common Errors

Use these commands to find common problems quickly:

grep -R "cURL error 28\|API Timeout\|API Error" /opt/easydcim_remote/storage/logs/ | tail -50
grep -R "Allowed memory\|exhausted\|Worker exceeded memory\|Killed" /opt/easydcim_remote/storage/logs/ | tail -50
grep -R "SNMP\|Redfish\|timeout\|failed" /opt/easydcim_remote/storage/logs/polling-log-* | tail -50