MSSQL using NSClient++
Re: MSSQL using NSClient++
what is the syntax to displace output?
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL using NSClient++
Just like you are doing in your other thread, except use this command, "of course you need to fill in the ARG sections, and the hostaddress yourself:"
Code: Select all
/usr/lib/nagios/plugins/check_mssql_sproc.pl -H $HOSTADDRESS$ -p "sp_CheckCoreLastDeliveredBusHours" -u sa -P "dusT#Controle" -w $ARG1$ -c $ARG2$Re: MSSQL using NSClient++
ok so i just tried this :
/usr/lib/nagios/plugins/check_mssql_sproc.pl -H 10.200.50.176 -p "sp_CheckCoreLastDeliveredBusHours" -u sa -P "dusT#Controle" -w 1 -c 2
and got this:
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 3) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
at /usr/lib/nagios/plugins/check_mssql_sproc.pl line 68
/usr/lib/nagios/plugins/check_mssql_sproc.pl -H 10.200.50.176 -p "sp_CheckCoreLastDeliveredBusHours" -u sa -P "dusT#Controle" -w 1 -c 2
and got this:
install_driver(ODBC) failed: Can't locate DBD/ODBC.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at (eval 3) line 3.
Perhaps the DBD::ODBC perl module hasn't been fully installed,
or perhaps the capitalisation of 'ODBC' isn't right.
Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.
at /usr/lib/nagios/plugins/check_mssql_sproc.pl line 68
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL using NSClient++
Please install the following as google says, and then try the command again, we're getting closer!:
Code: Select all
yum install perl-DBD-ODBCRe: MSSQL using NSClient++
im using ubuntu and coudlnt do :
sudo apt-get install perl-DBD-ODBC
sudo apt-get install perl-DBD-ODBC
Re: MSSQL using NSClient++
Try:
Code: Select all
apt-get install libdbd-odbc-perlFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: MSSQL using NSClient++
alright, i installed that program and ran this again:
/usr/lib/nagios/plugins/check_mssql_sproc.pl -H 10.200.50.176 -p "sp_CheckCoreLastDeliveredBusHours" -u sa -P "dusT#Controle" -w 1 -c 2
and got this:
DBI connect('Driver={SQL Server};SERVER=10.200.50.176','sa',...) failed: [unixODBC][Driver Manager]Data source name not found, and no defa ult driver specified (SQL-IM002) at /usr/lib/nagios/plugins/check_mssql_sproc.pl line 68
Error: Unable to connect to MS-SQL database!
/usr/lib/nagios/plugins/check_mssql_sproc.pl -H 10.200.50.176 -p "sp_CheckCoreLastDeliveredBusHours" -u sa -P "dusT#Controle" -w 1 -c 2
and got this:
DBI connect('Driver={SQL Server};SERVER=10.200.50.176','sa',...) failed: [unixODBC][Driver Manager]Data source name not found, and no defa ult driver specified (SQL-IM002) at /usr/lib/nagios/plugins/check_mssql_sproc.pl line 68
Error: Unable to connect to MS-SQL database!
Re: MSSQL using NSClient++
Check the comments at the bottom of the exchange page:
http://exchange.nagios.org/directory/Pl ... oc/details
http://exchange.nagios.org/directory/Pl ... oc/details
Good But...
bydcoote, April 19, 2011
I must admit I haven't tested thoroughly but I did wrestle for hours before finding out.
A quick change is required to make this work on *nix systems. Damn case sensitive.
For *nix systems
$conn{"dsn"} = "dbi:ODBC:Driver={SQL Server};SERVER=" . $conn{"server"};
Should read
$conn{"dsn"} = "dbi:ODBC:DRIVER={SQL Server};SERVER=" . $conn{"server"};
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: MSSQL using NSClient++
whats a nix system? im confused
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL using NSClient++
Unix/Linux "Unix like," let us know if you observe a change after modifying the line shown.