caeops > logs
update-agent¶
Description¶
This command helps you update a running agent
that collect logs from any source (supported by CloudAEye) running on
a given cloud env (supported by CloudAEye) and ships them to the provided logs service endpoint
Run caeops logs update-agent --help
for more help.
Synopsis¶
update-agent
--service-name [value]
--cloud [value]
--source [value]
--app-name [value]
[--enable [value]]
[--kubernetes-cluster-name [value]]
[--kubernetes-enable-system-logs [value]]
Options¶
--service-name (string)
Name of the logs service
--cloud (string)
The type of cloud service providers. Supported providers : aws
--source (string)
The type of cloud source. Supported resources : kubernetes | docker
--app-name (string)
A representative name for the current app sending the logs
--enable (bool)
Determines whether to enable or disable the agent. Defaults to true
--kubernetes-cluster-name (string)
Name of the kubernetes cluster where the agent needs to run
--kubernetes-enable-system-logs (bool)
Determines whether or not to collect system level logs for the cluster
Examples¶
Example 1¶
- The following
logs update-agent
example generates commands to disable(turn off) an agent running on akubernetes
source onaws
cloud
caeops logs update-agent --service-name adidas1 --cloud aws --source kubernetes
--app-name "Test App" --kubernetes-cluster-name test-cluster
--enable false
Output¶
Instructions -> (string)
Step 1
------
Download the script to run the agent. (This script deploys a helm chart. Skip this step if the script is already downloaded)
wget -O aws_kubernetes_agent.py https://cae-data-collection-agent.s3.us-east-2.amazonaws.com/kubernetes/scripts/aws_kubernetes_agent.py
Do you want to execute the command ? (y/n)
Step 2
------
If no K8 agent is installed or active, run the below command to install a new K8 agent. (NOTE: If a K8 agent is already running for logs/metrics, skip this step and go to next step)
python3 aws_kubernetes_agent.py --helm-repo "https://cae-data-collection-agent.s3.us-east-2.amazonaws.com/kubernetes/helm/cae-k8-agent/charts" --enable-logs "yes" --k8-cluster-name "test-cluster" --k8-exclude-logs-from-namespace "cloudaeye" --k8-namespace "cloudaeye" --cloud-env "aws" --logs-destination "http" --destination-http-url "http://endpoint.com" --app-name "Test App" --app-key "TA" --user-key somekey --user-secret somesecret --agent-mode "create"
Do you want to execute the command ? (y/n)
If a K8 agent is already running, run the below command to update the existing K8 agent. (NOTE: Skip this step if a new agent was installed in previous step)
python3 aws_kubernetes_agent.py --helm-repo "https://cae-data-collection-agent.s3.us-east-2.amazonaws.com/kubernetes/helm/cae-k8-agent/charts" --enable-logs "yes" --k8-cluster-name "test-cluster" --k8-exclude-logs-from-namespace "cloudaeye" --k8-namespace "cloudaeye" --cloud-env "aws" --logs-destination "http" --destination-http-url "http://endpoint.com" --app-name "Test App" --app-key "TA" --user-key somekey --user-secret somesecret --agent-mode "update"