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

A recent study by IDC InfoBrief identified Linux as the only endpoint operating system (OS) growing at a global level. Its 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.

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.

Contents

  1. Before you begin
  2. Installing the Linux Agent
  3. Syncing data
  4. Uninstalling the Linux Agent
  5. Troubleshooting

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 versions including but not limited to the following: Ubuntu 18.04, Ubuntu 20.04, Kali 2020.1, and now the CentOS 8.
  • The AssetSonar Agent package. This consists of a tar.gz file and a bash script “install.sh” that installs the tar.gz file. You can get it from us at support@ezo.io.
  • The AssetSonar Agent tag to feed into the terminal for the installation script.

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. Open your AssetSonar account to retrieve the Agent tag from Settings → Company Settings → ITAM Discovery Agent.

Installing the Linux Agent 2

3. 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

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

Installing the Linux Agent 4

5. Now, run the command ‘sudo ./install.sh <package_path> <agent_tag>’ to open the installation script. Copy the Agent tag from Step 2. Paste the two values in the order shown, and hit ‘enter’.

Installing the Linux Agent 5

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’ 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’.

Syncing data 3

What happens when a Linux device misses syncing?

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.

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> and <agent_tag> 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.

5. Troubleshooting

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: Terminal → Var → Log → ocs_agent.log.

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

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

Have Feedback About our IT Asset Management Software?

AssetSonar is the leading ITAM solution used by tech organizations and businesses all over the globe. Sign up today for a free 15-day trial.

For more assistance, drop us an email at support@ezo.io. Visit our blog for more detailed support posts.

Join the Conversation: Twitter | Facebook

Was this helpful?

Thanks for your feedback!