Viewing Pulsar Functions Status and Configuration using pulsarctl
Even if you don’t have access to the StreamNative UI to view logs, there are some pulsarctl commands that can show you status and statistics about your Pulsar Functions.
To view the status of your Pulsar Function, use functions status:
pulsarctl functions status --tenant summitstudent1 --namespace developer --name Story1
{
"numInstances": 1,
"numRunning": 1,
"instances": [
{
"instanceId": 0,
"status": {
"running": true,
"error": "",
"numRestarts": 0,
"numReceived": 2,
"numSuccessfullyProcessed": 2,
"numUserExceptions": 0,
"latestUserExceptions": [],
"numSystemExceptions": 0,
"latestSystemExceptions": [],
"averageLatency": 14793.160796165466,
"lastInvocationTime": 1729532641155,
"workerId": "train"
}
}
]
}
To check the configuration of your Pulsar Function, use functions get:
pulsarctl functions get --tenant summitstudent1 --namespace developer --name Story1
{
"cleanupSubscription": true,
"retainOrdering": false,
"retainKeyOrdering": false,
"forwardSourceMessageProperty": true,
"autoAck": true,
"parallelism": 1,
"output": "summitstudent1/developer/storyoutput1",
"producerConfig": {
"maxPendingMessages": 0,
"maxPendingMessagesAcrossPartitions": 0,
"useThreadLocalProducers": false,
"cryptoConfig": null,
"batchBuilder": "",
"compressionType": ""
},
"processingGuarantees": "ATLEAST_ONCE",
"runtime": "PYTHON",
"py": "function://summitstudent1/developer/Story1",
"tenant": "summitstudent1",
"namespace": "developer",
"name": "Story1",
"className": "pythonexamples.StreamMeAStory",
"resources": {
"cpu": 0.5,
"disk": 10737418240,
"ram": 2147483648
},
"inputs": [
"summitstudent1/developer/storyinput1"
],
"userConfig": {
"output_topic_all_events": "summitstudent1/developer/storyoutputallevents"
},
"inputSpecs": {
"summitstudent1/developer/storyinput1": {}
},
"customRuntimeOptions": "{\"clusterName\":\"train\",\"inputTypeClassName\":\"[B\",\"outputTypeClassName\":\"[B\",\"maxReplicas\":0,\"managed\":true,\"serviceAccountName\":\"train-function-pulsarcluster\",\"runnerImage\":\"streamnative/pulsar-functions-pulsarctl-python-runner:3.3.1.8\",\"enableStateStore\":false,\"labels\":{\"cloud.streamnative.io/location\":\"us-central1\",\"cloud.streamnative.io/poolmember-name\":\"gcp-shared-usce1-snc\",\"cloud.streamnative.io/poolmember-namespace\":\"streamnative\",\"cloud.streamnative.io/pulsar-cluster\":\"train\",\"cloud.streamnative.io/pulsar-instance\":\"train\",\"cloud.streamnative.io/role\":\"pulsar-function\",\"istio.io/rev\":\"sn-stable\",\"service.istio.io/canonical-name\":\"pulsarcluster-train\",\"service.istio.io/canonical-revision\":\"3.2.1.1\"},\"annotations\":{\"cloud.streamnative.io/service-account.email\":\"summitstudent1@o-mj3r8.auth.streamnative.cloud\",\"compute.functionmesh.io/need-cleanup\":\"false\"}}",
"secrets": {
"BEDROCKSECRET": {
"key": "mysecret",
"path": "bedrocksecret"
}
},
"maxPendingAsyncRequests": 1000,
"exposePulsarAdminClientEnabled": false,
"skipToLatest": false,
"subscriptionPosition": "Latest"
}
