parameters for service checks from outside nagios

Lennard Bakker bakkerl at lamp.xs4all.nl
Fri Jan 3 01:18:02 CET 2003


nagios-users at lists.sourceforge.netOn Thu, 2003-01-02 at 17:45, Carroll,
Jim P [Contractor] wrote:
> I'm not entirely sure how you're retrieving the datfiles, but it might make
> sense to run a plugin locally on the remote systems in question.  This
> plugin would scrub the datfile (eg, with grep); the result of this plugin
> would be returned to Nagios.
The version is retreived by grepping, cutting, some awk and some other
tools on the output of the virusscanner version info. This is not the
problem.

The problem is how to let the plugin know what the current (uptodate)
version is. I want to result the plugin OK if uptodate, WARNING on 1
versions behind, ERROR on all other results.

The plugin is capable of getting the current used version, now i have to
let it compare to the latest version. This information can be fetched of
the internet, but if all hosts gets the information on every check, this
would consumps a lot of bandwidth.
The information of the latest version is also known on the nagios host.
So if the information (versionnumber) can be given to the remote host,
the plugin can also get his result (without fetching extra information
of the internet).

> Of course, I'm making some wild assumptions about your environment, such as
> the system that hosts your datfiles is a *nix host.  If it's Windows, I'm
> not entirely certain how you'd do it.  Still, you could install OpenSSH and
> Perl on your Windows servers to facilitate this sleight of hand.
It is all Linux based. All windows checks are fase 2 for me.. ;-)

> In case I haven't been clear, you would be best off to write your own plugin
> to do this.
The current check is a own written shell-script plugin. But this plugin
fetches the info from the internet. 

I did try some thing..
method 1: check_nrpe!check_datfile
This gets the latest information from the internet.

method 2: check_by_ssh!"/bin/nagios/libexec/check_datfile2 4240"
With this method, the latest version is given to the remote host, and
not from the internet (here 4240). But this is now static in the
configuration file. I can't get this information variable (readed from a
file or something, before it is passed to a remote host).


The only solution i can see now, is to call a local plugin on the
nagios-host. This shell scripts than uses nagios plugins (check_by_ssh,
or check_nrpe) to get some result from a remote host, and calculate the
result.
This solution is not wanted due to resoures on the nagios-server.

With greets,

Lennard Bakker

> 
> jc
> 
> > -----Original Message-----
> > From: Lennard Bakker [mailto:bakkerl at lamp.xs4all.nl]
> > Sent: Tuesday, December 31, 2002 4:26 PM
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] parameters for service checks from outside
> > nagios
> > 
> > 
> > 
> > Is it possible to import variable date to use with a service check?
> > 
> > My problem:
> > I want to let nagios to check anti virus datfiles on remote 
> > systems. Now
> > i do this dat each remote system fetch the latest version info (800k)
> > and verifies the version info, to the installed version (no update is
> > done). The plugin reports OK if datfile is uptodate, warning when 1
> > version behind and ERROR if more than 1 version behind (or installed
> > version is newer then the official downloadable).
> > 
> > The problem is that every client fetches the 800k just for verify the
> > version number (4 bytes number).
> > 
> > I have the lastest version info on the nagios host system (in a file,
> > just 4 bytes in size). Is it possible to add this info from a file to
> > the service check, so that the version number is given to te 
> > remote host
> > (by nrpe or chack_by_ssh). The remote host doesn't have to access a
> > remote host (internet) for the current information.
> > 
> > Lennard
> > 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list