NagiosExchange
NagiosForge
NagiosWiki
Nagios Community Platform powered by NETWAYS

HowTos

Search  
From NagiosWiki
Jump to: navigation, search

How To's

Contents

Here you will find a lot of Documentation, Best Practice and Tips and Tricks about Nagios, NagiosAddons, NagiosPlugins and its configuration.


Documentation

Here you will find the official Nagios Documentation and the Nagios Addons.


Best Practice


Nagios Best Practice

Nagios Addons Best Practice

Nagios Plugins Best Practice

Writing Plugins

Best Practice Hardware


Best Practice Tools


How to do this and that

How To Test your Plugins

It is easy to test your plugin before actually using it. Just be sure to do it the same way that Nagios would do it. The easiest way to ensure this is to be the Nagios user.

For example:

nagios@nagioswiki.org:~/
su - nagios
cd /tmp
/usr/local/nagios/libexec/check_icmp -H www.nagioswiki.org ; echo "Plugin Return Code: $?"

However please note the following

  • Perl plugins may react differently in nagios if the embedded perl interpreter is enabled
  • Environmental macros ($NAGIOS_XXX variables) will not be available


How To Define a Command

Use the plugin as a Nagios check command as follows with a dynamic host address:

nagios@nagioswiki.org:~/
define command{
command_name   check_icmp
command_line   $USER1$/check_icmp -H $HOSTADDRESS$
}


How To Define a Service

Define a Nagios service to actually use the check_icmp command:

nagios@nagioswiki.org:~/
define service{
host_name             nagioswiki_server
service_description   www.nagioswiki.org icmp echo
check_command         check_icmp
}


Tips and Tricks