Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

No option for socket (zabbix script) #102

Open
@atsusta

Description

@atsusta

Recently I downloaded version 1.1.8 and made scripts by make.sh.

And in script release/percona-monitoring-plugins-1.1.8/zabbix/script/ss_get_mysql_stats.php, array $opts has no content 'socket'.

I checked 1.1.7 and this issue would be remained for a while.

Please add 'socket' for $opts

# ============================================================================
# Validate that the command-line options are here and correct
# ============================================================================
function validate_options($options) {
   $opts = array('host', 'items', 'user', 'pass', 'nocache', 'port', 'server-id');
   # Show help
   if ( array_key_exists('help', $options) ) {
      usage('');
   }

   # Required command-line options
   foreach ( array('host', 'items') as $option ) {
      if ( !isset($options[$option]) || !$options[$option] ) {
         usage("Required option --$option is missing");
      }
   }
   foreach ( $options as $key => $val ) {
      if ( !in_array($key, $opts) ) {
         usage("Unknown option --$key");
      }
   }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions