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:8952 | -Ray, November 18, 2005
More Sysadmin articles...

Selected articles

Microsoft to push unlicensed users to Linux

Space Tyrant: Multithreading lessons learned on SMP hardware

The Supreme Court is wrong on Copyright Case

Why Programmers are not Software Engineers

Graffiti Server Download Page

The life cycle of a programmer

 

Firefox sidebar

Site map

Site info

News feed

Features

Login
(to post)

Search


T-shirt gallery:  I Love Hearts T-shirts
 

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