IBM Support

Instana Host Agent - How to?

How To


Summary

Instana provides observability for the full stack of IT infrastructure, platform services, and applications in a fast-changing and complex enterprise environment with comprehensive analysis.

Steps

General Overview of Instana Host Agents


Instana Web UI provides a specific view for Monitoring deployed Instana Host Agents. To access the overview dashboard of your Instana Host Agents, click More -> Agents in the left navigation bar of Instana Web UI.

General Overview of Instana Host Agents

In the Agents overview, there are three main sections:

  1. Total Agents widget, which shows the total number of Instana Host Agents connected. It also shows reporting and not reporting agents.

  2. In the Reporting Agents widget, you are able to see the type and how many Instana Host Agents are connected to the current Instana Backend. There are three different modes that you can deploy and run your Instana Host Agent as:

    • APM mode: it is the default mode for Agents, which collects metrics and traces.
    • Infrastructure mode: the Agent collects only the metrics data, not the application traces.
    • Disabled mode (OFF mode): the Agent stops Monitoring but only reports to the Instana backend periodically in an idle state.
  3. Agent Details widget shows detailed information for each of the Instana Host Agents including:

    • The fully qualified domain name of the host where the agent is deployed.
    • The agent version.
    • The agent installation.
    • The agent update mode.
    • The agent log level.
    • The agent JVM name and version.
    • The agent status and other information.

    Click on a specific Agent to enter the Instana Host Agent management page to view more detailed information and manage the Instana Host Agent operations.

Important

Any Instana Host Agent that you deploy on the infrastructure on which you installed Instana for Instana self-monitoring purposes must be deployed in Infrastructure mode.

Instana Host Agent Management Page


1. Managing Instana Host Agent

  1. Change Mode. Instana Host Agent mode can be switched. Refer to the specific mode information.

    Change agent mode

  2. Change Log Level. The default log file for Instana Agent can be found at<instana-agent-dir>/data/log/agent.log and the log level can be changed in two ways:

    1. Through the command line, changing the profile in <instana-agent-dir>/etc/org.ops4j.pax.logging.cfg
      log4j2.logger.instana.level=INFO
      log4j2.logger.instana.level=DEBUG
      
    2. Through the Instana Agent Management interface:

      Change Log Level

      By changing the Log Level from "INFO" to "DEBUG", more details logs are displayed in real-time Agent. The Logs are output at the end of the Agent Management screen.

      Log output

      Note:

      Changing the log level here takes effect for only 5 minutes. The log level will automatically switch back to the INFO level after the time frame of 5 minutes.

    3. Update/Reset/Reboot Agent

      • Update the Agent: Manually trigger the dynamic update of the Agent (dynamic update of the Agent needs to be used in an online environment or an on-prem environment with a configured repo).
      • Reset the Agent: the Agent still uses the current process (pid doesn't change).
      • Reboot the Agent: the current agent process is stopped. A new agent process is created.

2. Info(Sensors info)

Info

The Info section allows the user to view information about the sensors currently loaded by the Agent. The information includes attribute details such as name, version, and status. The Agent's log can also be downloaded in this section.

3. Monitoring Issues

Monitoring issue

Here is a list of the problems encountered by the current Agent when Monitoring specific technology stacks. For example, the present Agent cannot collect metrics from the Redis server because the CONFIG command is disabled in the Redis.conf file when Monitoring Redis.

Click the corresponding "Troubleshooting docs" to jump to the specific solution, the user can refer to the specific steps in the solution to configure the corresponding component to resolve the issue.

The user can also enter the Event view through the Event icon in the left navigation bar of the Instana web UI. The Monitoring Issues tab summarizes the Monitoring issues of all Agents, and the solution for these Monitoring issues is the same.

Events - monitoring issues

4. Agent resource consumption and performance metrics

The management view of the Agent lists information like the detailed resource consumption and the performance metrics for the current Agent. These metrics are CPU Load, JVM Memory, System Memory, GC, Open Files, Network, Discovery time, Sensor time, and the current running status and resource consumption of the Agent.

The following is a brief explanation of some of the standard metrics.

Agent resources

  1. CPU Load shows the CPU consumption of the Instana Agent. For example, the graph shows Load 0.19, meaning the Agent's CPU consumption is 0.19 CPU. If the user monitors the Agent's CPU consumption and triggers the event alarm, the user can refer to the next section to set it.

  2. JVM Memory shows Instana Agent's own JVM memory usage, including in-heap memory, out-of-heap memory, and direct buffers.

  3. System Memory shows, from the system perspective, the amount of memory used by the Instana Agent, which includes virtual, real, and shared memory. The next section shows how to limit the Agent's use of system memory.

Instana Agent resource usage limit


Instana Agent runs on the monitored node to collect information and send it to Instana Backend for storage and analysis. By default, the Instana Agent takes up only a small amount of system resources, and there is no need to impose special restrictions on the Instana Agent's resource usage.

However, in some unique usage scenarios, the CPU and memory usage of the Instana Agent can be restricted by the following methods. These scenarios can be a customer's critical production machine, or if the monitored node has limited resources or needs to share system resources with other services.

Note

Usually, the Instana Agent might take longer to start after the memory limit is imposed while the memory requirement is less after the Agent starts up.

1. Linux environments

To limit the Instana Agent resource usage in Linux environments, the systemd management system service is used by default.

  1. Create an Instana resource limit profile

    touch /etc/systemd/system/instana-agent.service.d/20-resource_limits.conf
    
  2. Configure the following to 20-resource_limits.conf

    [Service]
    CPUAccounting=true
    CPUQuota=50%
    MemoryAccounting=true
    MemoryMax=512M
    
  3. Reload the configurations file

    systemctl daemon-reload
    
  4. Restart the Instana Agent service

    systemctl restart instana-agent.service
    

2. Kubernetes environments

In a Kubernetes environment, the Instana Agent runs as a Daemon-set on each worker node of the cluster. Modify the YAML configuration file of Instana Agent, add the following parameters, and reapply it to the cluster.

resources:
 requests:
  memory: "512Mi"
  cpu: 0.5
 limits:
  memory: "768Mi"
  cpu: 1.5

Set up Instana Agent resource usage alerts

In addition to limiting the resource usage of Instana Agent, the user can define the Events based on Instana Agent resource usage with the help of Instana's Event mechanism.


For example, let's create an alert for the customized CPU consumption of the Instana Agent.

Click "Settings" -> "Events" -> "Create A New Event" in the left navigation bar of the Instana web UI.

Agent resource usage alerts

According to the previous diagram, the event is triggered when the CPU Load of Instana Agent is greater than or equal to 0.4 CPU consumption for 10s. It is displayed in the Events view of the Instana web UI.

Docker runtime logs


To switch on the tracing and logging for the Instana Agent, add this snippet to the agent configuration file.

# Enable Docker logs collection
com.instana.plugin.docker:
  logs:
    enabled: true

Restart the Instana Agent service to refresh the changes.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSE1JP5","label":"IBM Instana Observability"},"ARM Category":[{"code":"a8m3p000000hBgWAAU","label":"OnPrem"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
22 June 2023

UID

ibm16995855