Nagios from traces.

Marc Powell marc at ena.com
Fri Sep 22 21:41:45 CEST 2006



> -----Original Message-----
> From: nagios-devel-bounces at lists.sourceforge.net [mailto:nagios-devel-
> bounces at lists.sourceforge.net] On Behalf Of Andrew Tjang
> Sent: Friday, September 22, 2006 2:26 PM
> To: nagios-devel at lists.sourceforge.net
> Subject: [Nagios-devel] Nagios from traces.
> 
> Hello Everyone,
> 
> I am trying to get Nagios to read from traces. I'm having difficulty
on
> figuring out where to begin.
> 
> I want to do this because I don't have direct access to the machines
> i'll be monitoring. I need to periodically ship the monitored data
from
> the hosts to the nagios machine, parse the files and then update
nagios.
> The parsing part I think i can do fine. It's the part that involves
> modifying Nagios to read from file rather than query hosts that I need
> help with.
> 
> I'd like to keep the same config file format, but just modify the
> monitoring sections to read from file based on those configs. Is there
> any place you could recommend that I start looking?

Sounds like a rather straightforward check plugin. Write a check_plugin
that accepts parameters on the command line that uniquely identifies the
host and service that nagios is trying to get status information for
(see the docs for Using Macros in Commands
http://nagios.sourceforge.net/docs/2_0/macros.html). Have it parse your
files for status information and return relevant status information and
exit code back to nagios (see the Developer Guidelines at
http://nagiosplug.sf.net). Set this plugin as the check_command for the
relevant hosts/services.

Alternately, you can have an external script submit passive results back
to nagios via the external command file
(http://nagios.sourceforge.net/docs/2_0/passivechecks.html,
PROCESS_HOST_CHECK_RESULT and PROCESS_SERVICE_CHECK_RESULT of
http://www.nagios.org/developerinfo/externalcommands/commandinfo.php?com
mand_id=114).

Hth,

--
Marc

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV




More information about the Developers mailing list