Why can't I see any difference when I use these parameters?

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Why can't I see any difference when I use these parameters?

Postby wolverine777 » Mon Jun 24, 2019 5:00 pm

Hello, I am an absolute newborn with Nagios and I already must create a complete plugin.

I have the following in my diskspace.cfg that I have created in /usr/local/nagios/etc/objects

define command {
command_name check_xard
command_line $USER1$/check_xard -H $HOSTADDRESS$ -c check_xard -w $ARG1$ -c $ARG2$
}

define service {
use generic-service
host_name myserver
service_description CheckHDD
check_command check_xard
notifications_enabled 0
notification_options w,c,u,r
}

I wonder what I did wrong and if there's a sort of step-by-step instruction to understand how to operate with w,c etc.

Thank you
wolverine777
 
Posts: 1
Joined: Mon Jun 24, 2019 4:54 pm

Re: Why can't I see any difference when I use these paramete

Postby cdienger » Tue Jun 25, 2019 1:22 pm

You would need to pass additional arguments to see a difference. For example:

Code: Select all
define service {
use generic-service
host_name myserver
service_description CheckHDD
check_command check_xard!50!60
notifications_enabled 0
notification_options w,c,u,r
}


The resulting check that is run would then be:

Code: Select all
check_xard -H myserver -c check_xard -w 50 -c 60


The values given to -w and c may need to be tweaking. W and c usually indicate the warning and critical values, and these can be numbers, percentages, strings, etc...

https://assets.nagios.com/downloads/nag ... n/toc.html is a good place to start if you're new to Nagios. Check out the "Configuring Nagios" and "The Basics" sections.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3791
Joined: Tue Feb 07, 2017 11:26 am


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests