View agent status
Install and configure
snctl
as described in Set up client tools so the commands below can authenticate to your organization.snctl agents status
with the agent’s tenant, namespace, and name to fetch its current state:
running
: Confirms the runtime loop is healthy. Afalse
value indicates the instance stopped and requires attention.numRestarts
: Counts automatic restarts. Frequent restarts suggest initialization errors or crashes.numUserExceptions
andlatestUserExceptions
: Surface issues thrown by your agent code.numSystemExceptions
andlatestSystemExceptions
: Capture platform-level errors such as connectivity or serialization problems.averageLatency
andlastInvocationTime
: Help validate that requests are being processed on schedule.
snctl agents restart
or snctl agents trigger
(when supported) to validate fixes before returning agents to production traffic.
Inspect logs and exceptions in StreamNative Cloud Console
The StreamNative Cloud Console provides a real-time view of agent activity.- Log in to StreamNative Cloud Console.
- In the left navigation, open Agents panel.
- Select the agent you deployed to open its detail page. Review the status metrics for quick health insight.
- Switch to the Logs tab for streaming log output.
View the agent logs using snctl
This section describes how to view agent logs using snctl
.
This example assumes you have installed snctl and initialized snctl configurations.
snctl logs
command to view logs for a specific agent. This table outlines the configuration options that are used for viewing agent logs. For details about all supported fields, you can use the snctl logs -h
command to list more information.
Option | Descriptions |
---|---|
-c or --cluster | The name of your Pulsar cluster where the agent is created. |
-p or --component | The type of component to monitor. Available options are function , sink , source , ‘kafka-connect’ and ‘agent-function’. |
-f or --follow | Continuously list the agent log history. |
-h or --help | Show usage information about the snctl logs command. |
-i or --instance | The name of your Pulsar instance where the agent is created. |
--name | The name of your agent. |
-o or --organization | The name of your organization where the agent is created. |
--previous | Print the logs that are generated before the configured timestamp. |
--pulsar-tenant | The name of your Pulsar tenant where the agent is created. |
--pulsar-namespace | The name of your Pulsar namespace where the agent is created. |
--since | List logs more recent than the specific time. Available units are second , minute , and hour , such as 24h . |
-s or --size | Specify how many lines of recent logs to display. |
--timestamp | Include timestamps on each line in the log output. |
agent-func
agent’s logs within the last 5 hours.