8.3 Inserting Hyperlinks with urlize

The program urlize represents the text output of a plugin as a hyperlink, if required, so that clicking in the Nagios Web interface on the test result takes you to another Web page. Like negate, urlize functions as a wrapper around the normal plugin command and is included with the other Nagios plugins.

As the first argument it expects a valid URL to which the hyperlink should point. This is followed by the plugin command, including its path:

urlize url plugin command

To avoid problems with spaces in plugin arguments, you can set the complete

plugin command in double quotation marks.

The hyperlink around the normal plugin output can be easily recognized when running the command manually:

nagios@linux:nagios/libexec$ ...

Get Nagios, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.