Unit Platform Cloud Agent advanced options (Linux)

How the agent works

The Cloud Agent is installed as a service, and can be started/stopped/restarted using the init script.

For Cloud Agent version 6.1 and newer:

# stopping the agent
/etc/init.d/unit-platform-cloud-agent stop

# starting the agent
/etc/init.d/unit-platform-cloud-agent start 

# restarting the agent 
/etc/init.d/unit-platform-cloud-agent restart

For previous versions:

# stopping the agent
/etc/init.d/unit_cloud_agent stop

# starting the agent
/etc/init.d/unit_cloud_agent start

# restarting the agent
/etc/init.d/unit_cloud_agent restart

To check if the agent is running, execute:

For Cloud Agent version 6.1 and newer:

/etc/init.d/unit-platform-cloud-agent status

For previous versions:

/etc/init.d/unit_cloud_agent status

The installation directory is at: /opt/Netwall/CloudAgent/. The config/ directory stores all configuration files.

The log files for version  6.1+ are located at  /var/log/unit-platform-cloud-agent/. On older versions, the logs are stored at /var/log/unit_cloud_agent.log.

Auto update

From the version 6.1 onwards, Unit Platform Cloud Agent comes with and additional service, responsible for updating the agent’s files. The updates are downloaded directly form the Unit Platform.

The update service can be managed using the following commands:

# stopping the update service 
/etc/init.d/unit-platform-cloud-agent-update stop 

# starting the update service
/etc/init.d/unit-platform-cloud-agent-update start 

# restarting the update service
/etc/init.d/unit-platform-cloud-agent-update restart

# checking status 
/etc/init.d/unit-platform-cloud-agent-update status

The updates are enabled by default. If you don’t want the agent to update, simply stop the service and configure the update service to not start at boot using either chkconfig unit-platform-cloud-agent-update off or update-rc.d unit-platform-cloud-agent-update disable depending on your distro.

Customizing the configuration

The main configuration file is specified at config/agent.conf. In this file you can change the following items:

  • Enable/disable sending monitoring information.
  • Enable/disable sending inventory information.
  • Change the interval on which the agent will send monitoring or inventory information to Unit Platform.
  • Change the company key.
  • Change the address the agent will send information to. Default: app.unitplatform.io. Change this only if you are using Unit Platform on-premises.
  • Configure the data collection timeout value.
  • Enable/disable showing more detailed debug messages in the log file.

IMPORTANT: after making any changes in the agent.conf file, restart the agent service for the changes to take effect

Monitoramento de processos

To monitor processes, inform in the file process.conf the names of the processes that should be monitored. The names must be listed one per line. See the example below:

httpd
sshd
mysqld

The processes are monitored using the command ps -C "[proc]", verify if your process can be monitored using this command.

IMPORTANT: after making any changes in the process.conf file, restart the agent service for the changes to take effect

Troubleshooting

These are the most common problems that may prevent the agent from sending information to the Unit Platform:

The device does not have internet access

The device being monitored must have access to the Unit Platform using HTTPS. By default the address the agent will send information to is https://app.unitplatform.io/. Please check if there are any firewall rules denying access to the internet or the Unit Platform.

The agent’s service is not running

The agent’s service is configured to stop in case one of the following situations happen:

  • The company key was not informed or is invalid.

To correct this error, edit the agent.conf, inform the your company key and restart the agent.

  • The monitoring/inventory interval is invalid.

To correct this error, edit the agent.conf, review the interval values and restart the agent.

  • The agent was installed on a distribution not supported.

Check if your distribution is listed as supported. If your distribution is on the supported list, contact us using the support link in the menu above.

  • Some prerequisite was not installed correctly.

Check if all the prerequisites were installed. If the error persists, execute the ldd command to check if there are any non mapped dependencies:

ldd /opt/Netwall/CloudAgent/bin/UnitPlatformCloudAgent_x64

If any lib has the “not found” status, contact us using the support link in the menu above.

The device limit for your plan has been exceeded

In this case, revise your Unit Platform subscription and restart the agent.