updated check_mongodb_write.pl check_mongodb_master.pl check_mongodb_master_r...
7104c8aa
Hari Sekhon
committed
2 changed files
check_mongodb_master.pl
/check_mongodb_master.pl-2+2
/check_mongodb_master.pl
Add comment 39
Add comment 40 get_options();
Add comment 41
Add comment 42 Minus  validate_mongo_hosts();
Add comment 42 Plus  $hosts = validate_mongo_hosts($host);
Add comment 43 $user = validate_user($user);
Add comment 44 $password = validate_password($password) if $password;
Add comment 45 if(scalar @hosts > 1){
Add comment 53
Add comment 54 $status = "OK";
Add comment 55
Add comment 56 Minus  my $client = connect_mongo();
Add comment 56 Plus  my $client = connect_mongo($hosts);
Add comment 57
Add comment 58 my @dbs = $client->database_names;
Add comment 59 @dbs or quit "UNKNOWN", "no databases found on Mongod server, cannot call ismaster";
check_mongodb_write.pl
/check_mongodb_write.pl-2+2
/check_mongodb_write.pl
Add comment 107 @usage_order = qw/host port database collection user password write-concern read-concern wtimeout ssl sasl sasl-mechanism warning critical precision/;
Add comment 108 get_options();
Add comment 109
Add comment 110 Minus  validate_mongo_hosts();
Add comment 110 Plus  $hosts = validate_mongo_hosts($host);
Add comment 111 $database = validate_database($database, "Mongo");
Add comment 112 $collection = validate_collection($collection, "Mongo");
Add comment 113 #unless(($user + $password) / 2 == 0) {
Add comment 159 set_timeout();
Add comment 160
Add comment 161 my $start_time = time;
Add comment 162 Minus  my $client = connect_mongo(
Add comment 162 Plus  my $client = connect_mongo( $hosts,
Add comment 163 {
Add comment 164 "w" => $write_concern,
Add comment 165 "r" => $read_concern,