SignalFx Smart Agent commands reference π
This topic provides commonly used commands for the Smart Agent.
Note
The SignalFx Smart Agent has reached End of Support. While the agent can capture and export telemetry to Splunk Observability Cloud, Splunk no longer provides any support, feature updates, security, or bug fixes. Such requests are not bound by any SLAs.
To see commonly used commands for the Splunk Distribution of OpenTelemetry Collector, see Collector for Kubernetes commands reference.
The standard ports for the Smart Agent are 9080 and 8095. The default configuration is stored in /etc/signalfx/agent.yaml.
Note
When you deploy the agent as a DaemonSet on Kubernetes clusters, the agent configuration is managed by the ConfigMap of the agent.
The following table lists all the commands and their usage in context of the Smart Agent. Click a command for a more detailed description and syntax examples.
Command |
Usage |
---|---|
Delete the Smart Agent Helm chart repository |
|
Deploy the Smart Agent Helm chart repository |
|
Add the Smart Agent Helm chart repository |
|
Update the Smart Agent Helm chart repository |
|
Check the agent logs on the host |
|
Modify Kubernetes configurations |
|
Create a Kubernetes resource |
|
Delete a Kubernetes resource |
|
Check Kubernetes system configurations |
|
Edit a Kubernetes resource |
|
Execute a command in a Kubernetes container |
|
Display one or many resources running on Kubernetes |
|
Check logs in a Kubernetes container |
|
Restart the agent on the host |
|
Start the agent on the host |
|
Check the status of the agent on the host |
|
Check the endpoints set on the agent |
|
Stop the agent on the host |
|
Tail metric data points being sent to the host |
helm delete π
Description π
Delete the Smart Agent Helm chart repository.
Syntax π
helm delete signalfx-agent
helm install π
Description π
Deploy the Smart Agent Helm chart repository.
Syntax π
helm install \
--set signalFxAccessToken=$ACCESS_TOKEN \
--set clusterName=<MY-CLUSTER> \
--set kubeletAPI.url=https://localhost:10250 \
--set signalFxRealm=$REALM \
--set traceEndpointUrl=https://ingest.$REALM.signalfx.com/v2/trace \
--set gatherDockerMetrics=false \
signalfx-agent signalfx/signalfx-agent \
-f ~/workshop/k3s/values.yaml
helm repo add π
Description π
Add the Smart Agent Helm chart repository.
Syntax π
helm repo add signalfx https://dl.signalfx.com/helm-repo
# Use these two commands together to add and update the repository at the same time
helm repo add signalfx https://dl.signalfx.com/helm-repo && helm repo update
helm repo update π
Description π
Update the Smart Agent Helm chart repository.
Syntax π
helm repo update https://dl.signalfx.com/helm-repo
journalctl π
Description π
Check the agent logs on the host.
Syntax π
journalctl -u signalfx-agent | tail -f
tail -f /var/log/signalfx-agent.log
Optional arguments π
Argument |
Description |
---|---|
|
Show messages for the specified systemd unit UNIT (such as a service unit), or for any of the units matched by PATTERN |
|
Display the last part of a file. The |
kubectl config π
Description π
Modify Kubernetes configurations using subcommands. See the Kubectl Reference Documentation for a full list of subcommands and optional arguments.
Syntax π
kubectl config [subcommand]
# Examples
# Show kubeconfig settings
kubectl config view
# Save namespace for all subsequent kubectl commands in context
kubectl config set-context --current --namespace=ggckad-s2
# Get the password for the e2e user
kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}'
# Display the first user
kubectl config view -o jsonpath='{.users[].name}'
# Get a list of users
kubectl config view -o jsonpath='{.users[*].name}'
# Display list of contexts
kubectl config get-contexts
# Display the current-context
kubectl config current-context
# Set the default context to my-cluster-name
kubectl config use-context my-cluster-name
# Add a new user to your kubeconfig that supports basic authorization
kubectl config set-credentials kubeuser/foo.kubernetes.com --username=kubeuser --password=kubepassword
# Set a context utilizing a specific username and namespace
kubectl config set-context gce --user=cluster-admin --namespace=foo \ && kubectl config use-context gce
kubectl create π
Description π
Create a resource from a file. Accepted file formats are JSON and YAML. See the Kubectl Reference Documentation for a full list of subcommands and optional arguments.
Syntax π
sudo kubectl create -f <file-name>
# Examples
# Use the subcommand configmap to create a ConfigMap from a source file
sudo kubectl create configmap <map-name> --from-file=<file path>
Optional arguments π
Argument |
Description |
---|---|
|
The source file to create a resource |
|
Path to the source file to create a ConfigMap |
|
Name of the ConfigMap |
kubectl delete π
Description π
Delete a resource from a source file. See the Kubectl Reference Documentation for a full list of subcommands and optional arguments.
Syntax π
sudo kubectl delete -f <file-name>
Optional arguments π
Argument |
Description |
---|---|
|
The source file to delete a resource |
kubectl describe π
Description π
Check Kubernetes system configurations.
Syntax π
kubectl describe -n <namepsace> pod <pod-name>
Optional arguments π
Argument |
Description |
---|---|
|
Namespace to check the configurations |
|
Pod to check the configurations |
kubectl edit π
Description π
Edit a resource running on a Kubernetes container.
Syntax π
kubectl edit cm <name>
kubectl edit ds <name>
Optional arguments π
Argument |
Description |
---|---|
|
Specify the item you want to modify is a ConfigMap |
|
Specify the item you want to modify is a DaemonSet |
|
Name of the resource you want to modify |
kubectl exec π
Description π
Execute a command in a Kubernetes container.
Syntax π
kubectl exec <signalfx-agent-PODNAME> -- signalfx-agent status
Optional arguments π
Argument |
Description |
---|---|
|
Name of the pod |
|
Check the status of the agent |
kubectl get π
Description π
Display one or many resources running on Kubernetes.
Syntax π
kubectl get pods -n <namespace>
kubectl get configmap
kubectl get ds
Optional arguments π
Argument |
Description |
---|---|
|
Display the ConfigMap |
|
Display the DaemonSet |
|
Namespace |
|
List all pods in process status output format |
kubectl logs π
Description π
Check logs in a Kubernetes container.
Syntax π
sudo kubectl logs <pod-name | type/name> -l <label> -f -c <container-name>
# Examples
# Return snapshot logs from pod nginx with only one container
kubectl logs nginx
# Return snapshot logs from pod nginx with multiple containers
kubectl logs nginx --all-containers=true
# Return snapshot logs from all containers in pods defined by label app=nginx
kubectl logs -l app=nginx --all-containers=true
# Return snapshot of previous terminated ruby container logs from pod web-1
kubectl logs web-1 -p -c ruby
# Begin streaming the logs of the ruby container in pod web-1
kubectl logs web-1 -f -c ruby
# Begin streaming the logs from all containers in pods defined by label app=nginx
kubectl logs -f -l app=nginx --all-containers=true
# Display only the most recent 20 lines of output in pod nginx
kubectl logs nginx --tail=20
# Show all logs from pod nginx written in the last hour
kubectl logs nginx --since=1h
# Show logs from a kubelet with an expired serving certificate
kubectl logs nginx --insecure-skip-tls-verify-backend
# Return snapshot logs from first container of a job named hello
kubectl logs job/hello
# Return snapshot logs from container nginx-1 of a deployment named nginx
kubectl logs deployment/nginx -c nginx-1
Optional arguments π
Argument |
Description |
---|---|
|
If true, get all containersβ logs in the pod(s). Default value is |
|
The container where the logs are displayed from |
|
Show new log entries as they are added |
|
Skip verifying the identity of the kubelet that logs are requested from. Use this when you want to get logs from a kubelet with an expired serving certificate |
|
A label to filter on |
|
If true, show the logs for the previous instance of the container in a pod if it exists. Default value is |
|
Get only the latest logs within the specified time duration |
|
Number of most recent log lines to show |
restart π
Description π
Restart the agent on the host.
Syntax π
sudo systemctl restart signalfx-agent
start π
Description π
Start the agent on the host.
Syntax π
sudo systemctl start signalfx-agent
status π
Description π
Check the status of the agent on the host.
Syntax π
sudo signalfx-agent status
service signalfx-agent status
systemctl signalfx-agent status
status endpoints π
Description π
Check the endpoints set on the agent.
Syntax π
signalfx-agent status endpoints
stop π
Description π
Stop the agent on the host.
Syntax π
sudo systemctl stop signalfx-agent
tap-dps π
Description π
Tail metric data points being sent to the host.
Syntax π
signalfx-agent tap-dps -h
signalfx-agent tap-dps -metric 'jenkins_*'
Optional arguments π
Argument |
Description |
---|---|
|
Get more information about the command |
|
Description here |