[Nagiosplug-devel] RE: [Nagios-devel] Embedded Perl

Subhendu Ghosh sghosh at sghosh.org
Wed Apr 3 03:09:55 CEST 2002


On Thu, 21 Mar 2002, Alex Kuehne wrote:

>  > Nagios currently uses the embedded perl interpreter to execute perl
>  > plugins without the additional overhead of starting the interpreter
>  > everytime.
> 
> Okay, is it automatically done when you compile Nagios with embedded
> perl support?

yes

> 
>  > The only way you can use it currently is to write perl plugins.
> 
> This it what I assumed ...
> 
>  > When you say extension - what type of extension are you envisioning?
>  > On the cgi/web interface? or on the scheduling/monitoring side?
> 
> My Netsaint/Nagios host becomes the local loghost, where every 
> syslogable machine will log to, and that's a lot. I use MySQL for
> storing all the syslog stuff, and now I use Nagios for analysing
> what's going on. The idea is to have a plugin for cross-checking the
> database for words like "refused" "error" and all the bad things which
> happens every day, and returning Warning or Critical when it is found.
> For this I need a plugin.
> 

>From a performance viewpoint - you might want to consider the load 
generated by syslog/MySQL vs the performance from Nagios.

If you are going to do extended log analysis - you might be better off 
writting an app that generates passive check results into Nagios.  I am 
suggesting this because of the limited runtime available for the plugin 
under an active check.

If you can maintain the runtime restriction, follow the plugin guidelines 
for development. Additional note below.

> For the cgi/web interface I will build something like showlog.cgi 
> together with histogram.cgi, but that's still for away.
> 
> Thanks for answering, also Chet Luther who suggested using mod_perl.
> I will think about.
> 

for the cgi interface mod_perl would do the same - it runs as embedded 
perl inside Apache


Additional perl plugin guidelines:

output states: 
%ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);
These have changed from earlier version for Netsaint

Do not use BEGIN blocks.


-sg


-- 
Subhendu Ghosh (sghosh at sghosh.org)
***************************************
All great discoveries are made by mistake.
		-- Young





More information about the Devel mailing list