Adding values for Warning and Critical

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
filip132
Posts: 5
Joined: Tue Feb 01, 2022 6:12 am

Adding values for Warning and Critical

Post by filip132 »

Hi everyone,

I am monitoring a guest VM on the VMWare host.

However, I would like to change values for any of the services related to VMWare guest, let's say for CPU, if CPU usage goes over 60% I would like to get a warning alert.

I couldn't find the option to change it. Any kind of help would be appreciated

Thanks
You do not have the required permissions to view the files attached to this post.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: Adding values for Warning and Critical

Post by gsmith »

Hi,

Could you please go to Config. Core Config Manager. Select Services, and edit one of the
"XXX CPU Usage" services. Please send me a screenshot of that page.

Thanks!
filip132
Posts: 5
Joined: Tue Feb 01, 2022 6:12 am

Re: Adding values for Warning and Critical

Post by filip132 »

Here is the screenshot:
You do not have the required permissions to view the files attached to this post.
filip132
Posts: 5
Joined: Tue Feb 01, 2022 6:12 am

Re: Adding values for Warning and Critical

Post by filip132 »

Also, under Check Command options, I couldn't quite find the "check_cpu" or any similar one that would indicate a potential command.

Forgot to take screenshots of these:
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding values for Warning and Critical

Post by ssax »

Please see here:

https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

And the plugin help output:

Code: Select all

/usr/local/nagios/libexec/check_vmware_api.pl -h
-w, --warning=THRESHOLD
Warning threshold. See
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
for the threshold format. By default, no threshold is set.
-c, --critical=THRESHOLD
Critical threshold. See
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT
for the threshold format. By default, no threshold is set.
So this should work:

Code: Select all

/usr/local/nagios/libexec/check_vmware_api.pl -H X.X.X.X -u 'username' -p 'password' -N 'VMNAME' -l CPU -s 'usage' -w 60
So you would edit your CPU service and change $ARG4$ to this:

Code: Select all

-l CPU -s 'usage' -w 60
Then Apply Configuration, force a check, and then let us know the results.
filip132
Posts: 5
Joined: Tue Feb 01, 2022 6:12 am

Re: Adding values for Warning and Critical

Post by filip132 »

There is the following error for the given links:
An error has been encountered in accessing this page.

1. Server: nagiosplug.sourceforge.io
2. URL path: /developer-guidelines.html
3. Error notes: NONE
4. Error type: 404
5. Request method: GET
6. Request query string: NONE
Correct me if I am being wrong, just want to clarify the current state.

The values for each of the arguments from:

Code: Select all

/usr/local/nagios/libexec/check_vmware_api.pl -H X.X.X.X -u 'username' -p 'password' -N 'VMNAME' -l CPU -s 'usage' -w 60
should be specified within the check_vmware_api.pl file or afterwards while editing service in the $ARG$ fields?

Because I see you gave the value of 60 for -w within the plugin file, so why would I need to specify it again in $ARG4$?

Also, is it necessary to add username and password within the plugins, if we already added VM host in Nagios?

Overall, I just want to know the logic behind this. Does it mean each virtual guest machine on VM host has to be modified through the terminal like from the example above, if we want to add certain value for notifications?

Thanks
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding values for Warning and Critical

Post by ssax »

ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding values for Warning and Critical

Post by ssax »

Sorry, the commands I'm sending are meant to be tested from the CLI to make sure they work.

I made a mistake, follow this process:

Go to Configure > Core Config Manager > Services and edit your CPU service:
- Change $ARG4$ to this:

Code: Select all

-s 'usage' -w 60
Then Apply Configuration, force a check, and then let us know the results.

What that Core Config Manager change is implying is that you would need to edit the other CPU services to do the same if you wanted to alert on 60% usage being hit.

The -s 'usage' is telling the plugin that the warning threshold you're defining of -w 60) relates to usage for comparison. The plugin required it.
filip132
Posts: 5
Joined: Tue Feb 01, 2022 6:12 am

Re: Adding values for Warning and Critical

Post by filip132 »

Thank you for the response.

Since I am left with couple more days of free trial, and haven't got my credentials yet for VMWare to configure it, I will continue with this thread once I purchase the license for Nagios XI, which should be expected soon.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Adding values for Warning and Critical

Post by ssax »

Okay, sounds good.

Once you get your credentials you can still run the check from the command line to validate it's working but to receive additional support you'll either need to purchase the license/support or work with sales to see if they can get you a trial extension.

Thank you!
Locked