patch ss_get_by_ssh.php to gather mongodb stats w/o ssh

Bug #1050537 reported by americano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Monitoring Plugins
Fix Released
Low
Unassigned

Bug Description

The original ss_get_by_ssh.php does not allow to collect statistics mongodb without ssh, directly from mongodb on hostname differ from localhost. There is the patch is designed to solve this problem.

--- ss_get_by_ssh.php.orig 2012-06-14 20:44:11.000000000 +0100
+++ ss_get_by_ssh.php 2012-09-13 18:18:00.713555747 +0100
@@ -1317,7 +1317,8 @@

 function mongodb_cmdline ( $options ) {
    $port = isset($options['port2']) ? " --port $options[port2]" : '';
- return "echo \"db._adminCommand({serverStatus:1, repl:2})\" | mongo$port";
+ $host = isset($options['server']) ? " --host $options[server]": ' ';
+ return "echo \"db._adminCommand({serverStatus:1, repl:2})\" | mongo$host$port";
 }

Please include it in a set of scripts.

 Thanks.

Tags: mongodb
tags: added: mongodb
Changed in percona-monitoring-plugins:
milestone: none → 1.0.3
Changed in percona-monitoring-plugins:
status: New → In Progress
Changed in percona-monitoring-plugins:
status: In Progress → Fix Committed
summary: - patch ss_get_by_ssh.php to gather mongodb
+ patch ss_get_by_ssh.php to gather mongodb stats w/o ssh
Changed in percona-monitoring-plugins:
importance: Undecided → Low
Changed in percona-monitoring-plugins:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.