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


Remember Me

Directory Tree

IPv6 address in host definition patch

2 votes
Current Version
Last Release Date
Compatible With
  • Nagios 3.x
nagios-3.3.1-ipv6.patchVersion 3.3.1
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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.

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

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

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?