Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
you know in commands.cfg, we would have to add in the commands to monitor a service (eg. http, ssh etc) I wonder if all the commands for the different services are the same? As in they have the same way of writing the command, except changing the service name:
Nagios comes with a set of pre-installed check commands. They are installed at /usr/libexec/nagios or /usr/local/nagios/libexec (anyway, the $USER1$ is expanded to the right place)
At that folder you can find several check_whatever commands, most of them are binary files, some are shell or perl scripts.
If there is not a suitable check program to a special service in your site you can write one and drop it at that folder. After that just add a definition to it, just like above.
And yes, nagios already comes with a check_ssh program:
Code:
[root@spy objects]# ../../libexec/check_ssh
check_ssh: Could not parse arguments
Usage:check_ssh [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>
[root@spy objects]# ../../libexec/check_ssh 192.168.160.253
SSH OK - OpenSSH_4.3 (protocol 2.0)
[root@spy objects]#
So, the definition for this command is something like this:
is it because i didn't have mysql plugins installed?
i thought by default when i installed the plugins, it is already installed?
yes when you compile nagios-plugin it will automatically install check_mysql but if you doesn't install mysql-client package before nagios-plugin it will not install.
Hmm, one last question:
there are a lot of ports out there, so if i want to monitor other services besides the above mentioned my_sql, i just change the service description and check_command for services.cfg and command_name and command_line in commands.cfg?
How do you had installed nagios plugins ? By compiling the source and installing it in /usr/local or by installed a deb package by apt-get ?
In the first case, search for check_mysql using "find /usr/local -iname "check_mysql".
In the last case, use "dpkg -S package_name"; in ubuntu Lucid, there are 4 packages with plugins, you have to test all you have installed: nagios-plugins, nagios-plugins-basic, nagios-plugins-standard and nagios-plugins-extra.
is it because i didn't have mysql plugins installed?
i thought by default when i installed the plugins, it is already installed?
yes when you compile nagios-plugin it will automatically install check_mysql but if you doesn't install mysql-client package before nagios-plugin it will not install.
HTH
thanks sem007,
I am also looking same kind of solution.
I have one question. if check_mysql doesn't exists and i want to install it. how can i do this? want i compile nagios-plugin again and install it? i just want one plugin.
thanks sem007,
I am also looking same kind of solution.
I have one question. if check_mysql doesn't exists and i want to install it. how can i do this? want i compile nagios-plugin again and install it? i just want one plugin.
thanks sem007,
I am also looking same kind of solution.
I have one question. if check_mysql doesn't exists and i want to install it. how can i do this? want i compile nagios-plugin again and install it? i just want one plugin.
Thanks in advance.
yes you want to compile nagios-plugin.
Install mysql-client and musql devel package
compile nagios plugin (run ./configure with option, run make, make install doesn't require)
copy check_mysql from <nagios-plugin-source>/plugins directory to your libexec dir.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.