Debug Status: {if @agent_token.allow_remote_debug, do: "Enabled ✓", else: "Disabled"}
<%= if @agent_token.allow_remote_debug do %> Verbose logging is enabled. All SNMP data and agent messages are being logged. <% else %> Verbose logging is disabled. Enable it in the agent edit page to troubleshoot issues. <% end %>
Production (kubectl):
kubectl logs -n towerops deployment/towerops --tail=100 | grep "agent_token_id: {@agent_token.id}"
Development (tail):
tail -f _build/dev/lib/towerops/priv/log/dev.log | grep "{@agent_token.id}"
What Gets Logged:
Status
<% {status, label} = agent_status(@agent_token) %>Device
{length(@polling_targets)}
{@direct_assignments} direct
Last Seen
<.timestamp datetime={@agent_token.last_seen_at} timezone={@timezone} />
<%= if @agent_token.last_seen_at do %><.timestamp datetime={@agent_token.last_seen_at} timezone={@timezone} />
<% end %> <%= if @agent_token.last_ip do %>{@agent_token.last_ip}
<% end %>Uptime
<%= if @agent_token.metadata["uptime_seconds"] do %>{format_uptime(@agent_token.metadata["uptime_seconds"])}
<% else %>Unknown
<% end %>Device that this agent is responsible for polling
This agent is not currently polling any device.
{device.name}
<% {source, source_label} = assignment_source(device, @agent_token.id) %> {source_label}