Networking Forums

Networking Forums > Computer Networking > Linux Networking > nagios check_ssh, check_oracle via Web

Reply
Thread Tools Display Modes

nagios check_ssh, check_oracle via Web

 
 
the_dba
Guest
Posts: n/a

 
      09-08-2004, 04:16 PM
<SIGH> I'm gonna get flamed </SIGH>. After RTFM'ing & searching the
newsgroups, I'm still a bit lost. I'd like to be able to monitor
hosts (Linux, Solaris, and Windows) using check_ssh THROUGH the WEB
interface (it works fine from the command-line). I'm missing
something simple. I'm running on Linux (2.4.21) with Apache (2.0.50).
In /usr/local/nagios/etc/services.cfg, I find FTP, HTTP, POP3, and
SMTP "service_descriptions". I'm hoping that a SSH
service_description is also available. Since I find check_ssh in the
libexec directory (/usr/local/nagios/libexec/check_ssh), I'm figuring
that I don't need to write my own plugin/etc. Nonetheless, I'm
clueless on how to proceed. Please help me get a clue.

- Todd
 
Reply With Quote
 
 
 
 
7
Guest
Posts: n/a

 
      09-08-2004, 08:36 PM
the_dba wrote:

> <SIGH> I'm gonna get flamed </SIGH>. After RTFM'ing & searching the
> newsgroups, I'm still a bit lost. I'd like to be able to monitor
> hosts (Linux, Solaris, and Windows) using check_ssh THROUGH the WEB
> interface (it works fine from the command-line). I'm missing
> something simple. I'm running on Linux (2.4.21) with Apache (2.0.50).
> In /usr/local/nagios/etc/services.cfg, I find FTP, HTTP, POP3, and
> SMTP "service_descriptions". I'm hoping that a SSH
> service_description is also available. Since I find check_ssh in the
> libexec directory (/usr/local/nagios/libexec/check_ssh), I'm figuring
> that I don't need to write my own plugin/etc. Nonetheless, I'm
> clueless on how to proceed. Please help me get a clue.
>
> - Todd


Several options.

1. ssh
------

Do this below once to start ssh on remote
machine to generate the keys and so on.
/etc/init.d/ssh start

Now do this below to allow ssh to start up whenever you
boot up remote machine
update-rc.d ssh defaults

From a local machine now you can access your remote machine.
Suppose the remote machine has address 192.168.0.123
In your local machine you type

ssh root@192.168.0.123

It asks for password and you are logged into remote machine
as if you were sitting there.

2. vncserver
------------
If you don't have it, install vncserver.
Through the remote ssh connection, or by sitting at the
remote PC you can type
vncserver :1 geometry 1024x768

This will start up another x session on remote machine.
From you local machine, you can log into it using RDesktop
The address you supply in this format:
192.168.0.123:1

Hey preseto you have complete screen on your PC of remote machine,
and the ability to control it remotely.

All of these you can try with Knoppix 3.4 LiveCD without having to install
anything. (Knoppix 3.6 does not have vncserver preinstalled).


 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      09-09-2004, 01:12 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-09-08, the_dba <(E-Mail Removed)> wrote:
> I'd like to be able to monitor
> hosts (Linux, Solaris, and Windows) using check_ssh THROUGH the WEB
> interface (it works fine from the command-line).


Well, the web interface only really displays the results of checks that
have been configured; you can't specify a custom check through the web.

> I'm missing
> something simple. I'm running on Linux (2.4.21) with Apache (2.0.50).
> In /usr/local/nagios/etc/services.cfg, I find FTP, HTTP, POP3, and
> SMTP "service_descriptions". I'm hoping that a SSH
> service_description is also available.


Is it in your checkcommands.cfg? If not, you need to add it, then add
the appropriate entry in services.cfg. Adding an entry to
checkcommands.cfg is usually pretty easy--all you need is a made-up
command_name and the correct command_line. Since you seem to have a
command line that works, I'd suggest adjusting that to a
checkcommands.cfg entry.

> Since I find check_ssh in the
> libexec directory (/usr/local/nagios/libexec/check_ssh), I'm figuring
> that I don't need to write my own plugin/etc. Nonetheless, I'm
> clueless on how to proceed. Please help me get a clue.


You don't need to write the plugin (not if it already works through the
command line!), but you do need to add the right entry to checkcommands.cfg.
Otherwise you can't add it to services.cfg, nagios won't monitor it, and
the web interface can't show you the results of what nagios isn't
monitoring. It's not trivial, but it's not difficult, either.

If you have further trouble, you should post back to this thread with
more details.

- --keith

- --
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBP638hVcNCxZ5ID8RAjsSAJ0TkQVLqiDSFh5bkYevNY K9QxyuBwCeNRob
3zCOZrjop8pexMvB3dAm9Qs=
=wght
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Walter Schiessberg
Guest
Posts: n/a

 
      09-09-2004, 01:28 AM
the_dba wrote on 08.09.2004 18:16:
> <SIGH> I'm gonna get flamed </SIGH>. After RTFM'ing & searching the
> newsgroups, I'm still a bit lost. I'd like to be able to monitor
> hosts (Linux, Solaris, and Windows) using check_ssh THROUGH the WEB
> interface (it works fine from the command-line). I'm missing
> something simple. I'm running on Linux (2.4.21) with Apache (2.0.50).
> In /usr/local/nagios/etc/services.cfg, I find FTP, HTTP, POP3, and
> SMTP "service_descriptions". I'm hoping that a SSH
> service_description is also available. Since I find check_ssh in the
> libexec directory (/usr/local/nagios/libexec/check_ssh), I'm figuring
> that I don't need to write my own plugin/etc. Nonetheless, I'm
> clueless on how to proceed. Please help me get a clue.


I guess you try to monitor the SSH deamon? This is what check_ssh is
meant for.

Have you tried something like this in services.cfg:

# SSH
define service{
use generic-service
host_name host
service_description SSH
check_command check_ssh
}

If you want to monitor machines _via_ SSH you use check_by_ssh and might
want to look at these pages:
<http://www.totkat.org/pages/nconf_commands.shtml>,
<http://article.gmane.org/gmane.network.nagios.plugins/920>.

HTH

Walter

--
It works! Now if only I could remember what I did...
 
Reply With Quote
 
Walter Schiessberg
Guest
Posts: n/a

 
      09-09-2004, 01:30 AM
7 wrote on 08.09.2004 22:36:
[completly misunderstood the question]

This is not about how to reach a remote machine, this is about how to
use the check_ssh plugin of Nagios or how to monitor machines via SSH
with Nagios.

Walter
 
Reply With Quote
 
the_dba
Guest
Posts: n/a

 
      09-09-2004, 03:19 PM
I extend my gratitude to both Walter and Keith. Between your posts, I
was able to quickly implement monitoring via SSH. I don't typically
allow PING (or any ICMP) on my networks -- neither through the
firewall nor internally. The check_ssh module is wonderful. Contrary
to some suggestions [on the web], it's not necessary to setup PKI for
check_ssh. Key-pairs are only required for check_by_ssh.

You guys have been extremely helpful.

At the risk of "pushing my luck," has anyone been able to use the
check_oracle plugin? I'm using Oracle's Instant Client. I have
several years of Oracle DBA experience... yet I'm baffled. I've set
the TNS_ADMIN and ORACLE_HOME variables (exported & available in
current shell). Nonetheless, the check_oracle plugin fails with
"Cannot determine ORACLE_HOME for sid." Let me know if you have any
insight. I should add that I'm trying to monitor REMOTE Oracle
instances [with different ORACLE_HOMES -- on Windows and on Solaris].
Thanks.

Again, thanks for your help!

- Todd

> Have you tried something like this in services.cfg:
>
> # SSH
> define service{
> use generic-service
> host_name host
> service_description SSH
> check_command check_ssh
> }

 
Reply With Quote
 
Keith Keller
Guest
Posts: n/a

 
      09-09-2004, 08:18 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 2004-09-09, the_dba <(E-Mail Removed)> wrote:
>
> At the risk of "pushing my luck," has anyone been able to use the
> check_oracle plugin?


I have not, but it's just a shell script. You might be able to figure
out what's wrong by looking through it. (And if it does have to come to
writing your own plugin, you could use that script as a base.)

- --keith

- --
kkeller-(E-Mail Removed)
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBQLqAhVcNCxZ5ID8RArj2AJ91XkIh4dLXfl1ppxu8lP q8GLuElACgnEZn
F52tITl/MeZFU8vm2vUeaSk=
=wS68
-----END PGP SIGNATURE-----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios camerota Linux Networking 0 09-20-2006 09:21 AM
Nagios and Sendmail Eric Linux Networking 1 04-24-2004 11:13 PM
Nagios Configuration Mike Linux Networking 0 10-02-2003 12:15 AM
Check_snmp in Nagios mallu0987 Linux Networking 0 07-25-2003 07:24 PM
Nagios monitor says nagios isn't running but it is. Eric Vanderveer Linux Networking 0 06-28-2003 09:59 AM



1 2 3 4 5 6 7 8 9 10 11