O'Reilly logo

Nagios, 2nd Edition by Wolfgang Barth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25.2 The Perl Online Documentation

The Perl Online Documentation (POD) is a simple markup language, which is based on conventional man pages. It enables you to include the documentation for a Perl script in the script itself. The command perldoc script provides this ready-formatted:[298]

#!/usr/bin/perl -w
=head1 NAME

check_du.pl - Nagios plugin for checking size of directories and files

=head1 SYNOPSIS

check_du.pl -P path/pattern [-v] [-w warning_threshold] [-c critical_threshold]
check_du.pl [-h|-V]

=head1 OPTIONS

=over 4

=item -P|--path=expression

Path expression for calculating size. May be a shell expression like /var/log/*.log

=item -w|--warning=threshold threshold can be max (warn if < 0 or > max), min:max (warn if < min or > max), min: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required