[Nagiosplug-help] Sometimes no output is returned with custom made plugin

Sebastian Berm sebastian at tintel.nl
Tue Apr 11 04:30:09 CEST 2006


Version info:
Nagios 2.0rc2, PHP 5.0.5, Red Hat ES 3, (cPanel/WHM server).

Since about two months I've been working on some very specific plugins for
my company's Nagios installation. Per example, we've got a script running
that fetches some SNMP stuff from Cisco equipment, and stores it to a
database, so we can perform some calculations with it.
We use it to determine the current usage over a certain preconfigured time.

The plugin we use to process these database values is quite large and
consists of a lot of code. On the average it takes about 8 through 10
seconds to run and come back with a value. But it always returns something.

Our problem is that sometimes, after Nagios has been running for a long
time, it starts to give back plugin timeouts, however when ran manually it
works just great.
The plugin is written in PHP (we work with version 5.0.5).

Is there anything the default plugins do to counteract this effect? - Or is
this more like a bug in Nagios itself?

It is not the only custom made (PHP) plugin we use, but for some reason it
IS the only one that causes a lot of problems.
After we killed Nagios completely and restarted it, the problem was gone,
however, I don't trust this to be a good solutions, due to the fact we issue
a restart command directly into the Nagios system at a regular basis (every
day at 4 am).

We currently run with Nagios 2.0rc2, with some custom made hacks to work
with Nagiosgraph; so upgrading this is not really something I'd like to do
at this time, if possible ;).

An example of the output I get by mail is included below.

Does anyone have any experience with this kind of problem?

Service: Gemiddelde c Pri
Host: Leveranciers

Date/Time: Tue Apr 11 06:03:02 CEST 2006

Additional Info:

(No output returned from plugin)

Correct output will look like:
OK  - C op Pri: 9

(The address of localhost is correct, as it's just a script that's ran on
the localhost.)

With kind regards,
Sebastian Berm

More information about the Help mailing list