nmap

Maxwell,Brady maxwellb at oclc.org
Thu Aug 17 18:51:52 CEST 2006


On 8/17/06, Marc Powell <marc at ena.com> wrote:

> /nagios-plugins-1.4.3/contrib. --

>Well, there you go. :) I'm new to Nagios so perhaps this too is a
>stupid question, but when you configure a check, can't you use a
>variable for the host in the check command line? I guess I need to go
>look at my config files again....


Brian you are correct it is best practice to use the $HOSTADDRESS$ in
your check commands. Not doing so would require that you would need to
write a check command specific to each host and service. I am no expert
on this and have not used the plugin in the mentioned in this thread.

But I think maybe Marc is trying to say put the IP address in the
hosts.cfg when you define a host so you do not run into an issue with
DNS. So a host should be defined like this:
define host{
        host_name       linux1.companyname.com
        hostgroups      lin-servers
        alias           Linux Server 1
        address         192.168.125.15
        check_command   check-host-alive
        max_check_attempts      3
        check_period    24x7
        contact_groups  localadmins
        notification_interval 120
        notification_period     24x7
        notification_options    d,u,r,f
}

Assuming linux1 is a http server I would write the check command for
this machine... well its straight out of the sample config.

# 'check_http' command definition
define command{
        command_name    check_http
        command_line    $USER1$/check_http -H $HOSTADDRESS$
        }



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list