Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Directory
paul.jobb
bypaul.jobb, November 29, 2016
nice plugin, perfect for what I need
Made the following modifications to allow for using a windows login instead of a SQL server account
edited /etc/freetds.conf and added the following entries to the [global] section.
tds version = 7.0
use ntlmv2 = yes (required in my environment anyways)
You could also create a .freetds.conf file in the nagios home folder if you prefer.
changed the regex slightly to allow for backslashes in username
was
// Validate the username
if (isset($db_user)) {
if (!preg_match("/^[a-zA-Z0-9-]{2,32}$/", $db_user)) {
print "UNKNOWN: Invalid characters in the username.
";
// exit(3);
changed to
// Validate the username
if (isset($db_user)) {
if (!preg_match("/^[\a-zA-Z0-9-]{2,32}$/", $db_user)) {
print "UNKNOWN: Invalid characters in the username.
";
// exit(3);
supply --username as follows
check_mssql -H sqlserver --username DOMAIN\user.id --password 12345
Made the following modifications to allow for using a windows login instead of a SQL server account
edited /etc/freetds.conf and added the following entries to the [global] section.
tds version = 7.0
use ntlmv2 = yes (required in my environment anyways)
You could also create a .freetds.conf file in the nagios home folder if you prefer.
changed the regex slightly to allow for backslashes in username
was
// Validate the username
if (isset($db_user)) {
if (!preg_match("/^[a-zA-Z0-9-]{2,32}$/", $db_user)) {
print "UNKNOWN: Invalid characters in the username.
";
// exit(3);
changed to
// Validate the username
if (isset($db_user)) {
if (!preg_match("/^[\a-zA-Z0-9-]{2,32}$/", $db_user)) {
print "UNKNOWN: Invalid characters in the username.
";
// exit(3);
supply --username as follows
check_mssql -H sqlserver --username DOMAIN\user.id --password 12345
I really like this plugin. I made a small mod to allow for overriding the root folder as we group ours in folders based on function, As someone else mentioned its a little easier for alerting in bigger IT organizations.
Owner's reply
Thanks Paul. Feel free to fork the project on GitHub and submit a pull request to include the override of the root folder. Grtz. Willem