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
nagios(8)							      Nagios								 nagios(8)

NAME
Nagios - network/systems status monitoring daemon SYNOPSIS
nagios [-h] [-v] [-s] [-d] <main_config_file> DESCRIPTION
nagios is a daemon program that monitors the status of various network accessible systems, devices, and more. For more information, please consult the online documentation available at http://www.nagios.org, or on your nagios server's web page. OPTIONS
main_config_file The main configuration file. On openSUSE systems this defaults to /etc/nagios/nagios.cfg -h A helpful usage message -v Reads all data in the configuration files and performs a basic verification/sanity check. Always make sure you verify your config data before (re)starting Nagios. You can also use the Nagios init script to verify your configuration - try: rcnagios check_verbose -s Shows projected/recommended check scheduling information based on the current data in the configuration files. -d Starts Nagios in daemon mode (instead of as a foreground process). FILES
/etc/nagios Default configuration directory for nagios AUTHOR
Nagios is written and maintained by Ethan Galstad <nagios@nagios.org>. This manual page was written by sean finney <seanius@debian.org> for the Debian GNU/Linux operating system (but it may be freely used, modified, and redistributed by others) and adapted by Lars Vogdt for openSUSE. sean finney, Lars Vogdt February 2006, May 2010 nagios(8)