Re: 5.3.0 Upgrade
Posted: Mon Oct 24, 2016 12:50 pm
Sure, sorry I'm a bit of a beginner with this. What is the correct way to run these on the command line?
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
/usr/local/nagios/libexec/check_mssqlCode: Select all
// 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.\n";
exit(3);
}
} else {
print "UNKNOWN: You must specify a username for this DB connection.\n";
exit(3);
}Code: Select all
// 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.\n";
exit(3);
}
} else {
print "UNKNOWN: You must specify a username for this DB connection.\n";
exit(3);
}