Yonas Habteab
91c7e60df8
Replace all existing copyright headers with SPDX headers
...
I've used the following command to replace the original copyright header
lines in a C-style comment block:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{/\*[^*]*\(\s*c\s*\)\s*(\d{4})\s*Icinga\s+GmbH[^*]*\*/}{// SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n// SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
For files that use shell-style comments (#) like CMakeLists.txt, I've
used this command:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f -exec perl -pi -e 's{#.*\(\s*c\s*\)\s(\d{4})\sIcinga\s+GmbH.*}{# SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n# SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
And for SQL files:
```
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{--.*\(c\)\s(\d{4})\sIcinga\sGmbH.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
$ find . \( -type d \( -name '\..*' -o -name third-party -o -name scripts -o -name prefix -o -name malloc -o -name server -o -name docker -o -name build -o -name doc \) -prune \) -o -type f \( -name '*.sql' \) -exec perl -pi -e 's{-- Copyright \(c\)\s(\d{4})\sIcinga\s+Development\sTeam.*}{-- SPDX-FileCopyrightText: \1 Icinga GmbH <https://icinga.com >\n-- SPDX-License-Identifier: GPL-2.0-or-later}gi' {} +
```
2026-02-04 14:00:05 +01:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Insel
160a7716c5
Fix state conditions in check_memory and check_swap
...
This fixes the state conditions in check_memory and check_swap. This
turns the if/else if/else statements in simple if statements, since they
won't work properly when both thresholds are broken.
This also implements a new function to get a given state as wstring.
2018-11-29 22:16:57 +01:00
Michael Friedrich
dab53448bc
icinga.com: Update *.{h,c}pp
2018-10-18 09:27:04 +02:00
Michael Insel
002f59e53a
Fix check_memory thresholds in 'used' mode
...
The thresholds in the used mode now breaks if the value is bigger than
the threshold.
2018-10-04 11:09:13 +02:00
Michael Friedrich
73f69e89d9
Merge pull request #6412 from Icinga/fix/plugin-output
...
Fix output formatting in windows plugins
2018-06-26 09:54:43 +02:00
Jean Flach
6c282d617f
Fix output formatting in windows plugins
...
Adds a newline to check_memory and check_ping now looks up and prints
error messages when host resolution fails.
2018-06-25 13:17:34 +02:00
Michael Friedrich
071617da9f
Conform to the Plugin API spec for performance label quoting
...
Single quotes are allowed, double quotes are not.
2018-06-22 11:12:57 +02:00
Michael Insel
8cbb7494d2
Fix Windows check_memory rounding
...
This fixes a rounding problem within the Windows check_memory plugin.
refs #6161
2018-04-18 21:42:43 +02:00
Gunnar Beutner
0c006637ea
Clean up the Icinga plugins a bit
2018-03-01 15:27:09 +01:00
Noah Hilverling
e9643467a0
Fix code style
2018-02-21 15:13:50 +01:00
Jean Flach
de9adb2687
Add 'used' feature to check_memory
...
Analogous to check_disk -U can now be used to check against and print the
used memory instead of the default available memory.
fixes #6108
2018-02-21 15:10:26 +01:00
Michael Insel
158ae2188e
Change copyright header for 2018
2018-01-02 12:08:55 +01:00
Michael Friedrich
b7caf0820d
Ensure that *.icinga.com is used everywhere
...
fixes #13897
fixes #13277
2017-01-10 17:19:12 +01:00
Per von Zweigbergk
5c18c1ed2d
Fixed precision for percentage calculations with large units
...
The check_memory and check_swap plugins on Windows were incorrectly
rounding the memory/swap measurements to the nearest unit prior to
calculating a percentage. This was causing imprecise percentage
values when the unit selected meant that the values in question had
few significant figures.
fixes #10497
Signed-off-by: Jean Flach <jean-marcel.flach@netways.de>
2016-02-19 11:30:12 +01:00
Gunnar Beutner
599929b0f6
Update copyright headers for 2016
2016-01-12 08:29:59 +01:00
Michael Friedrich
f7b5aa33ce
Fix a couple of wrong white spaces
2015-09-18 13:04:09 +02:00
Jean Flach
56f92f7846
Refactor plugin code
2015-03-23 13:07:02 +01:00
Paul Richards
7ca3a3c5e9
Fix: check_memory tool shows incorrect memory size on windows
...
On a PC with >4GB of RAM, check_memory utility returns
an incorrect amount of RAM:
MEMORY OK - 100% free | memory=4096MB;;;0;4096
This patch uses GlobalMemoryStatusEx instead of GlobalMemoryStatus
[https://msdn.microsoft.com/en-us/library/windows/desktop/aa366586%28v=vs.85%29.aspx ]
Following patch output of check_memory is as follows:
MEMORY OK - 32.4873% free | memory=5312MB;;;0;16351
fixes #8559
Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
2015-03-01 22:29:54 +01:00
Jean Flach
acff66875d
Add check_memory, update check_swap, thresholds
...
Adds check_memory which works like check_swap which has been updated to work like check_memory
Both sport a -u(nit) option with MB as default, like their linux versions.
A possible bug with all plugins having the -u(nit) option when using -u kB has been fixed. Don't use icinga to monitor you commodore though.
refs #8287 #8060
2015-02-03 10:22:09 +01:00