PinkFrog
(Pink Frog)
June 9, 2020, 5:17am
1
Hello everybody,
I’m searching for some recommendations for the best check plugins to check the cpu usage on linux and on windows systems. Can someone recommend some?
The management of our company would like to know the cpu usage in percent, not the cpu load…
Thanks for any suggestion!
Alicia
Maybe these checks help on Linux, especially the cpu-usage
check:
GitLab Community Edition
4 Likes
m4k5ym
(Maksym)
June 12, 2020, 12:04pm
4
For windows there is a check available as well. You have to use the powershell-framework:
Invoke-IcingaCheckCPU
3 Likes
NiclasE
(Niclas Eriksson)
September 16, 2024, 1:06pm
6
I’m trying to use this check on Linux hosts, but a bit confused on what prereqs there are, it seems to rely on psutil, correct? Does that mean that I also need to install python on the hosts which I want to monitor ? (I use the Icinga agent because we need the hosts to push to Icinga due to network isolation)
rivad
(Dominik)
September 16, 2024, 1:27pm
7
I use it with success
The Python version requires psutil but there’s a compiled (with nuitka) version that should be self contained.
1 Like
NiclasE
(Niclas Eriksson)
September 16, 2024, 1:49pm
8
So this one first, then the cpu-check should be OK?
Nuitka Downloads — Nuitka the Python Compiler
rivad
(Dominik)
September 16, 2024, 1:54pm
9
The Linuxfabrik provides precompiled packages.
How to install the Linuxfabrik Monitoring Plugins Collection
============================================================
What to choose when
-------------------
In general, you have two options:
* Using the compiled plugins (available as OS packages, EXE files or simple archives).
* Using the plugins from the source code (requires Python runtime).
.. csv-table::
:header-rows: 1
:widths: 10, 60, 30
OS, Motivation, Install
Linux, "Want to use my OS's package manager and have distro that uses rpm/deb package formats","Package from `Linuxfabrik's Repo Server <https://repo.linuxfabrik.ch>`_"
Linux, "Don't want to use my OS's package manager or have distro that uses package formats other than rpm/deb and can't run Python 3.6+",Binaries from .tar or .zip file on `Linuxfabrik's Download Server <https://download.linuxfabrik.ch/monitoring-plugins/>`_
Linux, "Want to use the latest development version and Python 3.6+ available", `Source code variant from GitHub <https://github.com/Linuxfabrik/monitoring-plugins/tree/main>`_
Windows,"Want to use EXE files",Binaries in ``/windows`` on `Linuxfabrik's Download Server <https://download.linuxfabrik.ch/monitoring-plugins/windows/>`_
This file has been truncated. show original
NiclasE
(Niclas Eriksson)
September 16, 2024, 2:24pm
11
Got it going, created the service template/command in Director and tried it on a host that has the plugins… Got this
Wondering which DB it tries to write to, and if I need to set some permission on any local DB file on the host maybe?
Query failed: INSERT INTO "perfdata" (cpu_usage,guest,guest_nice,iowait,irq,nice,softirq,steal,system,user) VALUES (:cpu_usage,:guest,:guest_nice,:iowait,:irq,:nice,:softirq,:steal,:system,:user);, Error: attempt to write a readonly database, Data: {'cpu_usage': 5.6, 'guest': 0.0, 'guest_nice': 0.0, 'iowait': 1.6, 'irq': 0.0, 'nice': 0.0, 'softirq': 0.0, 'steal': 0.0, 'system': 1.6, 'user': 2.4}
rivad
(Dominik)
September 16, 2024, 2:34pm
12
I guess it tries to write into a local sqlite file.
NiclasE
(Niclas Eriksson)
September 16, 2024, 5:07pm
13
Probably yes, just need to find out where it is
Edit: Found it… It’s under /tmp. Just had the wrong owner.