gwaugaman / mikoomi

Automatically exported from code.google.com/p/mikoomi
0 stars 0 forks source link

oplog size #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Why are these lines commented out:

       //$col_name = "oplog.rs" ;
       //$mongo_collection = $mongo_db_handle->$t ;
       //echo "aaa\n" ;
       //$rs_status = $mongo_collection->count() ;
       //echo "aaa\n" ;
       //write_to_data_file("$zabbix_name oplog.rs_count " . $rs_status)  ;

When I uncomment "write_to_data_file("$zabbix_name oplog.rs_count " . 
$rs_status)  ;" I get "oplog.rs_count Array" in my data file. 

Can someone help me fix this?

Original issue reported on code.google.com by bcar...@rallydev.com on 27 Oct 2011 at 3:03

GoogleCodeExporter commented 9 years ago
I added this code and it works

       $mongo_db_handle_local = $mongo_connection->selectDB("local") ;
       $command = "db.oplog.rs.count" ;
       $oplog_rs_count = $mongo_db_handle_local->execute("$command") ;
       write_to_data_file("$zabbix_name oplog.rs_count " . $oplog_rs_count['retval'])  ;

Original comment by bcar...@rallydev.com on 27 Oct 2011 at 4:24