LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to remove installed plugin (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-remove-installed-plugin-780457/)

prak86 01-07-2010 12:13 AM

How to remove installed plugin
 
Hi
Currently i am working in nagios and i have installed check_mysql_health plugin in the nagios monitoring server and after installing this plugin, i removed the MySQL in my system and installed another version of MySQL and now also my plugin is showing the error as

[root@wipro libexec]# ./check_mysql_health --hostname wipro --username root --password root123 --mode connection-time

CRITICAL - cannot connect to information_schema. install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: . /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (eval 13) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge.
at ./check_mysql_health line 1506

I have MySQL 5.0.8 in my machine. Can anyone explain me whats going wrong for me or can anyone let me know how to remove the installed plugin.

rajnikant.sharma 01-07-2010 01:00 AM

Are you able to install this plugin again? if yes then , please install it, other wise you have to do some changes in its configuration file

Lee_Ball 01-07-2010 01:58 AM

You mentioned you installed another verison of MySQL. Have you changed the password to match the one in you check_mysql_health?

centosboy 01-11-2010 03:17 AM

Quote:

Originally Posted by prak86 (Post 3817139)
Hi
Currently i am working in nagios and i have installed check_mysql_health plugin in the nagios monitoring server and after installing this plugin, i removed the MySQL in my system and installed another version of MySQL and now also my plugin is showing the error as

[root@wipro libexec]# ./check_mysql_health --hostname wipro --username root --password root123 --mode connection-time

CRITICAL - cannot connect to information_schema. install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: . /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8) at (eval 13) line 3.
Perhaps the DBD::mysql perl module hasn't been fully installed,
or perhaps the capitalisation of 'mysql' isn't right.
Available drivers: DBM, ExampleP, File, Proxy, Sponge.
at ./check_mysql_health line 1506

I have MySQL 5.0.8 in my machine. Can anyone explain me whats going wrong for me or can anyone let me know how to remove the installed plugin.



You might have to do a small bit of work to get this working.


I also done a reinstall of mysql and it installed in a different location and now DBD::mysql will not work because it cant find /usr/local/mysql/lib/libmysqlclient.so.

So you will probably need to sym link the old location to the new or rebuild the DBD::mysql perl module.

prak86 01-20-2010 03:44 AM

Quote:

Originally Posted by Lee_Ball (Post 3817221)
You mentioned you installed another verison of MySQL. Have you changed the password to match the one in you check_mysql_health?

After installing another version of mysql only i installed nagios itself.

still if i want to match the password means, can u explain how to do it.

prak86 01-20-2010 03:46 AM

Quote:

Originally Posted by centosboy (Post 3822159)
You might have to do a small bit of work to get this working.


I also done a reinstall of mysql and it installed in a different location and now DBD::mysql will not work because it cant find /usr/local/mysql/lib/libmysqlclient.so.

So you will probably need to sym link the old location to the new or rebuild the DBD::mysql perl module.


Can u pls explain me in detail how to do this sym link as i was new to linux.

centosboy 01-20-2010 04:08 AM

Quote:

Originally Posted by prak86 (Post 3833221)
Can u pls explain me in detail how to do this sym link as i was new to linux.


can you reinstall DBD::mysql perl module?

Code:


yum install perl-DBD-MySQL


prak86 01-20-2010 04:13 AM

Quote:

Originally Posted by centosboy (Post 3833237)
can you reinstall DBD::mysql perl module?

Code:


yum install perl-DBD-MySQL


In my vm yum commands wont work as there is no network connectivity, it shows the error

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?releas...h=i386&repo=os error was
[Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Error: Cannot find a valid baseurl for repo: base


can to tell me the link so that i can get it download from my workstation and try to install it?

prak86 01-20-2010 04:19 AM

Hi,
I got the rpm files for this. Should i make any configuration change while installing this rpm file?

centosboy 01-21-2010 03:14 AM

Quote:

Originally Posted by prak86 (Post 3833248)
Hi,
I got the rpm files for this. Should i make any configuration change while installing this rpm file?

No.
Just installing it should be ok....
But read below also as there are options.

Your old mysql installation has the libmysqlclient.so module installed in the lib directory.
Your new installation does too but it is in a different location.
The perl DBD::mysql installation when installed from source or cpan looks for this module at /usr/local/mysql/lib/libmysqlclient.so.
YOu didnt really say how you installed the newest version of mysql, but at a guess i would say if you searched for the libmysqlclient.so within that installation, it would be in a different location. Maybe something like /usr/local/mysql-5.1.39-linux-x86_64-glibc23/lib/libmysqlclient.so.
So there are a number of solutions to this. One is to symlink the new installation directory to a name like mysql.


Firstly, check the location of the old installation if it still exists.

Secondly , change into the directory of the new installation.

Code:


[root@xxxx ~]# ls -la | grep mysql*
drwxr-xr-x  2 root root      4096 Jan 21 09:07 mysql-1234

do this


Code:

ln -s mysql-1234 mysql
and then check


Code:

root@xxxx testmysql]# ls -la
total 16
drwxr-xr-x  3 root root 4096 Jan 21 09:09 .
drwxr-x--- 41 root root 4096 Jan 21 09:08 ..
lrwxrwxrwx  1 root root  10 Jan 21 09:09 mysql -> mysql-1234
drwxr-xr-x  2 root root 4096 Jan 21 09:09 mysql-1234

then just make sure you can cd mysql/lib/ and in here you should see the libmysqlclient.so.

if you cant, then create a symlink so that it links to whereever it is.

Find mysqlclient.so using locate if need be.

prak86 01-21-2010 04:17 AM

Hi,
I installed MySQL-client-community-5.0.87-0.rhel5.i386.rpm and MySQL-server-community-5.0.87-0.rhel5.i386.rpm and
after that i am able to access the Mysql

When i tried to install perl-DBD-MySQL-3.0007-2.el5.i386.rpm file, it shows the failed dependency error for libmysqlclient.so .
and also there is no directory in my vm named as mysql in /usr/local/

If i search for libmysqlclient.so but the response for that file is zero.i downloaded the rpm file for libmysqlclient.so and tried
to install perl-DBD-MySQL then this shows lot of failed dependency error.


i tried the code

[root@localhost ~]# ls -la | grep mysql*
-rw------- 1 root root 839 Jan 21 15:03 .mysql_history


is this is the right thing to come?

then also i followed

[root@localhost ~]# ln -s mysql_history mysql

[root@localhost ~]# ls -la
total 307632

rwxrwxrwx 1 root root 13 Jan 21 15:25 mysql -> mysql_history
-rw------- 1 root root 839 Jan 21 15:03 .mysql_history


Let me know where i goes wrong.

centosboy 01-21-2010 04:41 AM

Quote:

Originally Posted by prak86 (Post 3834717)
Hi,
I installed MySQL-client-community-5.0.87-0.rhel5.i386.rpm and MySQL-server-community-5.0.87-0.rhel5.i386.rpm and
after that i am able to access the Mysql

When i tried to install perl-DBD-MySQL-3.0007-2.el5.i386.rpm file, it shows the failed dependency error for libmysqlclient.so .
and also there is no directory in my vm named as mysql in /usr/local/

If i search for libmysqlclient.so but the response for that file is zero.i downloaded the rpm file for libmysqlclient.so and tried
to install perl-DBD-MySQL then this shows lot of failed dependency error.


i tried the code

[root@localhost ~]# ls -la | grep mysql*
-rw------- 1 root root 839 Jan 21 15:03 .mysql_history


is this is the right thing to come?

then also i followed

[root@localhost ~]# ln -s mysql_history mysql

[root@localhost ~]# ls -la
total 307632

rwxrwxrwx 1 root root 13 Jan 21 15:25 mysql -> mysql_history
-rw------- 1 root root 839 Jan 21 15:03 .mysql_history


Let me know where i goes wrong.


Oh goodness. Remove that link.
My fault..i have explained this badly.

run rm -rf mysql in the directory you created the symlink.

you shouldnt be using rpm to install the DBD-mysql perl module.
Use yum instead. The rpm you are trying to install is pretty old. Any reason you are installing that one??

perl-DBD-mysql-4.013-1.el5.rf --> is the version yum would install.

if you are still having issues, give me your msn or yahoo id and i will talk to you in realtime.
i fear you arent understanding what im saying on here....

prak86 01-24-2010 11:55 PM

Hi

Thank you for your guidace still now i resolved this problem when i tried with anoter vm in this i installed the same
version that comes along with the centos package which is working fine for me and now i am able to monitor mysql using nagios.

meanwhile i learned something on working with centos with u.

keep the good work going on.

centosboy 01-25-2010 09:35 AM

Quote:

Originally Posted by prak86 (Post 3839370)
Hi

Thank you for your guidace still now i resolved this problem when i tried with anoter vm in this i installed the same
version that comes along with the centos package which is working fine for me and now i am able to monitor mysql using nagios.

meanwhile i learned something on working with centos with u.

keep the good work going on.

thats great if you learnt something. exactly what this forum is for.


All times are GMT -5. The time now is 10:50 AM.