Asset Intelligence and Management

AssetSonar Blogs Assetsonar Agent For Linux Devices 8b5d504be4cb

[How-To] Install the AssetSonar Agent in Your Linux Devices

[How-To] Install the AssetSonar Agent in your Linux Devices

Linux is an increasingly critical operating system in the business world. It’s use is accelerating due to increased cloud spending, the proliferation of IoT, and its open-source nature and adoption by large players in the OS market. According to ZDNet, 84% of enterprise businesses now run on Linux.

Being high-performance, Linux devices are often managed separately from the rest of the IT infrastructure on cron. This approach leads to a lack of centralized device management.

Your Linux computers and their users are not connected to other devices — Windows and Macs — in your organization. It also means restricted access and less control by IT Admins over the Linux devices. Reporting on Linux-based assets becomes a challenge.

AssetSonar offers a pre-configured Agent that you can install in your Linux devices for centralized device management. It gives you the ability to manage and report on the configuration, custody, and maintenance status of your Linux devices from a single space.

In this article, we outline how you can install the AssetSonar Agent in your Linux devices and keep tabs on their use across the organization.

1. Before you begin

You will need the following to successfully install and run the AssetSonar Agent on your Linux devices:

  • An active AssetSonar (subscription/trial) account. If you don’t have a subscription or trial account, register here.
  • A Debian/RHEL-based Linux PC with distributions including but not limited to the following: Ubuntu, Kali, Manjora, CentOS, Fedora, Debian, Rocky.
  • Pre-configured AssetSonar Agent package. This consists of a tar.gz file and a bash script “install.sh” configured with your company tag that installs the tar.gz file. You can get it from us at support@ezo.io.

Note: If you want to install the Agent for other versions of the Linux OS, send us an email at support@ezo.io. We’ll have a pre-configured Agent ready for you.

For a seamless installation process, it is recommended that you restart your PC before installing the AssetSonar Agent.

2. Installing the Linux Agent

Let’s begin with installing the Agent on your Linux device. Follow these steps:

  1. Download the AssetSonar Agent package you just got from us on your computer’s desktop. It contains the ‘tar.gz’ file and the installation script as shown:
Installing the Linux Agent 1

2. Now, open the terminal of your Linux device and navigate to the ‘linux_agent’ package by typing ‘cd ~/Desktop/linux_agent/’. This will open up the folder and its contents in the terminal.

Installing the Linux Agent 3

3. Make the installation file executable by typing in the command ‘chmod +x install.sh’.

Installing the Linux Agent 4

4. Now, run the command ‘sudo ./install.sh <package_path> <agent_tag>’ to open the installation script. CopyPaste the value of the package path, and hit ‘enter’.

This will install the AssetSonar Agent on your Linux device.

Note: Remember to prepend ‘sudo’ to the command you want to run. This gives you the root privilege to execute the command.

Warning: The Agent is installed in the directory ‘opt/ocsinventory’ and will delete all files in the directory if it already exists. It will also remove any cron jobs for OCS inventory in the crontab.

3. Syncing data

The Agent will now scan the Linux device for IT information and sync the data to your AssetSonar account over an https request. You can go to the ‘Company Settings & Add Ons’ page in your account to view this.

Syncing data 1

Once the sync is complete, you can head to the Asset Details page to view the discovered Linux device. Alternatively, you can also click on the message shown below.

Syncing data 2

The system typically schedules automatic sync to run after every five hours using a cron job. However, you can also manually update the details of your Linux devices by clicking on ‘Sync Now’.

4. Uninstalling the Linux Agent

If you wish to install an updated version of the AssetSonar Agent, you can uninstall the previous version and install the newer one.

Below, we outline how to uninstall the AssetSonar Agent from your Linux-based computer.

  1. Email us at support@ezo.io to get the script for uninstallation.
  2. Download and save the uninstallation script in the folder containing the AssetSonar Agent package.
  3. Follow steps 3 to 5 from Section 2. However, note that the uninstallation script ‘uninstall.sh’ will replace the installation script ‘install.sh’ from Section 2. You do not need to specify the <package_path> here.
Uninstalling the Linux Agent

This shall uninstall the AssetSonar Agent from your Linux device.

You are now ready to install updated or newly requested pre-configured versions of the AssetSonar Agent.

Read more: Enhance Management Of Windows Devices With AssetSonar’s Microsoft SCCM Integration

Frequently Asked Questions:

  1. What happens when a Linux device misses sync?

    Admins receive an email alert for missing syncs. A common use case is of IT Assets that were inactive in the last two days.

    The system sends an alert that informs the admin(s) and lists down the Linux devices that were not synced in the past two days
  2. Can users independently troubleshoot problems with the AssetSonar Agent?

If you encounter any issues with our Agent, access the log files containing the Agent from your device. These log files list all the issues with the Agent, should they occur.

You can follow this pathway to access the log files: /var/log/ocs_agent.log

Email the log files to support@ezo.io and we’ll take care of the rest for you.

Was this helpful?

Thanks for your feedback!