Host object redefinition

Daniel Bareiro daniel-listas at gmx.net
Tue Nov 20 04:34:13 CET 2007


Hi all!

This is my first post in the list/newsgroup.

I've several hosts behind a firewall and I'd like to monitoring they
with Nagios. These host haven't a public IP. Then, mi idea was to
configure the firewall to redirect the Nagios server conection at
specific port in the firewall ---one per host without public IP behind
the firewall--- to remote NRPE listen port from the remote host.

Then, I'd like to redefine the host object to include a port variable
for call it in a general service definition. Example:

define host {
  use linux-server-intranet
  host_name sdptest
  alias oracle server
  address a.b.c.d
  port 5000
  parents beta
  icon_image base/debian.gif
  statusmap_image base/debian.gd2
}

define service {
  use linux-server-intranet
  host_name apstest
  alias application server
  address x.y.z.t
  port 5001
  parents beta
  icon_image base/debian.gif
  statusmap_image base/debian.gd2
}

# 'check_nrpe-intranet' command definition
define command{
  command_name    check_nrpe-intranet
  command_line    $USER1$/check_nrpe -H ip.of.the.fw -p $PORT$ -c $ARG2$
}

define service {
  use generic-service
  host_name apstest,sdptest
  service_description Disk usage
  check_command check_nrpe!check_disk
  check_period          24x7
  normal_check_interval 5
  retry_check_interval  1
  max_check_attempts    3
}


Is it possible?

Thanks in advance.

Regards,
Daniel
-- 
Daniel Bareiro - System Administrator
Fingerprint: BFB3 08D6 B4D1 31B2 72B9  29CE 6696 BF1B 14E6 1D37
Powered by Debian GNU/Linux Etch - Linux user #188.598
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://www.monitoring-lists.org/archive/users/attachments/20071120/eacab920/attachment.sig>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
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