How to install plugins
How to install plugins
Hello guys.
I 'm new to nagios and ubuntu.
I have install ubuntu on a VM and Nagios® Core™ Version 3.4.4.
I have add four hosts and mail notifications and everything works fine.
What i want is to monitor sql and mysql databases.
I have see in order to work something like this, i must install plugins.
http://exchange.nagios.org/directory/Pl ... ases/MySQL
http://exchange.nagios.org/directory/Pl ... /SQLServer
I have search how to install plugins and i don't understand how.
Have someone a step by step guide how to install and configure plugins?
Or the patience to help me
Thank you.
I 'm new to nagios and ubuntu.
I have install ubuntu on a VM and Nagios® Core™ Version 3.4.4.
I have add four hosts and mail notifications and everything works fine.
What i want is to monitor sql and mysql databases.
I have see in order to work something like this, i must install plugins.
http://exchange.nagios.org/directory/Pl ... ases/MySQL
http://exchange.nagios.org/directory/Pl ... /SQLServer
I have search how to install plugins and i don't understand how.
Have someone a step by step guide how to install and configure plugins?
Or the patience to help me
Thank you.
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: How to install plugins
All you will need to do is add your plugins to the plugins directory created by installing the nagios plugins package. This will ensure Nagios can reach, read, and execute the plugins if need be. Once they have been added to that directory you will need to define a command definition, then simply add that command definition to your host/service configs when creating them and they will use whatever you have defined there, please see the following for help defining commands:
http://nagios.sourceforge.net/docs/3_0/ ... ml#command
http://nagios.sourceforge.net/docs/3_0/ ... ml#command
Re: How to install plugins
Hi,
I have download from below the checkMySQLProcesslist.sh and add it to /usr/local/nagios/libexec/
https://github.com/tart/CheckMySQLProcesslist
Also i have add the following commands to commands file and host file.
Finally i get the error that i attached (mysql)
With the same procedure i have install also the following plugin and i get also an error (disk.jpg).
http://exchange.nagios.org/directory/Pl ... MP/details
Am i doing something wrong?
Thank you
I have download from below the checkMySQLProcesslist.sh and add it to /usr/local/nagios/libexec/
https://github.com/tart/CheckMySQLProcesslist
Also i have add the following commands to commands file and host file.
Code: Select all
[b]##### commands #####[/b]
# 'checkMySQLProcesslist' command definition
define command{
command_name checkMySQLProcesslist
command_line /usr/local/nagios/libexec/checkMySQLProcesslist.sh -u root -p Cas******* -s 60 -w 20 -c 50
}
Code: Select all
[b]##### Host_file #####[/b]
define service{
use generic-service
host_name **********DEV01
service_description checkMySQLProcesslist
check_command checkMySQLProcesslist
}
With the same procedure i have install also the following plugin and i get also an error (disk.jpg).
http://exchange.nagios.org/directory/Pl ... MP/details
Am i doing something wrong?
Thank you
- Attachments
-
- mysql.png (7.44 KiB) Viewed 2744 times
-
- disk.png (7.84 KiB) Viewed 2744 times
Re: How to install plugins
Hi alexmati,
The first thing to try would be to run the command from the command line.
In your case, you would cd into the plugins directory and run;
Does it produce the correct output?
Thank you.
Kind Regards,
Gary Shergill
Code: Select all
[b]##### commands #####[/b]
# 'checkMySQLProcesslist' command definition
define command{
command_name checkMySQLProcesslist
command_line /usr/local/nagios/libexec/checkMySQLProcesslist.sh -u root -p Cas******* -s 60 -w 20 -c 50
}
In your case, you would cd into the plugins directory and run;
Code: Select all
./checkMySQLProcesslist.sh -u root -p Cas******* -s 60 -w 20 -c 50
Thank you.
Kind Regards,
Gary Shergill
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: How to install plugins
Thanks for the help Gshergill.
Re: How to install plugins
Here is the results:
I am sure that is something very easy but i don't know what.
I don't have the experience
Code: Select all
:/usr/local/nagios/libexec# ./checkMySQLProcesslist.sh -u root -p Cas***** -s 60 -w 20 -c 50
./checkMySQLProcesslist.sh: line 4: syntax error near unexpected token `newline'
./checkMySQLProcesslist.sh: line 4: `<!DOCTYPE html>'
I don't have the experience
Re: How to install plugins
Hi alexmati,
Did you just copy and paste the code from the link below into a file called "checkMySQLProcesslist.sh"?
https://github.com/tart/CheckMySQLProce ... esslist.sh
Can you post your plugin here please? (can just use cat)
Kind Regards,
Gary Shergill
Did you just copy and paste the code from the link below into a file called "checkMySQLProcesslist.sh"?
https://github.com/tart/CheckMySQLProce ... esslist.sh
Can you post your plugin here please? (can just use cat)
Kind Regards,
Gary Shergill
Re: How to install plugins
Hi gshergill,
I have download the checkMySQLProcesslist.sh file from this link https://github.com/tart/CheckMySQLProcesslist and copy to the libexec folder.
I have also give access rights to execute the file.
Thank you
I have download the checkMySQLProcesslist.sh file from this link https://github.com/tart/CheckMySQLProcesslist and copy to the libexec folder.
I have also give access rights to execute the file.
Thank you
- Attachments
-
- checkMySQLProcesslist.sh
- (86.27 KiB) Downloaded 134 times
Re: How to install plugins
Hi alexmati,
I don't know if it's just the file you sent is in an odd format, but the script isn't at all downloaded correctly.
I would recommend you copy the old one under a new name, and go the to link I sent in the last post and just copy and paste the code from there into a new file;
Should look similar to that depending on your distro.
Alternatively, use the one I've attached.
Kind Regards,
Gary Shergill
I don't know if it's just the file you sent is in an odd format, but the script isn't at all downloaded correctly.
I would recommend you copy the old one under a new name, and go the to link I sent in the last post and just copy and paste the code from there into a new file;
Code: Select all
mv checkMySQLProcesslist.sh checkMySQLProcesslist-old.sh
vi checkMySQLProcesslist.sh
<paste in the new code, save and exit>
chmod a+x checkMySQLProcesslist.sh
chown nagios:nagios checkMySQLProcesslist.sh
Alternatively, use the one I've attached.
Kind Regards,
Gary Shergill
- Attachments
-
- checkMYSQLProcesslist.sh
- (10.92 KiB) Downloaded 401 times
Re: How to install plugins
Hi gshergill,
I have copy and paste the code and i have an error:
The same results with the file that you send me.
Thank you
I have copy and paste the code and i have an error:
Code: Select all
./checkMySQLProcesslist.sh: line 45: mysql: command not found
UNKNOWN no processlist
Thank you