Snap is a popular package manager that allows you to easily install software on Linux-based Operating Systems. It was developed and is maintained by Canonical. Snap was originally created for cloud-based applications, but its support has since been extended to include desktop applications and IoT devices. The packages installed using snap are referred to as snaps and the service that maintains the snaps is known as snapd.
Provides prometheus-exporter metrics interface for cloud capacity
planning and reporting.
Provides an interface to regularly update external API with latest statistics
In this article, we will briefly demonstrate how to install cloudstats – provide and report cloudstats via prometheus-exporter on Ubuntu using snap.
How to install snapd on Ubuntu
snapd is the service that runs and manages snaps for you, including performing automatic updates. Installation instructions and supported versioning information for each of the following Linux distributions can be found here.
If you’re running Ubuntu 16.04 LTS (Xenial Xerus) or later, including Ubuntu 18.04 LTS (Bionic Beaver), Ubuntu 18.10 (Cosmic Cuttlefish) and Ubuntu 19.10 (Eoan Ermine), you don’t need to do anything. Snap is already installed and ready to go.
For versions of Ubuntu between 14.04 LTS (Trusty Tahr) and 15.10 (Wily Werewolf), as well as Ubuntu flavours that don’t include snap by default, snap can be installed from the Ubuntu Software Centre by searching for
Alternatively, snapd can be installed from the command line:
sudo apt update sudo apt install snapd
Once the command completed itself, update your system paths for snap by logging out and back in again, or restarting your computer.
For those who need to know which version of Ubuntu you’re running, open System Settings and select Details. Alternatively, from the command line, type
Verify that snapd is running
Before actually installing cloudstats, check the status of the “snapd” service by running the following command:
sudo systemctl status snapd.socket
In our case, it shows that the snapd service is already installed and running without any issues.
Install cloudstats snap – provide and report cloudstats via prometheus-exporter
Login to the Ubuntu system and then open the terminal by pressing CTRL+ALT+ T buttons. Run below command to install the cloudstats snap package. The cloudstats snap package is published by Joe Guo and has been verified by the Snap team as safe. At the time of this writing, the current version of cloudstats is 1.1.
sudo snap install --classic
--classic argument is required here as cloudstats needs full access to your system in order to be useful, therefore it needs snap’s “classic confinement”. By default, snaps are much more restricted in their ability to access your disk and network, and they have to request special access from you where they need it.
Please note that cloudstats package installed with
snap is auto-updated, which means you don’t have to do anything to be able to use the latest version of cloudstats, unlike with apt or yum.
Snaps are much more than just a new Linux package format – they’re a sophisticated way to deliver complex applications to any desktop environment! To get started with snaps, learn about their security features, transactions and more from the man page or Canonical’s advanced snap usage tutorial. There are also plenty of great snaps besides cloudstats – provide and report cloudstats via prometheus-exporter available in the store for your Linux desktop, like vscode, atom, slack and spotify.