Metadata-Version: 2.4
Name: check-psi
Version: 1.1.1
Summary: A nagios plugin for checking pressure stall information values provided by the kernel for cpu, io and memory
Author-email: Bona Fide IT GmbH <github@bona-fide.it>, Olaf Rühenbeck <oruehenbeck@bona-fide.it>
License: MIT License
        
        Copyright (c) 2024 Bona Fide IT GmbH
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/BonaFideIT/check_psi
Keywords: icinga,nagios,plugin,check_command,debian,psi,pressure stall information,linux
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: nagiosplugin>=1.4.0
Dynamic: license-file

# check_psi
[![Tests](https://github.com/bonafideit/check_psi/actions/workflows/tests.yml/badge.svg)](https://github.com/bonafideit/check_psi/actions/workflows/tests.yml)

A nagios plugin for checking pressure stall information values provided by the kernel for cpu, io and memory

Tested for 

* python 3.9.2
* python 3.11.2
* python 3.13.5

# usage

```
usage: check_psi.py [-h] {cpu,io,memory} ...

Nagios plugin to monitor current pressure stall information against desired thresholds

positional arguments:
  {cpu,io,memory}
    cpu            Override default values for cpu pressure.
    io             Override default values for io pressure.
    memory         Override default values for memory pressure.

options:
  -h, --help       show this help message and exit
```

You can override all default thresholds with sensible values of your own for warning and critical values like in this example for "io", cpu and memory are used exactly the same:

```
usage: check_psi.py io [-h] [--full-avg10 WARN:CRIT] [--full-avg60 WARN:CRIT] [--full-avg300 WARN:CRIT] [--some-avg10 WARN:CRIT] [--some-avg60 WARN:CRIT] [--some-avg300 WARN:CRIT]

options:
  -h, --help            show this help message and exit
  --full-avg10 WARN:CRIT
                        Override thresholds for warning and critical for avg10 time window for "full" values
  --full-avg60 WARN:CRIT
                        Override thresholds for warning and critical for avg60 time window for "full" values
  --full-avg300 WARN:CRIT
                        Override thresholds for warning and critical for avg300 time window for "full" values
  --some-avg10 WARN:CRIT
                        Override thresholds for warning and critical for avg10 time window for "some" values
  --some-avg60 WARN:CRIT
                        Override thresholds for warning and critical for avg60 time window for "some" values
  --some-avg300 WARN:CRIT
                        Override thresholds for warning and critical for avg300 time window for "some" values
```

# installation from package

1. optionally create virtualenv
2. install pypi package
3. test 

# alternative manual installation

1. clone repository to /usr/local/bin/
2. create virtualenv
3. install pipenv via pip
4. pipenv sync
5. test
