Home Directory Patches Nagios Core IPv6 address in host definition patch

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

IPv6 address in host definition patch

Rating
2 votes
Favoured:
1
Current Version
0.1
Last Release Date
2010-12-15
Compatible With
  • Nagios 3.x
License
GPL
Hits
184297
Files:
FileDescription
nagios-3.2.3-ipv6.patchnagios-3.2.3-ipv6.patch
nagios-HEAD-ipv6.patch2010-11-23
nagios-3.3.1-ipv6.patchVersion 3.3.1
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
This patch allows you to add 'address6' directive to host definition. And use this value in command definitions via %HOSTADDRESS6% macro.

That way you can define special commands to check IPv6 services.
For example:
define command{
command_name check_ssh6
command_line $USER1$/check_ssh -6 $ARG1$ $HOSTADDRESS6$
}
This patch is useful if you are monitoring servers and services in dual-stack environment.

Essentially it allows you to add IPv6 address to your host definition via 'address6' directive.

Example:
define host{
use linux-server
host_name serv_name
alias serv_name.example.net
address 198.51.100.123
address6 2001:DB8:2::123
}

Host IPv6 address can be used to define IPv6 service checks. It is accessible via %ADDRESS6% macro.

Example:
define service{
use generic-service
host_name serv_name
service_description SSH6
check_command check_ssh6
}
define command{
command_name check_ssh6
command_line $USER1$/check_ssh -6 $ARG1$ $HOSTADDRESS6$
}

Having this configuration allows you to easily check service availability over IPv4 and IPv6 and associate results with one host.


This patch is almost identical to 'second IP-address' patch. However it works with newer nagios versions. It duplicates all nagios code related to 'address' directive, but replacing it with 'address6'.

The value of booth 'address' and 'address6' directives is never validated to be IP addresses. Therefore you can use FQDN or any other value that you might need associate with host.
Reviews (2)
byegalstad, October 3, 2011
1 of 1 people found this review helpful
sjorge - This patch was not applied because it is technology-specific and not an abstract concept. The "address" field in host definitions can hold IPv4, IPv6, MAC address, and other types of "addresses".

Additionally, you can use custom variables and reference them in your command definition if you need multiple types of addresses associated with a host.
Patch does what it is supposed to do.

Only question I have why is this still not part of the core?