IBM Cloud Docs
Managing the IBM Cloud Monitoring Linux agent on a PowerVS workspace

Managing the IBM Cloud Monitoring Linux agent on a PowerVS workspace

After you provision an instance of the IBM Cloud® Monitoring service in the IBM Cloud, you can deploy the Monitoring agent on your Linux hosts on a PowerVS workspace to automatically collect data and metrics. You can configure which metrics to monitor in each environment.

For information on the available metrics, see Metrics available in Monitor Light

IBM Cloud Monitoring provides the following features to protect your standalone Linux hosts on a PowerVS workspace:

  • Optimize resource utilization by understanding the capacity of the host and sizing workloads accordingly.

  • Reduce risk by leveraging flexible permission management with IBM Cloud IAM and custom roles.

  • Start with the available default dashboards and alerts.

Deploying the agent

  1. Obtain the access key. For more information, see Getting the access key.

  2. Obtain the public or private ingestion URL. For more information, see Collector endpoints.

  3. Make sure dkms is installed:

    For RHEL or CentOS, run the following commands:

    sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
    
    sudo yum install dkms
    
  4. Install the kernel headers. When you install an IBM Cloud Monitoring agent, the agent uses kernel header files.

    For RHEL or CentOS, run the following command:

    sudo yum -y install kernel-devel-$(uname -r)
    
  5. Trust the GPG key and configure the yum repository.

    For RHEL or CentOS, run the following commands:

    sudo rpm --import https://download.sysdig.com/DRAIOS-GPG-KEY.public 
    
    sudo curl -s -o /etc/yum.repos.d/draios.repo https://download.sysdig.com/stable/rpm/draios.repo
    
  6. Install, configure, and restart the IBM Cloud Monitoring agent by running the following commands.

    For RHEL or CentOS, run the following commands.

    • To install the agent package, run:

      sudo yum -y install draios-agent 
      
    • To add the collector endpoint and the access key, run:

      echo customerid: ACCESS_KEY >> /opt/draios/etc/dragent.yaml
      
      echo collector: COLLECTOR_URL >> /opt/draios/etc/dragent.yaml
      
      echo feature: >> /opt/draios/etc/dragent.yaml
      
      echo "  mode: monitor_light" >> /opt/draios/etc/dragent.yaml
      
      sudo systemctl enable dragent 
      
      sudo systemctl start dragent
      

Wait a few seconds to make sure the agent is started and has access to the IBM Cloud Monitoring data sources. From the IBM Cloud Monitoring UI you can use Integrations > Data Sources >> Sysdig Agents to verify that the agent is conencted correctly.

You can find more details about the configuration for the Monitoring agent here..

Updating the agent

Run the following commands to update an IBM Cloud Monitoring agent on Linux on a PowerVS workspace.

sudo yum clean expire-cache
sudo yum -y install draios-agent

Troubleshooting the agent

To see the latest IBM Cloud Monitoring agent logs, go to the /opt/draios/logs directory and review the draios.log file.

To look for errors, you can run the following command:

grep -i error /opt/draios/logs/draios.log