Wrong alert with swap file

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
supportcl
Posts: 39
Joined: Wed Oct 07, 2020 12:19 pm

Wrong alert with swap file

Post by supportcl »

Why i have this alert?

SWAP CRITICAL - 67% free (5369 MB out of 8103 MB)

my "Monitor the service with this command"

check_nrpe!check_swap!-a '-w 95% -c 90%'!!!!!!
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Wrong alert with swap file

Post by dchurch »

Hello and welcome to the forums!

The check_swap plugin acts a little differently from most plugins. The warning and critical thresholds represent the percentage of available swap, not the percentage of used swap.

The warning level means it's a warning state if less than that amount of swap is available. E.g. If it's set to "20%", then it's a warning state when more than 80% of the swap is being used.

This is also the reason why the warning threshold is typically always higher than the critical level.

The reason you're getting a critical alert is because your system's percentage free (67%) is lower than 90%, so it's in the critical range. The way you have it configured, if you use more than 10% of the swap, it's in the critical range.


Possible solution

If you're trying to configure your plugin to trigger warning if more than 90% is used, and critical if more than 95% is used, then use this configuration.

Code: Select all

check_nrpe!check_swap!-a '-w 10% -c 5%'!!!!!!
See also this topic: https://support.nagios.com/forum/viewto ... =7&t=43507
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Locked