Skip to main content

Software analysis toolkit. Define checks in high-level language and leverage library to perform analysis of common Cloud applications.

Project description

Overview

Hotsos is a framework for software-defined analysis. It provides a library of plugins written in Python along with a high-level language in which to implement checks and analysis and report problems. Supported plugins include:

  • Openstack
  • Kubernetes
  • Ceph
  • Open vSwitch
  • Juju
  • MAAS
  • Vault
  • MySQL
  • RabbitMQ
  • and more

Each plugin has associated checks or "scenarios" that seek to identify issues and known bugs. The output is a summary from each plugin including key runtime information as well issues or bugs detected along with suggestions on how to deal with them. This information can be useful as an aid for further manual analysis.

The default summary format is yaml and a number of other options and formats are provided.

Hotsos is run directly on a host or against a sosreport.

The code has the following structure:

  • core python library (includes plugins)
  • checks/scenarios (see documentation at defs)
  • python plugin extensions
  • tests

Usage

Say for example that you are running an Openstack Cloud and one of your hypervisor nodes that is also running part of a Ceph storage cluster is experiencing a problem with network connectivity to workloads. Simply run hotsos on the node or against a sosreport generated from that node e.g.

ubuntu@ncpu1$ hotsos -s
INFO: analysing localhost /
INFO: output saved to hotsos-output-1673868979

Now you will find a folder called hotsos-output-1673868979 containing a summary of information in a number of different formats. Taking the most common yaml format we can see:

ubuntu@ncpu1$ cat hotsos-output-1673868979/ncpu1.summary.yaml

This file will contain a per-plugin summary of information found along with any issues or bugs detected. By default hotsos will only look at the last 24 hours of logs. You can increase this with --all-logs which will by default give you 7 days worth and if you want more you can use --max-logrotate-depth <days>.

Our folder also contains other formats of the same information and one of those is json which can easily be queried using a tool called jq. Using this useful tool we can easily query for specific information e.g.

ubuntu@ncpu1$ jq -r '.storage."potential-issues"' hotsos-output-1673868979/ncpu1.summary.json
{
  "BcacheWarnings": [
    "One or more of the following bcache bdev config assertions failed: sequential_cutoff eq \"0.0k\"/actual=\"4.0M\", cache_mode eq \"writethrough [writeback] writearound none\"/actual=\"writethrough [writeback] writearound none\", writeback_percent ge 10/actual=\"10\" (origin=storage.auto_scenario_check)",
    "One or more of the following bcache cacheset config assertions failed: congested_read_threshold_us eq 0/actual=\"2000\", congested_write_threshold_us eq 0/actual=\"20000\" (origin=storage.auto_scenario_check)"
  ]
}

Examples

An example full (yaml) summary can be found here

An example short (yaml) summary can be found here

Install

HotSOS can be installed in the following ways:

debian package daily build

NOTE: this is the recommended method.

$ sudo add-apt-repository ppa:ubuntu-support-team/hotsos
$ sudo apt install hotsos

pypi

NOTE: requires Python >= 3.8

$ sudo apt install pipx
$ pipx install hotsos

NOTE: use pipx instead of pip as it is considered more secure and installs in a venv

snap

You can install as a snap e.g.

$ sudo apt install snapd
$ sudo snap install hotsos --classic

See https://snapcraft.io/hotsos for more info on usage.

NOTE: the snap only currently works properly on Ubuntu Focal.

source

$ git clone https://github.com/canonical/hotsos
$ pip install -r hotsos/requirements.txt
$ ./hotsos/scripts/hotsos

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hotsos-1.1.14.post33.tar.gz (205.3 kB view details)

Uploaded Source

Built Distribution

hotsos-1.1.14.post33-py3-none-any.whl (308.2 kB view details)

Uploaded Python 3

File details

Details for the file hotsos-1.1.14.post33.tar.gz.

File metadata

  • Download URL: hotsos-1.1.14.post33.tar.gz
  • Upload date:
  • Size: 205.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for hotsos-1.1.14.post33.tar.gz
Algorithm Hash digest
SHA256 71727f7494166d41daa0fe3706a0f5def07e2e788e44a2f859966b77944f0c6c
MD5 33ed6aa4393aa310c6f196aad82170af
BLAKE2b-256 3d2c03ffc18e87c259a66b29b4d2397178062efc9d756defd9e72489a1ac5a35

See more details on using hashes here.

File details

Details for the file hotsos-1.1.14.post33-py3-none-any.whl.

File metadata

File hashes

Hashes for hotsos-1.1.14.post33-py3-none-any.whl
Algorithm Hash digest
SHA256 3e134daf93ef0b2415ceb459f71072d2cdf82fc2440eb0cea7ca6adb88fb8740
MD5 da2f0e12e1161d1cf0b2eaa1bc6bf50b
BLAKE2b-256 f784f834d98bdc8e901e43cbeafe3d8bf521192c40f46001401efd137a05d4dd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page