Librenix  
(Show all Nagios articles . . .
)  
Headlines | Linux | Apps | Coding | BSD | Admin | News
Information for Linux System Administration 

Custom Nagios Plugins

Up
vote
Down

A Nagios plugin is presented here, along with skeleton code that you can adapt for your own custom module.
The skeleton plug-in is shown in Listing 3. For a simple plug-in, just copy the code, edit the progname, copyright, and email values, and write the get_value() function that returns the value to be checked. The API is similar to str2range(), it returns false (zero) if the value cannot be read, true (non-zero) if it can be read, and sets the value passed by reference. An example get_value() function that reads the ACPI temperature from the /proc psuedo-filesystem is shown in Listing 4.
 read more | mail this link | score:8077 | -Ray, November 18, 2005
More Sysadmin articles...

Abstract Art Prints on Canvas

admin headlines

Tutorial: Use multiple PHP versions (Debian 7)

Tutorial: Install Lighttpd, PHP5, MySQL on Fedora 18

Proxmox 2 With Software Raid

Icinga configuration for Nginx on Debian 7/Ubuntu 11.10

Create Remote API Scripts for your Linux Server

Install Maia Mailguard on Debian

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search

 
Articles are owned by their authors.   © 2000-2012 Ray Yeargin