Page 2 of 2

Re: PERL Scripts are not working V2

Posted: Thu May 05, 2016 7:13 pm
by absarcompass
Hi guys,
sorry was away couldn't update you guys
the error messages mentioned above have these two plugins involve.
  • plugin_capture.pl
    ,
    check_database_table_locking.pl
can you please have a look what could have been an issue here

Thanks

Re: PERL Scripts are not working V2

Posted: Thu May 05, 2016 9:01 pm
by Box293
Try:

Code: Select all

yum install perl-Time-modules perl-MIME-Lite

Re: PERL Scripts are not working V2

Posted: Thu May 05, 2016 9:14 pm
by absarcompass
Thanks Box293,
It has changed the erroneous output.
[root@nagiosxi libexec]# ./plugin_capture.pl /usr/local/nagios/libexec/check_database_table_locking.pl DATABASE
DBI connect('server=localhost;database=sql_jobs','sql_jobs',...) failed: Access denied for user 'sql_jobs'@'localhost' (using password: YES) at /usr/local/nagios/libexec/check_database_table_locking.pl line 271

Re: PERL Scripts are not working V2

Posted: Thu May 05, 2016 10:44 pm
by Box293
That no longer looks like a plugin issue but more of some sort of config required for the plugin.

You'll need to refer to the documentation on these plugins to find out what is required. If it's working on your old server, then it should just be a matter of looking at how the plugins run on the old server.

Re: PERL Scripts are not working V2

Posted: Thu May 19, 2016 7:35 pm
by absarcompass
Hi Guys,
I am unable to locate the issue.
will try running the tcpdump on both the server to check what the plugin is passing or passing incorrectly.

Re: PERL Scripts are not working V2

Posted: Thu May 19, 2016 11:35 pm
by rkennedy
Is your SQL server only allowing specific IP's? That could be the issue.

Re: PERL Scripts are not working V2

Posted: Sun May 22, 2016 8:28 pm
by absarcompass
Yes, I can connect to server via isql and can run queries but same query is only working on old one, not in nagiosXI
although DB connections is established.
Had no luck with tcpdump as of yet, I only get database connection establishment and acknowledgement packets nothing of sort the values being passed within.
will dig more though

Re: PERL Scripts are not working V2

Posted: Mon May 23, 2016 9:43 am
by rkennedy
From the CLI can you authenticate to the remote SQL server? For example I can run this from the local XI machine and it works. Replace the values as needed for your DB.

Code: Select all

mysql -uroot -pnagiosxi -hlocalhost

Re: PERL Scripts are not working V2

Posted: Mon Aug 08, 2016 10:31 pm
by absarcompass
Hi Guys,
This issue was fixed, and my apologies for not updating this post.
I had to change the version in my freetds.conf to make scripts work.
you helpful guys can lock this thread now :D

Re: PERL Scripts are not working V2

Posted: Tue Aug 09, 2016 9:22 am
by tmcdonald
Thanks for getting back to us!