Question regarding services without plugins to check them

nagios at mm.quex.org nagios at mm.quex.org
Tue Feb 15 03:03:55 CET 2005


On Tue, Feb 15, 2005 at 09:41:43AM -0000, matato at pregi.net wrote:

> I did a google on squid however and learned from someone that he used
> check_tcp for it. Since these services runs on tcp, is it safe to
> assume that a tcp checking made by check_tcp will definitely prove
> that the service is running ok?

No, a TCP connection check does not definitely prove that the service
is running okay. If it's out of disc space or the upstream network is
broken, a server may very well accept a connection but not be able to
do anything useful with it.

It is a reasonable indicator that the service is actually running on
the host, however.

> If this is so, does it mean that check_tcp will work for any other
> services like ftp, smtp, pop etc.???

It isn't so, but you can use it to test if the service is running.
Some of these do have specific plugins, or you can use the options
of the check_tcp plugin to check for the expected "welcome banner"
that FTP, SMTP, POP3, and many other services send when they receive
a client connection.  This will give you a better idea of whether
the program providing the service is functioning, but many servers
will still send a welcome banner even if they're unable to do their
task; it's not until a client requests an action that it discovers
it hasn't sufficient resources to carry it out.

You need to decide how thoroughly you want to test services. For
squid, you could send an HTTP request through it and make sure it's
able to retrieve the page - but then, if the server you've picked
as your testbed goes down, you'll get an error even though your
proxy is actually functioning fine.

For SMTP, you can even do a complete test - send the mail through
one server, and make sure it's received at the final destination.
This takes a bit more work, of course, but provides a better check
than just "when I connect to port 25, does it say hello?".

When deciding how thorough to make your tests, keep in mind that
you'll probably need to write your own plugins for some of them
(not that it's difficult, but can take some time), and also that
you'll be increasing the load on your services. You might like
to start with basic check_tcp type checks, and then get more
elaborate for especially critical services.

> And one more thing, do I really need to have a database account for
> mysql and postgresql to be able to run the check_mysql and check_pgsql
> plugins?

Of course. These plugins log in to the database and check it's
functioning correctly; exactly how they check it I'm not sure, but
they do obviously require access to the database they're checking.
You could use a check_tcp to ensure the port is open, but that doesn't
check authentication is working, or that the drive the database is on
hasn't failed and it's all completely broken (unless the database
server exits/crashes when the media fails), etc.

> I've tried the one for pgsql because I have a database account and the
> plugin worked using the default template of postgresql as its data...
> I'm thinking perhaps I'm going to create a dummy template on each
> servers running mysql and postgresql and also dummy accounts to make
> the plugins work, but I guess that would be troublesome and I'm not so
> sure if the database administrators of those servers will allow me to
> do so.Any idea?

That's what you'll need to do, pretty much - though testing a dummy
database won't tell you if the ones people actually need are broken.
When creating the database accounts for the plugin, make sure they
have the least required privileges possible.  I'm not sure how the
plugins work, but you may be able to get a stored procedure created
that does the testing, and allow the account Nagios uses for the
checks to run the stored procedure, but with no other access.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list