Creating additional plugins for nagios


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Creating additional plugins for nagios
# 1  
Old 12-15-2014
Creating additional plugins for nagios

Team would like to know if anyone here had created a basic nagios plugin.
I did write a simple postfix service checker. Then add it in nagios nrpe.cfg then restart nrpe and nagios and it is not working, its like i cant receive email if the service is stopped or running.


Code:
#!/bin/bash
post=`service postfix status|awk '{print $5}'|tr -d .`
case $post in
running )
echo "the post fix is running"
exit 0
;;
*)
echo "Please check the postfix service"
exit 1
;;
esac

Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Nagios plugins

I don't like the standard monitoring plugins for Nagios. After hours of checking out alternatives, I finally decided to develop some own alternatives (and spend days ;)). The goal was to make system monitoring simple. (And not: getting as many details as possible.) The plugins are written in... (1 Reply)
Discussion started by: MadeInGermany
1 Replies

2. Infrastructure Monitoring

Nagios check dependent on second nagios server

We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side. I was wondering if there is any way to setup cross dependencies... (1 Reply)
Discussion started by: eugenes18t
1 Replies

3. Solaris

nagios-plugins-1.4.15 Install Problem on Solaris 10

I am trying to install nagios-plugins-1.4.15 on a Solaris 10 box and when I run the ./configure script I get this error: checking for grep that handles long lines and -e... configure: error: no acceptable grep could be found in... (2 Replies)
Discussion started by: thatwaseasy
2 Replies

4. Infrastructure Monitoring

creating nagios plugins and defining services

Hello friends, i have essential nagios documents and some basic configuration documents but they dont meet my needs, so i would like to have a detailed, comprehensive documents that refers to pluggins, how to configure a complex nagios script as a service, maybe even how to trigger another... (0 Replies)
Discussion started by: EAGL€
0 Replies

5. UNIX and Linux Applications

Nagios aka Netsaint plugins

Hi guys, I'm looking for a Nagios plugin which monitors selected processes and if they die, restarts them. Does anyone have such a plugin\script, or could anyone point me in the right direction? Cheers Jamie (3 Replies)
Discussion started by: JayC89
3 Replies
Login or Register to Ask a Question
CHECK_MULTI(8)						  System Administration Utilities					    CHECK_MULTI(8)

NAME
check_multi - nagios plugin to combine multiple service checks in one run DESCRIPTION
Usage: check_multi -f <config file> [-n name] [-t timeout] [-T TIMEOUT] [-r level] [-l libexec_path] [-s option=value] check_multi [-h | --help] [-hh extended help] [-hhh complete help] check_multi [-v | --verbose] check_multi [-V | --version] [ more infos on http://my-plugin.de/check_multi ] Common options: -f, --filename config file which contains commands to be executed multiple files can be specified serially if filename is a directory, all '.cmd' files will be taken (file format follows nrpe style: command[tag]=plugin command line) -n, --name multi plugin name (shown in output), default: -r, --report <level> specify level of details in output (level is binary coded, just sum up all options) default:13 see more details with extended help option -hh -s, --set <option>=<value> <KEY>=<VALUE> - set multi variable $<KEY>$ to <VALUE> see more details with complete help option -hhh -t, --timeout timeout for one command, default:11 -T, --TIMEOUT TIMEOUT for all commands, default:60 -l, --libexec path to plugins, default:/usr/lib/nagios/plugins -h, --help print detailed help screen (extended help with -hh, complete help with -hhh) -v, --verbose prints debug output (multiple -v extend debug level) -V, --version print version information Extended command line - command file options also available on command line: -x, --execute "command [ tag ] = check_xyz" -i, --instant "tag" -y, --inventory -w, --warning <expression> -c, --critical <expression> -u, --unknown <expression> -o, --ok <expression> check_multi 0.26-1 November 2011 CHECK_MULTI(8)