Page 1 of 1

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

Posted: Mon Jun 24, 2019 5:00 pm
by wolverine777
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

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

Posted: Tue Jun 25, 2019 1:22 pm
by cdienger
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.