PERL Scripts are not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: PERL Scripts are not working

Post by absarcompass »

Hi ,
I actually copied the odbc.ini from old to new nagios in same directory format and permissions [Now i have run a diff too ;)] they are identical.
I am uploading all the three plugins that i mentioned in examples above.
check_sql-jobhistory.pl
check_sql-query.pl
plugin_capture.pl
There are other perl scripts but i have uploaded only the ones that i have already pasted as an example.

Thanks for your patience and help guys much appreciated (please resolve this :? )
You do not have the required permissions to view the files attached to this post.
absarcompass
Posts: 182
Joined: Thu May 14, 2015 9:57 pm

Re: PERL Scripts are not working

Post by absarcompass »

Thank you very much guys :D
its working now
It was such a stupid mistake i was using the wrong directory for odbc.ini and odbcint.ini in NagiosXI (have to use default Centos directory i-e /etc)

https://www.centos.org/forums/viewtopic ... 75#p201783
Re: Freetds and unixodbc
Postby TrevorH » 2014/07/25 20:35:53

Why are you using ODBC from /usr/local instead of the CentOS supplied ones from the unixODBC packages?

I don't use 2014 but have multiple machines talking to 2008 using the CentOS supplied packages. You need both /etc/odbcinst.ini and /etc/odbc.ini set up and you only mention one of those. All I have is an entry in odbcinst.ini that looks like this

CODE: SELECT ALL
[FreeTDS]
Description=FreeTDS MSSQL Driver
Driver=/usr/lib64/libtdsodbc.so.0
UsageCount=1


and one in odbc.in like this

CODE: SELECT ALL
[mssql]
Driver=FreeTDS
Description=MS SQL
Server=mssql.company.com
Port=1433
Database=Database_Name


I have this lot installed

CODE: SELECT ALL
$ rpm -qa | grep -i odbc | sort
perl-DBD-ODBC-1.23-1.el5.rf
unixODBC-2.2.11-10.el5
unixODBC-2.2.11-10.el5
unixODBC-libs-2.2.11-10.el5
unixODBC-libs-2.2.11-10.el5


(Yes, this is el5 but I'm fairly sure it'll all work on el6 as well).
Full time Geek, part time moderator. Use the FAQ Luke
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: PERL Scripts are not working

Post by rkennedy »

Ah! Great to hear you got it working.

Going to close this one out now, but feel free to make a new thread if you require any assistance in the future.
Former Nagios Employee
Locked