DocsDeployment & Installation > On-Prem Deployment & Installation > Deployment on Existing Kubernetes Cluster

vuHealthAgent – Python – 1.3.0 : AIX and Solaris Readme

Introduction

vuHealthAgent is a data collection agent used on systems running Solaris and AIX for

  1. Collection of system health metrics
  2. Node and Port heartbeat

The collected metrics and heartbeat data are sent to the vuSmartMaps data collection node or the shipper.

Pre-requisites

  1. vuHealthAgent needs python version 2.7 or higher. Ensure that a supported python version is installed on the system and is available to the user $PATH.
  2. A sudo user with elevated privilege or root user access is required to create startup scripts during installation.
  3. The agent does not need any superuser privileges for running.
  4. Firewalls, if any, should allow the outgoing TCP port of the vuSmartMaps Data collector/shipper from the node on which this agent is installed.

Firewall Requirements

The node on which the agent is installed should be allowed to connect to the vuSmartMaps data collector/shipper IP and TCP/UDP port configured for the agent.

The default ports on which data is sent are

  • TCP/UDP – 5090
  • Kafka – 9092

Supported OS

  • AIX – 7.1, 7.2, 7.3
  • Solaris – 11.2, 11.3, 11.4

Installation

  1. Extract the package and run the install script.

    tar -xvf vuhealthagent-python.tar

    ./install

  2. Choose the installation option:
    1. Select “1” to install the agent for the first time
    2. Select “2” to upgrade the agent. The upgrade option will only update the binaries and leave the configurations intact.
  3. Enter to accept the default directory. If you want the agent to be installed elsewhere, please specify the directory path.example,

    /home/$USER          – The installation will create vuHealthAgent directory inside /home/$USER/

    /home/$USER/agents  – The agents directory should exist in the system.

  4. The installation will ask to provide sudo access to create soft links for the startup script.Enter [y] to accept this and provide the root username and password to proceed with.If you don’t have sudo access enter ‘n’ and skip the above steps. But, you have to run these steps manually with sudo access.

Enabling services at startup manually

Login with sudo user or root user and run the below commands based on your os.

Solaris:

ln -s (VUHEALTHAGENT_HOME)/etc/init.d/vuhealthagent-boot /etc/rc3.d/S99vuhealthagent

ln -s (VUHEALTHAGENT_HOME)/etc/init.d/vuhealthagent-boot /etc/rc3.d/K99vuhealthagent

AIX:

ln -s (VUHEALTHAGENT_HOME)/etc/rc.d/init.d/vuhealthagent-boot /etc/rc.d/rc3.d/S99vuhealthagent

ln -s (VUHEALTHAGENT_HOME)/etc/rc.d/init.d/vuhealthagent-boot /etc/rc.d/rc3.d/K99vuhealthagent

Note: (VUHEALTHAGENT_HOME) is the directory where vuHealthAgent is installed.

Configuration

After the installation, the script will ask for the configuration of the installed agent. press y to configure the agent on the go or press n to skip the configuration and you have to manually configure it by updating (VUHEALTHAGENT_HOME)/conf.d/config.json

The configuration will update the following attributes:

  1. Shipper/Target IP  –  The remote vuSmartMaps system where the data is to be sent
  2. PROTOCOL  –  The protocol to be used to communicate to the remote machine.We support the below output channels:
    1. Kafka
    2. TCP
    3. UDP
  3. PORT  –  The port on which the agent has to be connected on the vuSmartMaps collector.
  4. INTERVAL  –  The frequency of data collection.
  5. TOPIC   –  The topic name where we have to send the data in case of Kafka protocol.

Note: A general assumption is agents are installed with the knowledge of the exact collection method and listening port setup at the vuSmartMaps end. If this information is not yet known, contact Vunet support.

Understand the  config.json

Common Options

  1. tenant_id => Tenant ID. This is an id given to identify a unique organization/installation in a multi-tenant environment. Please set it to “1” if this installation is not part of a multi-tenant vuSmartMaps setup.
  2. bu_id => Bu ID. This is an ID to identify a sub-organization within a main organization/installation in a multi-tenant environment. Please set it to “1” if this installation is not part of a multi-tenant vuSmartMaps setup.
  3. remote_ip => The remote host to which the collected data would send using TCP/UDP.
  4. remote_port => The remote host TCP/UDP port which would receive this data.

Heartbeat Block

This part of the configuration contains options to configure targets and ports to determine a given service availability using periodic heartbeat.

The agent supports service heartbeat only.

List of dictionary blocks, each containing the following mandatory fields:

  1. name => Unique name to identify the heartbeat configuration group
  2. hosts => Comma separated list of hosts:port to send heartbeat packets to. (example 10.1.1.1:443)
  3. interval => Heartbeat interval in seconds

Sample Heartbeat Block:

“heartbeat”: [

    {

        “name”: “Heartbeat”,

        “hosts”: 

            [ 

              “www.vunetsystems.com:80”,

              “www.vunetsystems.com:443”,

              “127.0.0.1:1090”

            ],

        “interval”: 120

    }

   ],

Health Metrics Block

This part of the configuration is used to enable the list of system metrics to collect from the node. Each block will contain the following mandatory fields. Multiple blocks can be created with varying collection intervals as required.

  1. name => Unique name to identify the health collection group.
  2. interval => Health collection interval in seconds
  3. modules => Health modules whose state needs to be collected as part of the health collection schedule

Currently, supported modules are:

  1. load
  2. socket
  3. core
  4. cpu
  5. process
  6. memory
  7. disk
  8. diskio
  9. network
  10. ohs
  11. zones
  12. kernelstats
  13. asset
  14. uptime

Sample Health Metrics Block:

“health”: [

        {

        “name”: “Health collection”,

        “interval”: 180,

        “modules”:

            [

              “load”,

              “socket”,

              “core”,

              “cpu”,

              “process”,

              “memory”,

              “disk”,

              “diskio”, 

              “network”

            ]

        }

   ],

Additional Health Metrics Configuration

OHS monitoring

OHS metrics can be collected through the following mechanisms

  1. server-status page
  2. DMS

Configuration

“ohs_config”:
{
“ipaddress”: “127.0.0.1”,
“module”: “dms”,
“port”: “7777”,
“is_SSL_enabled”: “no”
}

ipaddress            –  The ip address on which OHS publishes status metrics

module                  –  The module used to publish the OHS status metrics 

                                       dms/server-status 

port                          – The port on which the OHS listens

is_SSL_enabled  – Is OHS running or https/http. Mark it yes/no

Note: Refer to the reference configurations available along with the agent package.

process_top_n

These options allow you to filter out all processes that are not in the top N by CPU or memory, in order to reduce the number of documents created.

Configuration

“process_top_n”:
{
“by_cpu”: 0,
“by_mem”: 0
}

If both the `by_cpu` and `by_mem` options are used, the union of the two sets is included.

by_cpu   – How many processes to include from the top by CPU. The processes are sorted by the `system.process.cpu.total.pct` field.

by_mem   – How many processes to include from the top by memory. The processes are sorted by the `system.process.memory.rss.bytes` field.

Command Block

This part of the configuration is used to execute commands on the target server and collect metrics. Each block will contain the following mandatory fields. Multiple blocks can be created with varying collection intervals as required.

  • name => Unique name to identify the health collection group.
  • interval => Health collection interval in seconds
  • modules => Health modules whose state needs to be collected as part of the health collection schedule

Following optional fields are also supported:

  • collect_output => Boolean field (true/false) indicating if we need just to collect the output of the command ‘cmd.’  If set to ‘true’, the output of the ‘cmd’ in a field name ‘stdout’

Sample Command Block:

 “command”: [

         {

             “name”: “file-listing”,

    “cmd” : “cd /tmp; ls -lrt”,

    “collect_output”: true,

    “interval”: 60

}

   ]

Note:

  1. The default configuration enables load, socket, core, cpu, process, memory, disk, diskio, uptime, and network.
  2. Refer to the sample configurations available /reference-confs to configure the heartbeat block. We have to manually configure the heartbeat block.
  3. Refer to the sample configurations available /reference-confs to configure the command block. We have to manually configure the command block.

Reference Configuration

{
“tenant_id”: 1,
“bu_id”: 1,
“remote_ip”: “TARGET_IP”,
“remote_port”: 9092,
“protocol”: “PROTOCOL”,
“kafka”:
{
“topic”: “TOPIC”,
“compression_type”: “gzip”,
“acks”: 1
},
“vulogagent_monitor”: “no”,
“vulogagent_path”: “/path/to/vulogagent”,
“vulogagent_restart_interval”: 0,
“health”: [
{
“name”: “Health collection”,
“interval”: 180,
“modules”:
[
“load”,
“socket”,
“core”,
“cpu”,
“process”,
“memory”,
“disk”,
“diskio”,
“network”,
“uptime”,
“ohs”
]
}
],
“ohs_config”:
{
“ipaddress”: “127.0.0.1”,
“module”: “dms”,
“port”: “7777”,
“is_SSL_enabled”: “no”
},
“process_top_n”:
{
“by_cpu”: 0,
“by_mem”: 0
},
“heartbeat”: [
{
“name”: “Heartbeat”,
“hosts”:
[
“www.google.com:80”,
“www.google.com:888”,
“10.0.3.1:9999”
],
“interval”: 120
}
],
“command”: [
{
“name”: “Testing”,
“cmd” : “cd /tmp; ls -lrt”,
“collect_cmd_output”: true,
“interval”: 60
}
]
}

Logging

Logs are written to (VUHEALTHAGENT_HOME)/log/vuhealthagent.log by default.

The default log level is DEBUG. This can be changed in

(VUHEALTHAGENT_HOME)/conf.d/logging.conf

Managing vuHealthAgent Service

Solaris:

(VUHEALTHAGENT_HOME)/etc/init.d/vuhealthagent start

(VUHEALTHAGENT_HOME)/etc/init.d/vuhealthagent stop

(VUHEALTHAGENT_HOME)/etc/init.d/vuhealthagent status

AIX:

(VUHEALTHAGENT_HOME)/etc/rc.d/init.d/vuhealthagent start

(VUHEALTHAGENT_HOME)/etc/rc.d/init.d/vuhealthagent stop

(VUHEALTHAGENT_HOME)/etc/rc.d/init.d/vuhealthagent status

Know the Version

/path/to/service/vuhealthagent version

Uninstall

The vuHealthAgent package comes with an uninstall script to uninstall.

To uninstall, simply go to the extracted setup directory and run

./uninstall

Uninstallation is then complete.

Resources

Browse through our resources to learn how you can accelerate digital transformation within your organisation.

Quick Links

VuNet Secures Rs. 60 Crore in Series B Funding