Page 2 of 2
Re: PERL Scripts are not working
Posted: Tue Apr 19, 2016 7:04 pm
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

)
Re: PERL Scripts are not working
Posted: Tue Apr 19, 2016 10:39 pm
by absarcompass
Thank you very much guys
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
Re: PERL Scripts are not working
Posted: Wed Apr 20, 2016 11:15 am
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.