Auteur Sujet: Le coin des barbus, Questions, réponses et blabla  (Lu 1330002 fois)

Hors ligne Seb corgan

  • Blaireau
  • Hero Member
  • Messages: 23533
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12779 de la page précédente: 18/10/12 10:38 »
Powershell : non
VmWare : je bosse un peu dessus (vu que tout est virtualisé ici)





what do u need to know ?

bah pour faire simple je dois faire un script qui résume la situation des LUN utilisées pour des disques en rawdevice :
  • Quelles sont les VM qui utilisent des disques en rawdevice ? Quelles sont les LUN dédiées à ces disques ? [#00AA55]Ca c'est OK [/#00AA55]
  • Quels sont les disques en rawdevice orphelins (assignés à aucune machine) ? Quelles sont les LUN dédiées à ces disques ? [#00AA55]Ca c'est OK [/#00AA55]
  • Quelles sont les LUN dispos pour faire du rawdata (logiquement les LUN complètement inutilisées même par exemple par des disques classiques) ? [#FF0000]Ca c'est pas OK[/#FF0000]

    Cette liste j'arrive à l'avoir à partir du client VSphere, quand par exemple je fais mine de vouloir rajouter un disque à une VM, qu'en type de disque je choisis "Mappage de périphériques bruts" j'ai ensuite une fenêtre qui me liste ces LUN dispos.

    [ Image 1 ]

    mais ce n'est qu'un affichage, rien n'est sélectionnable et encore moins exportable. Il faut que j'arrive à récupérer cette liste via script.
    Des listes j'arrive à en récupérer mais pour l'instant rien de cohérent avec la liste de la capture d'écran :D
    Déjà je ne comprend pas comment vsphere constitue cette liste (rien qu'avec les politiques de multipath je récupère 30 fois trop de trucs, si je filtre un peu là c'est l'inverse il ne me reste plus assez de choses  [:matleflou] )

    Voilà je patauge un peu car je ne comprend pas déjà comment cette liste est constituée :D
Le rock c'est rouky

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12780 le: 18/10/12 11:02 »
Jamais fais , en tout cas comme ça.

Un export depuis le SAN en serait pas plus simple ?
I'm a I3omI3 !

Hors ligne Seb corgan

  • Blaireau
  • Hero Member
  • Messages: 23533
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12781 le: 18/10/12 11:13 »
pas accès au SAN, aucune idée de comment c'est branlé :o
Et puis je me dis que si c'est dispo depuis le client VSphere avec mon compte c'est que ça doit être faisable (niveau droits en tout cas) en powershell :D
Le rock c'est rouky

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12782 le: 18/10/12 11:50 »
C ets domage , obtenir des export depuis ets baie NETAPP aurait été plus simple.

Mes experts Virtu sont débordé, je vais essayer de t aider quand je pourrais
I'm a I3omI3 !

Hors ligne Seb corgan

  • Blaireau
  • Hero Member
  • Messages: 23533
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12783 le: 18/10/12 13:37 »
c'est gentil :D
Le rock c'est rouky

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12784 le: 19/10/12 16:25 »
re, bon je pense que c'est pour du monitoring , donc voila la méthode mais en pearl :

A mettre en place

http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_vmware3-2Epl/details

Spoiler: ShowHide
#!/usr/bin/perl -w
#
# nagios: -epn
#
# check_vmware3.pl
# should work with any VMWare Infrastructure
#
# All operations work with VMware VirtualCenter 2.0.1 or later.
# All operations work with VMware ESX Server 3.0.1 or later.
#
#
# COPYRIGHT:
#  
# This software is Copyright (c) 2008 NETWAYS GmbH, Birger Schmidt
#                                
#      (Except where explicitly superseded by other copyright notices)
#
# LICENSE:
#
# This work is made available to you under the terms of Version 2 of
# the GNU General Public License. A copy of that license should have
# been provided with this software, but in any event can be snarfed
# from http://www.fsf.org.
#
# This work is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 or visit their web page on the internet at
# http://www.fsf.org.
#
#
# CONTRIBUTION SUBMISSION POLICY:
#
# (The following paragraph is not intended to limit the rights granted
# to you to modify and distribute this software under the terms of
# the GNU General Public License and is only of importance to you if
# you choose to contribute your changes and enhancements to the
# community by submitting them to NETWAYS GmbH.)
#
# By intentionally submitting any modifications, corrections or
# derivatives to this work, or any other work intended for use with
# this Software, to NETWAYS GmbH, you confirm that
# you are the copyright holder for those contributions and you grant
# NETWAYS GmbH a nonexclusive, worldwide, irrevocable,
# royalty-free, perpetual, license to use, copy, create derivative
# works based on those contributions, and sublicense and distribute
# those contributions and any derivatives thereof.
#
# Nagios and the Nagios logo are registered trademarks of Ethan Galstad.


use strict;
use warnings;


# version string
my $version = '0.1';


# init variables
my @msg                  = ();
my @perfdata            = ();
my $exitVal               = undef;
my @fineVMs               = ();
my @badVMs               = ();
my @missingVMs            = ();


# define states
our @state = ('OK', 'WARNING', 'CRITICAL', 'UNKNOWN');


my %opts = (
   'host' => {
      type => "=s",
      help => "Name of the host",
      required => 0,
   },
   'timeout' => {
      type => "=i",
      help => "Timeout in seconds",
      required => 0,
   },
   'ignore' => {
      type => "=s",
      help => "List of VM-Names (separated by comma, regexp possible) to ignore if state not green",
      required => 0,
   },
   'ensure' => {
      type => "=s",
      help => "List of VM-Names (separated by comma, regexp possible) for which state must be green",
      required => 0,
   },
   'vmname' => {
      type => "=s",
      help => "one single VM to check - the other checks will be suppressed",
      required => 0,
   },
   'verboseVMs' => {
      type => "=i",
      help => "list VM names as plugin output",
      required => 0,
   },
);


sub printResultAndExit {

   # stop timeout
   alarm(0);

   # print check result and exit

   my $exitVal = shift;

   #print "check_vmware3 ";
   print "$state[$exitVal]:";

   print " @_" if (defined @_);

   print "\n";

   exit($exitVal);
}


eval {
   require VMware::VIRuntime
} or printResultAndExit(3, 'Missing perl module VMware::VIRuntime. Download and install "VMware Infrastructure (VI) Perl Toolkit" from http://www.vmware.com/download/sdk/api.html');


# get command-line parameters
Opts::add_options(%opts);
Opts::parse();

Opts::validate();

if (defined Opts::get_option('help')) {
print "help";
}


# some code from check_esx3 by op5
sub get_key_metrices {
   my ($perfmgr_view, $group, @names) = @_;

   my $perfCounterInfo = $perfmgr_view->perfCounter;
   my @counters;
   my @units;

   foreach (@$perfCounterInfo) {
      if ($_->groupInfo->key eq $group) {
         my $cur_name = $_->nameInfo->key . "." . $_->rollupType->val;
         foreach my $index (0..@names-1)
         {
            if ($names[$index] =~ /$cur_name/)
            {
               $names[$index] =~ /(\w+).(\w+):*(.*)/;
               $counters[$index] = PerfMetricId->new(counterId => $_->key, instance => $3);
               $units[$index] = $_->unitInfo->label;
            }
         }
      }
   }
   return (\@counters, \@units);
}


sub get_performance_values {
   my ($view, $group, @list) = @_;
   $view->update_view_data();
   my @values;
   my $units;
   my @perf_data;
   eval {
      my $perfMgr = Vim::get_view(mo_ref => Vim::get_service_content()->perfManager);
      (my $metrices, $units) = get_key_metrices($perfMgr, $group, @list);
      my $perf_query_spec = PerfQuerySpec->new(entity => $view, metricId => $metrices, format => 'csv', intervalId => 20, maxSample => 1);
      my $perf_data = $perfMgr->QueryPerf(querySpec => $perf_query_spec);
      my $unsorted = shift(@$perf_data)->value;

      foreach my $id (@$unsorted) {
         foreach my $index (0..@$metrices-1) {
            if ($id->id->counterId == $$metrices[$index]->counterId) {
               $values[$index] = $id;
            }
         }
      }
      
   };
   foreach my $index (0..@list-1) {
      (my $name = $list[$index]) =~ tr/.:*/_/d;          # replace . with _ and delete : *
      ($name = $view->name . '_' . $group . '_' . $name) =~ s/_average//;    # prepend group and remove tailing average
      if (defined $values[$index]) {
         push (@perf_data, "${name}=" . $values[$index]->value . @$units[$index] . ';0;0;0;0');
         #push (@perf_data, "${name}=" . $values[$index]->value);
      } else {
         #push (@perf_data, "${name}=noData");
         push (@perf_data, "${name}=0;0;0;0;0");
      }
   }
   return @perf_data;
}


sub displayVM($) {

   my $vm_view = shift @_;
   my $vmname = $vm_view->name;
   my $host = '';
   my $option_host = '';
   
   if (defined Opts::get_option('host')) {
      $option_host = Opts::get_option('host');
      my $mor_host = $vm_view->runtime->host;    # this is the host that actualy runs the VM
      $host = Vim::get_view(mo_ref => $mor_host)->name;
      #print Dumper ($vm_view, $mor_host, $host) . "\n\n";
   }
   if ($option_host eq $host) {
      if (defined $vm_view->guestHeartbeatStatus) {
         push (@perfdata, "${vmname}_guestHeartbeatStatus=" . $vm_view->guestHeartbeatStatus->val);
         if ($vm_view->guestHeartbeatStatus->val eq 'green') {   # everything fine
            push (@fineVMs, $vmname);
         } else { # (gray, red, yellow?)
            push (@badVMs, $vmname);
            if ( @main::ignorelist )  {
               if ( !($vmname =~ join ('|', @main::ignorelist)) )  {   # not on ignorelist
                  # unshift (@msg,  "bad guestHeartbeatStatus (" . $vm_view->guestHeartbeatStatus->val . ") for '$vmname'");
                  $exitVal = 2; # critical
               }
            } else { # no ignorelist
               $exitVal = 2; # critical
            }
         }
      } else {
         push (@perfdata, "${vmname}_guestHeartbeatStatus=noData");
         unshift (@msg,  "unable to get guestHeartbeatStatus of " . $vmname);
         $exitVal = 2; # critical
         push (@badVMs, $vmname);
      }
      
      push (@perfdata, "${vmname}_guestState=" . $vm_view->guest->guestState);
      
      if (defined Opts::get_option('vmname')) {
         if (defined $vm_view->guest->hostName) {
            push (@perfdata, "${vmname}_hostName=" . $vm_view->guest->hostName);
         } else {
            push (@perfdata, "${vmname}_hostName=noData");
         }
         if (defined $vm_view->guest->ipAddress) {
            push (@perfdata, "${vmname}_ipAddress=" . $vm_view->guest->ipAddress);
         } else {
            push (@perfdata, "${vmname}_ipAddress=noData");
         }
         if (defined $vm_view->guest->toolsStatus) {
            push (@perfdata, "${vmname}_toolsStatus=" . $vm_view->guest->toolsStatus->val);
         } else {
            push (@perfdata, "${vmname}_toolsStatus=noData");
         }
         if (defined $vm_view->guest->toolsVersion) {
            my @requiredVersion = grep { ref($_) && $_->key eq 'vmware.tools.requiredversion' } @{$vm_view->config->extraConfig}; # filter reqver from extraConfig
            push (@perfdata, "${vmname}_toolsVersion=" . $vm_view->guest->toolsVersion . ';0;0;0;' .
               ((defined $requiredVersion[0]->value) ? $requiredVersion[0]->value : '0'));
         } else {
            #push (@perfdata, "${vmname}_toolsVersion=noData");
            push (@perfdata, "${vmname}_toolsVersion=0;0;0;0;0");
         }
         if (defined $vm_view->summary->quickStats->guestMemoryUsage) {
            push (@perfdata, $vmname . "_guestMemoryUsage=" . $vm_view->summary->quickStats->guestMemoryUsage . 'MB;0;0;0;' .
               ((defined $vm_view->summary->config->memorySizeMB) ? $vm_view->summary->config->memorySizeMB : '0'));
               # $vm_view->config->hardware->memoryMB);
               # $vm_view->summary->runtime->maxMemoryUsage);  # get it from config not runtime
         } else {
            #push (@perfdata, "${vmname}_guestMemoryUsage=noData");
            push (@perfdata, "${vmname}_guestMemoryUsage=0MB;0;0;0;0");
         }
         if (defined $vm_view->summary->quickStats->overallCpuUsage) {
            push (@perfdata, $vmname . '_overallCpuUsage=' . $vm_view->summary->quickStats->overallCpuUsage . 'MHz;0;0;0;' .
               ((defined $vm_view->summary->runtime->maxCpuUsage) ? $vm_view->summary->runtime->maxCpuUsage : '0'));
         } else {
            #push (@perfdata, "${vmname}_overallCpuUsage=noData");
            push (@perfdata, "${vmname}_overallCpuUsage=0MHz;0;0;0;0");
         }
         
         if (defined $vm_view->guest->disk) {
            my $disk_len = @{$vm_view->guest->disk};
            my $cnt = 0;
            #while ($cnt < $disk_len) {
            while ($cnt < 6) { # max 6 virtual disks - even if not defined because we need the perfdata to graph something
               if (defined $vm_view->guest->disk->[$cnt] and defined $vm_view->guest->disk->[$cnt]->freeSpace
                  and defined $vm_view->guest->disk->[$cnt]->capacity) {
                  push (@perfdata, "${vmname}_Disk". $cnt ."freespace=" . $vm_view->guest->disk->[$cnt]->freeSpace .
                  'B;0;0;0;' . $vm_view->guest->disk->[$cnt]->capacity);
               } else {
                  #push (@perfdata, "${vmname}_Disk".$cnt."freespace=noData");
                  push (@perfdata, "${vmname}_Disk". $cnt .'freespace=0B;0;0;0;0');
               }
               if (defined $vm_view->guest->disk->[$cnt] and defined $vm_view->guest->disk->[$cnt]->diskPath) {
                  push (@perfdata, "${vmname}_Disk". $cnt ."Path=" . $vm_view->guest->disk->[$cnt]->diskPath);
               } else {
                  push (@perfdata, "${vmname}_Disk". $cnt ."Path=noData");
               }
               $cnt++;
            }
         } else {
            my $cnt = 0;
            while ($cnt < 6) { # max 6 virtual disks - even if not defined because we need the perfdata to graph something
               push (@perfdata, "${vmname}_Disk". $cnt .'freespace=0B;0;0;0;0');
               $cnt++;
            }
            push (@perfdata, "${vmname}_Disk=noData");
         }
         if (defined $vm_view->guest->net) {
            my $net_len = @{$vm_view->guest->net};
            my $cnt = 0;
            while ($cnt < $net_len) {
               push (@perfdata, "${vmname}_net".$cnt."connected=" . $vm_view->guest->net->[$cnt]->connected);
               #push (@perfdata, "${vmname}_net".$cnt."deviceConfigId=" . $vm_view->guest->net->[$cnt]->deviceConfigId);
               #if (defined $vm_view->guest->net->[$cnt]->macAddress) {
               #   push (@perfdata, "${vmname}_net".$cnt."macAddress=" . $vm_view->guest->net->[$cnt]->macAddress);
               #}
               #else {
               #   push (@perfdata, "${vmname}_net".$cnt."macAddress=noData");
               #}
               #if (defined $vm_view->guest->net->[$cnt]->network) {
               #   push (@perfdata, "${vmname}_net".$cnt."network=" . $vm_view->guest->net->[$cnt]->network);
               #}
               #else {
               #   push (@perfdata, "${vmname}_net".$cnt."network=noData");
               #}
               #if (defined $vm_view->guest->net->[$cnt]->ipAddress) {
               #   my $ip_len = @{$vm_view->guest->net->[$cnt]->ipAddress};
               #   my $cnt_ip = 0;
               #   while ($cnt_ip < $ip_len) {
               #      push (@perfdata, "${vmname}_net".$cnt."ipAddress=" .$vm_view->guest->net->[$cnt]->ipAddress->[$cnt_ip]);
               #      $cnt_ip++;
               #   }
               #} else {
               #   push (@perfdata, "${vmname}_net".$cnt."ipAddress=noData");
               #}
               $cnt++;
            }
         } else {
            push (@perfdata, "${vmname}_guestNet=noData");
         }
         #push (@perfdata, (get_performance_values($vm_view, 'cpu', ('usage.average'))));#, 'usagemhz.average', 'wait.summation:*'))));
         #push (@perfdata, (get_performance_values($vm_view, 'mem', ('consumed.average', 'active.average'))));#, 'usage.average', 'overhead.average', 'swapped.average', 'swapin.average', 'swapout.average'))));
         push (@perfdata, (get_performance_values($vm_view, 'disk', ('read.average:*', 'write.average:*'))));#, 'usage.average:*'))));
         push (@perfdata, (get_performance_values($vm_view, 'net', ('received.average:*', 'transmitted.average:*'))));
      }
   }
}

sub retrieve_performance() {
   if (defined Opts::get_option('host')) {
      my $host = Vim::find_entity_view(view_type => "HostSystem", filter => {'name' => Opts::get_option('host')});
      if (!defined($host)) {
         push (@msg, "Host ".Opts::get_option('host')." not found");
         $exitVal = 2;
         return;
      }
      push (@perfdata, (get_performance_values($host, 'cpu', ('usage.average', 'usagemhz.average'))));
      push (@perfdata, (get_performance_values($host, 'mem', ('usage.average', 'consumed.average'))));#, 'overhead.average', 'swapused.average'))));
      #push (@perfdata, (get_performance_values($host, 'disk', ('commandsAborted.summation:*', 'busResets.summation:*', 'totalReadLatency.average:*', 'totalWriteLatency.average:*', 'kernelLatency.average:*', 'deviceLatency.average:*', 'queueLatency.average:*'))));
      #push (@perfdata, (get_performance_values($host, 'net', ('received.average:*', 'transmitted.average:*'))));
   }

   my $vm_views;
   if (defined Opts::get_option('vmname')) {
      if ($vm_views = Vim::find_entity_view(view_type => 'VirtualMachine', filter => {'name' => Opts::get_option('vmname')})) {
         displayVM($vm_views);
         if (scalar(@fineVMs)) {
               push (@msg, Opts::get_option('vmname') . ' is running fine.');
         } else {
               push (@msg, Opts::get_option('vmname') . ' does not (proper) run.');
         }
      } else {
         $exitVal = 2;
            push (@msg, 'Could not find a VM named: ' . Opts::get_option('vmname'));
      }
   } else {
      $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine');
      #print Dumper ($vm_views) . "\n\n";
      if(defined @$vm_views) {
         foreach my $vm (@$vm_views) { # Print VMs
            displayVM($vm);
         }
         push (@msg, "fine VMs (" . scalar(@fineVMs) . ")");
         if (defined Opts::get_option('verboseVMs') and scalar(@fineVMs)) {
            $msg[-1] .= ': ' . join (', ', @fineVMs);
         }
         push (@msg, "bad VMs (" . scalar(@badVMs) . ")");
         #push (@msg, "not (proper) running VMs (" . scalar(@badVMs) . ")");
         if (defined Opts::get_option('verboseVMs') and scalar(@badVMs)) {
            $msg[-1] .= ': ' . join (', ', @badVMs);
         }
      }
   }
}



###########################################################################################
#
# main
#

#$Data::Dumper::Sortkeys = 1; #Sort the keys in the output
#$Data::Dumper::Deepcopy = 1; #Enable deep copies of structures
#$Data::Dumper::Indent = 2; #Output in a reasonable style (but no array indexes)



# set timeout
local $SIG{ALRM} = sub {
   $exitVal = 3;
   printResultAndExit($exitVal, join(' - ', 'Plugin Timeout', @msg) . "|" . join(' ', @perfdata));
};
(defined Opts::get_option('timeout')) ? alarm(Opts::get_option('timeout')) : alarm(60);

@main::ignorelist = ();
if (defined Opts::get_option('ignore')) {
   @main::ignorelist = split(/,/, Opts::get_option('ignore'));
}
   

$exitVal = 0; # as far as we know, everything is fine til now.

eval
{
   # try
   Util::connect();
   retrieve_performance();
   Util::disconnect();
};
if($@)
{
   # catch
   if ($@ =~ /VirtualMachineVMCIDevice/) {
      push (@msg, 'you have to apply a patch to VICommon.pm to avoid a bug in the VMWare perl API. Find it over here: http://www.nagioswiki.org/wiki/Plugin:check_vmware3.pl');
   }
   $exitVal = 3;
   printResultAndExit($exitVal, join(' - ', @msg, 'ERRORMSG: ' . $@) . "|" . join(' ', @perfdata));
}


# check if the expected VMs are reported or missing
if (defined Opts::get_option('ensure')) {
   my @ensurelist = split(/,/, Opts::get_option('ensure'));
   #print "ensureVMs: @ensurelist\n" if ($main::verbose >= 100);
   foreach my $ensureVM (@ensurelist) {
      if (!grep (/$ensureVM/, (@fineVMs, @badVMs))) {
         push (@missingVMs, $ensureVM);
         $exitVal = 2;
     }
   }
   push (@msg, "missing VMs (" . scalar(@missingVMs) . ")");
   if (defined Opts::get_option('verboseVMs') and scalar(@missingVMs)) {
      $msg[-1] .= ': ' . join (', ', @missingVMs);
   }
}

printResultAndExit($exitVal, join(' - ', @msg) . "|" . join(' ', @perfdata));

# end main



Tu pourras avec cet outils disposer de toutes les informations que tu as besoins disponibles dans ton Vcenter

Par la ligne suivante, tu auras les info sur les luns que tu souhaites :

check_vmware.pl --config=$USER1$/checkvmaware.cfg --mode=nagios --datacenter=(tonvcenter) --report=disk

A +
I'm a I3omI3 !

Hors ligne Grosmoc

  • Condyluriens
  • Hero Member
  • Messages: 20472
  • Va Chier.
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12785 le: 19/10/12 16:52 »
je suis en plein dans l'install de ce genre de truc, mais j'ai pris le parti d'installer shinken :o

Hors ligne Seb corgan

  • Blaireau
  • Hero Member
  • Messages: 23533
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12786 le: 19/10/12 17:06 »
re, bon je pense que c'est pour du monitoring , donc voila la méthode mais en pearl :

A mettre en place

http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_vmware3-2Epl/details

Spoiler: ShowHide
#!/usr/bin/perl -w
#
# nagios: -epn
#
# check_vmware3.pl
# should work with any VMWare Infrastructure
#
# All operations work with VMware VirtualCenter 2.0.1 or later.
# All operations work with VMware ESX Server 3.0.1 or later.
#
#
# COPYRIGHT:
#  
# This software is Copyright (c) 2008 NETWAYS GmbH, Birger Schmidt
#                                
#      (Except where explicitly superseded by other copyright notices)
#
# LICENSE:
#
# This work is made available to you under the terms of Version 2 of
# the GNU General Public License. A copy of that license should have
# been provided with this software, but in any event can be snarfed
# from http://www.fsf.org.
#
# This work is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301 or visit their web page on the internet at
# http://www.fsf.org.
#
#
# CONTRIBUTION SUBMISSION POLICY:
#
# (The following paragraph is not intended to limit the rights granted
# to you to modify and distribute this software under the terms of
# the GNU General Public License and is only of importance to you if
# you choose to contribute your changes and enhancements to the
# community by submitting them to NETWAYS GmbH.)
#
# By intentionally submitting any modifications, corrections or
# derivatives to this work, or any other work intended for use with
# this Software, to NETWAYS GmbH, you confirm that
# you are the copyright holder for those contributions and you grant
# NETWAYS GmbH a nonexclusive, worldwide, irrevocable,
# royalty-free, perpetual, license to use, copy, create derivative
# works based on those contributions, and sublicense and distribute
# those contributions and any derivatives thereof.
#
# Nagios and the Nagios logo are registered trademarks of Ethan Galstad.


use strict;
use warnings;


# version string
my $version = '0.1';


# init variables
my @msg                  = ();
my @perfdata            = ();
my $exitVal               = undef;
my @fineVMs               = ();
my @badVMs               = ();
my @missingVMs            = ();


# define states
our @state = ('OK', 'WARNING', 'CRITICAL', 'UNKNOWN');


my %opts = (
   'host' => {
      type => "=s",
      help => "Name of the host",
      required => 0,
   },
   'timeout' => {
      type => "=i",
      help => "Timeout in seconds",
      required => 0,
   },
   'ignore' => {
      type => "=s",
      help => "List of VM-Names (separated by comma, regexp possible) to ignore if state not green",
      required => 0,
   },
   'ensure' => {
      type => "=s",
      help => "List of VM-Names (separated by comma, regexp possible) for which state must be green",
      required => 0,
   },
   'vmname' => {
      type => "=s",
      help => "one single VM to check - the other checks will be suppressed",
      required => 0,
   },
   'verboseVMs' => {
      type => "=i",
      help => "list VM names as plugin output",
      required => 0,
   },
);


sub printResultAndExit {

   # stop timeout
   alarm(0);

   # print check result and exit

   my $exitVal = shift;

   #print "check_vmware3 ";
   print "$state[$exitVal]:";

   print " @_" if (defined @_);

   print "\n";

   exit($exitVal);
}


eval {
   require VMware::VIRuntime
} or printResultAndExit(3, 'Missing perl module VMware::VIRuntime. Download and install "VMware Infrastructure (VI) Perl Toolkit" from http://www.vmware.com/download/sdk/api.html');


# get command-line parameters
Opts::add_options(%opts);
Opts::parse();

Opts::validate();

if (defined Opts::get_option('help')) {
print "help";
}


# some code from check_esx3 by op5
sub get_key_metrices {
   my ($perfmgr_view, $group, @names) = @_;

   my $perfCounterInfo = $perfmgr_view->perfCounter;
   my @counters;
   my @units;

   foreach (@$perfCounterInfo) {
      if ($_->groupInfo->key eq $group) {
         my $cur_name = $_->nameInfo->key . "." . $_->rollupType->val;
         foreach my $index (0..@names-1)
         {
            if ($names[$index] =~ /$cur_name/)
            {
               $names[$index] =~ /(\w+).(\w+):*(.*)/;
               $counters[$index] = PerfMetricId->new(counterId => $_->key, instance => $3);
               $units[$index] = $_->unitInfo->label;
            }
         }
      }
   }
   return (\@counters, \@units);
}


sub get_performance_values {
   my ($view, $group, @list) = @_;
   $view->update_view_data();
   my @values;
   my $units;
   my @perf_data;
   eval {
      my $perfMgr = Vim::get_view(mo_ref => Vim::get_service_content()->perfManager);
      (my $metrices, $units) = get_key_metrices($perfMgr, $group, @list);
      my $perf_query_spec = PerfQuerySpec->new(entity => $view, metricId => $metrices, format => 'csv', intervalId => 20, maxSample => 1);
      my $perf_data = $perfMgr->QueryPerf(querySpec => $perf_query_spec);
      my $unsorted = shift(@$perf_data)->value;

      foreach my $id (@$unsorted) {
         foreach my $index (0..@$metrices-1) {
            if ($id->id->counterId == $$metrices[$index]->counterId) {
               $values[$index] = $id;
            }
         }
      }
      
   };
   foreach my $index (0..@list-1) {
      (my $name = $list[$index]) =~ tr/.:*/_/d;          # replace . with _ and delete : *
      ($name = $view->name . '_' . $group . '_' . $name) =~ s/_average//;    # prepend group and remove tailing average
      if (defined $values[$index]) {
         push (@perf_data, "${name}=" . $values[$index]->value . @$units[$index] . ';0;0;0;0');
         #push (@perf_data, "${name}=" . $values[$index]->value);
      } else {
         #push (@perf_data, "${name}=noData");
         push (@perf_data, "${name}=0;0;0;0;0");
      }
   }
   return @perf_data;
}


sub displayVM($) {

   my $vm_view = shift @_;
   my $vmname = $vm_view->name;
   my $host = '';
   my $option_host = '';
   
   if (defined Opts::get_option('host')) {
      $option_host = Opts::get_option('host');
      my $mor_host = $vm_view->runtime->host;    # this is the host that actualy runs the VM
      $host = Vim::get_view(mo_ref => $mor_host)->name;
      #print Dumper ($vm_view, $mor_host, $host) . "\n\n";
   }
   if ($option_host eq $host) {
      if (defined $vm_view->guestHeartbeatStatus) {
         push (@perfdata, "${vmname}_guestHeartbeatStatus=" . $vm_view->guestHeartbeatStatus->val);
         if ($vm_view->guestHeartbeatStatus->val eq 'green') {   # everything fine
            push (@fineVMs, $vmname);
         } else { # (gray, red, yellow?)
            push (@badVMs, $vmname);
            if ( @main::ignorelist )  {
               if ( !($vmname =~ join ('|', @main::ignorelist)) )  {   # not on ignorelist
                  # unshift (@msg,  "bad guestHeartbeatStatus (" . $vm_view->guestHeartbeatStatus->val . ") for '$vmname'");
                  $exitVal = 2; # critical
               }
            } else { # no ignorelist
               $exitVal = 2; # critical
            }
         }
      } else {
         push (@perfdata, "${vmname}_guestHeartbeatStatus=noData");
         unshift (@msg,  "unable to get guestHeartbeatStatus of " . $vmname);
         $exitVal = 2; # critical
         push (@badVMs, $vmname);
      }
      
      push (@perfdata, "${vmname}_guestState=" . $vm_view->guest->guestState);
      
      if (defined Opts::get_option('vmname')) {
         if (defined $vm_view->guest->hostName) {
            push (@perfdata, "${vmname}_hostName=" . $vm_view->guest->hostName);
         } else {
            push (@perfdata, "${vmname}_hostName=noData");
         }
         if (defined $vm_view->guest->ipAddress) {
            push (@perfdata, "${vmname}_ipAddress=" . $vm_view->guest->ipAddress);
         } else {
            push (@perfdata, "${vmname}_ipAddress=noData");
         }
         if (defined $vm_view->guest->toolsStatus) {
            push (@perfdata, "${vmname}_toolsStatus=" . $vm_view->guest->toolsStatus->val);
         } else {
            push (@perfdata, "${vmname}_toolsStatus=noData");
         }
         if (defined $vm_view->guest->toolsVersion) {
            my @requiredVersion = grep { ref($_) && $_->key eq 'vmware.tools.requiredversion' } @{$vm_view->config->extraConfig}; # filter reqver from extraConfig
            push (@perfdata, "${vmname}_toolsVersion=" . $vm_view->guest->toolsVersion . ';0;0;0;' .
               ((defined $requiredVersion[0]->value) ? $requiredVersion[0]->value : '0'));
         } else {
            #push (@perfdata, "${vmname}_toolsVersion=noData");
            push (@perfdata, "${vmname}_toolsVersion=0;0;0;0;0");
         }
         if (defined $vm_view->summary->quickStats->guestMemoryUsage) {
            push (@perfdata, $vmname . "_guestMemoryUsage=" . $vm_view->summary->quickStats->guestMemoryUsage . 'MB;0;0;0;' .
               ((defined $vm_view->summary->config->memorySizeMB) ? $vm_view->summary->config->memorySizeMB : '0'));
               # $vm_view->config->hardware->memoryMB);
               # $vm_view->summary->runtime->maxMemoryUsage);  # get it from config not runtime
         } else {
            #push (@perfdata, "${vmname}_guestMemoryUsage=noData");
            push (@perfdata, "${vmname}_guestMemoryUsage=0MB;0;0;0;0");
         }
         if (defined $vm_view->summary->quickStats->overallCpuUsage) {
            push (@perfdata, $vmname . '_overallCpuUsage=' . $vm_view->summary->quickStats->overallCpuUsage . 'MHz;0;0;0;' .
               ((defined $vm_view->summary->runtime->maxCpuUsage) ? $vm_view->summary->runtime->maxCpuUsage : '0'));
         } else {
            #push (@perfdata, "${vmname}_overallCpuUsage=noData");
            push (@perfdata, "${vmname}_overallCpuUsage=0MHz;0;0;0;0");
         }
         
         if (defined $vm_view->guest->disk) {
            my $disk_len = @{$vm_view->guest->disk};
            my $cnt = 0;
            #while ($cnt < $disk_len) {
            while ($cnt < 6) { # max 6 virtual disks - even if not defined because we need the perfdata to graph something
               if (defined $vm_view->guest->disk->[$cnt] and defined $vm_view->guest->disk->[$cnt]->freeSpace
                  and defined $vm_view->guest->disk->[$cnt]->capacity) {
                  push (@perfdata, "${vmname}_Disk". $cnt ."freespace=" . $vm_view->guest->disk->[$cnt]->freeSpace .
                  'B;0;0;0;' . $vm_view->guest->disk->[$cnt]->capacity);
               } else {
                  #push (@perfdata, "${vmname}_Disk".$cnt."freespace=noData");
                  push (@perfdata, "${vmname}_Disk". $cnt .'freespace=0B;0;0;0;0');
               }
               if (defined $vm_view->guest->disk->[$cnt] and defined $vm_view->guest->disk->[$cnt]->diskPath) {
                  push (@perfdata, "${vmname}_Disk". $cnt ."Path=" . $vm_view->guest->disk->[$cnt]->diskPath);
               } else {
                  push (@perfdata, "${vmname}_Disk". $cnt ."Path=noData");
               }
               $cnt++;
            }
         } else {
            my $cnt = 0;
            while ($cnt < 6) { # max 6 virtual disks - even if not defined because we need the perfdata to graph something
               push (@perfdata, "${vmname}_Disk". $cnt .'freespace=0B;0;0;0;0');
               $cnt++;
            }
            push (@perfdata, "${vmname}_Disk=noData");
         }
         if (defined $vm_view->guest->net) {
            my $net_len = @{$vm_view->guest->net};
            my $cnt = 0;
            while ($cnt < $net_len) {
               push (@perfdata, "${vmname}_net".$cnt."connected=" . $vm_view->guest->net->[$cnt]->connected);
               #push (@perfdata, "${vmname}_net".$cnt."deviceConfigId=" . $vm_view->guest->net->[$cnt]->deviceConfigId);
               #if (defined $vm_view->guest->net->[$cnt]->macAddress) {
               #   push (@perfdata, "${vmname}_net".$cnt."macAddress=" . $vm_view->guest->net->[$cnt]->macAddress);
               #}
               #else {
               #   push (@perfdata, "${vmname}_net".$cnt."macAddress=noData");
               #}
               #if (defined $vm_view->guest->net->[$cnt]->network) {
               #   push (@perfdata, "${vmname}_net".$cnt."network=" . $vm_view->guest->net->[$cnt]->network);
               #}
               #else {
               #   push (@perfdata, "${vmname}_net".$cnt."network=noData");
               #}
               #if (defined $vm_view->guest->net->[$cnt]->ipAddress) {
               #   my $ip_len = @{$vm_view->guest->net->[$cnt]->ipAddress};
               #   my $cnt_ip = 0;
               #   while ($cnt_ip < $ip_len) {
               #      push (@perfdata, "${vmname}_net".$cnt."ipAddress=" .$vm_view->guest->net->[$cnt]->ipAddress->[$cnt_ip]);
               #      $cnt_ip++;
               #   }
               #} else {
               #   push (@perfdata, "${vmname}_net".$cnt."ipAddress=noData");
               #}
               $cnt++;
            }
         } else {
            push (@perfdata, "${vmname}_guestNet=noData");
         }
         #push (@perfdata, (get_performance_values($vm_view, 'cpu', ('usage.average'))));#, 'usagemhz.average', 'wait.summation:*'))));
         #push (@perfdata, (get_performance_values($vm_view, 'mem', ('consumed.average', 'active.average'))));#, 'usage.average', 'overhead.average', 'swapped.average', 'swapin.average', 'swapout.average'))));
         push (@perfdata, (get_performance_values($vm_view, 'disk', ('read.average:*', 'write.average:*'))));#, 'usage.average:*'))));
         push (@perfdata, (get_performance_values($vm_view, 'net', ('received.average:*', 'transmitted.average:*'))));
      }
   }
}

sub retrieve_performance() {
   if (defined Opts::get_option('host')) {
      my $host = Vim::find_entity_view(view_type => "HostSystem", filter => {'name' => Opts::get_option('host')});
      if (!defined($host)) {
         push (@msg, "Host ".Opts::get_option('host')." not found");
         $exitVal = 2;
         return;
      }
      push (@perfdata, (get_performance_values($host, 'cpu', ('usage.average', 'usagemhz.average'))));
      push (@perfdata, (get_performance_values($host, 'mem', ('usage.average', 'consumed.average'))));#, 'overhead.average', 'swapused.average'))));
      #push (@perfdata, (get_performance_values($host, 'disk', ('commandsAborted.summation:*', 'busResets.summation:*', 'totalReadLatency.average:*', 'totalWriteLatency.average:*', 'kernelLatency.average:*', 'deviceLatency.average:*', 'queueLatency.average:*'))));
      #push (@perfdata, (get_performance_values($host, 'net', ('received.average:*', 'transmitted.average:*'))));
   }

   my $vm_views;
   if (defined Opts::get_option('vmname')) {
      if ($vm_views = Vim::find_entity_view(view_type => 'VirtualMachine', filter => {'name' => Opts::get_option('vmname')})) {
         displayVM($vm_views);
         if (scalar(@fineVMs)) {
               push (@msg, Opts::get_option('vmname') . ' is running fine.');
         } else {
               push (@msg, Opts::get_option('vmname') . ' does not (proper) run.');
         }
      } else {
         $exitVal = 2;
            push (@msg, 'Could not find a VM named: ' . Opts::get_option('vmname'));
      }
   } else {
      $vm_views = Vim::find_entity_views(view_type => 'VirtualMachine');
      #print Dumper ($vm_views) . "\n\n";
      if(defined @$vm_views) {
         foreach my $vm (@$vm_views) { # Print VMs
            displayVM($vm);
         }
         push (@msg, "fine VMs (" . scalar(@fineVMs) . ")");
         if (defined Opts::get_option('verboseVMs') and scalar(@fineVMs)) {
            $msg[-1] .= ': ' . join (', ', @fineVMs);
         }
         push (@msg, "bad VMs (" . scalar(@badVMs) . ")");
         #push (@msg, "not (proper) running VMs (" . scalar(@badVMs) . ")");
         if (defined Opts::get_option('verboseVMs') and scalar(@badVMs)) {
            $msg[-1] .= ': ' . join (', ', @badVMs);
         }
      }
   }
}



###########################################################################################
#
# main
#

#$Data::Dumper::Sortkeys = 1; #Sort the keys in the output
#$Data::Dumper::Deepcopy = 1; #Enable deep copies of structures
#$Data::Dumper::Indent = 2; #Output in a reasonable style (but no array indexes)



# set timeout
local $SIG{ALRM} = sub {
   $exitVal = 3;
   printResultAndExit($exitVal, join(' - ', 'Plugin Timeout', @msg) . "|" . join(' ', @perfdata));
};
(defined Opts::get_option('timeout')) ? alarm(Opts::get_option('timeout')) : alarm(60);

@main::ignorelist = ();
if (defined Opts::get_option('ignore')) {
   @main::ignorelist = split(/,/, Opts::get_option('ignore'));
}
   

$exitVal = 0; # as far as we know, everything is fine til now.

eval
{
   # try
   Util::connect();
   retrieve_performance();
   Util::disconnect();
};
if($@)
{
   # catch
   if ($@ =~ /VirtualMachineVMCIDevice/) {
      push (@msg, 'you have to apply a patch to VICommon.pm to avoid a bug in the VMWare perl API. Find it over here: http://www.nagioswiki.org/wiki/Plugin:check_vmware3.pl');
   }
   $exitVal = 3;
   printResultAndExit($exitVal, join(' - ', @msg, 'ERRORMSG: ' . $@) . "|" . join(' ', @perfdata));
}


# check if the expected VMs are reported or missing
if (defined Opts::get_option('ensure')) {
   my @ensurelist = split(/,/, Opts::get_option('ensure'));
   #print "ensureVMs: @ensurelist\n" if ($main::verbose >= 100);
   foreach my $ensureVM (@ensurelist) {
      if (!grep (/$ensureVM/, (@fineVMs, @badVMs))) {
         push (@missingVMs, $ensureVM);
         $exitVal = 2;
     }
   }
   push (@msg, "missing VMs (" . scalar(@missingVMs) . ")");
   if (defined Opts::get_option('verboseVMs') and scalar(@missingVMs)) {
      $msg[-1] .= ': ' . join (', ', @missingVMs);
   }
}

printResultAndExit($exitVal, join(' - ', @msg) . "|" . join(' ', @perfdata));

# end main



Tu pourras avec cet outils disposer de toutes les informations que tu as besoins disponibles dans ton Vcenter

Par la ligne suivante, tu auras les info sur les luns que tu souhaites :

check_vmware.pl --config=$USER1$/checkvmaware.cfg --mode=nagios --datacenter=(tonvcenter) --report=disk

A +

Wouh pitaing la gueule du truc, je ne suis pas spécialiste PERL mais je vais regarder ça :D

Merci :)
Le rock c'est rouky

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12787 le: 22/10/12 14:30 »
A ton service l ami
I'm a I3omI3 !

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12788 le: 22/10/12 23:57 »
Mon Raspberry Pi accompagné du Pibow :D !!

-= It's better to burn out than to fade away =-

Hors ligne Bitman

  • Master of Condylures
  • Administrator
  • Hero Member
  • *****
  • Messages: 85849
  • Sexe: Homme
  • Show me Uranus
    • Voir le profil
    • anal teen exploited
Le coin des barbus, Questions, réponses et blabla
« Réponse #12789 le: 22/10/12 23:59 »
un dual screen avec des ecrans pas pareils :/
Hard times create strong men. Strong men create good times. Good times create weak men. And, weak men create hard times.

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12790 le: 23/10/12 00:11 »
Ranab c'est des 22" les deux ...
-= It's better to burn out than to fade away =-

Hors ligne Bitman

  • Master of Condylures
  • Administrator
  • Hero Member
  • *****
  • Messages: 85849
  • Sexe: Homme
  • Show me Uranus
    • Voir le profil
    • anal teen exploited
Le coin des barbus, Questions, réponses et blabla
« Réponse #12791 le: 23/10/12 00:13 »
ILS SONT PAS PAREIL §§§ [:falzar]
Hard times create strong men. Strong men create good times. Good times create weak men. And, weak men create hard times.

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12792 le: 23/10/12 00:27 »
Ils sont nwars c'est déjà bien accordé niveau couleur :o
-= It's better to burn out than to fade away =-

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12793 le: 23/10/12 00:44 »
c'est pas le meme noir :o

Hors ligne 0rken

  • gros
  • Hero Member
  • Messages: 15415
  • Sexe: Homme
    • Voir le profil
    • http://www.blakk-olifant.fr
Le coin des barbus, Questions, réponses et blabla
« Réponse #12794 le: 23/10/12 07:40 »
Mon Raspberry Pi accompagné du Pibow :D !!

http://distilleryimage0.instagram.com/d452452e1c9211e2917a22000a1cf75c_7.jpg

Même avec instagram, c'est moche et ça fait gay !
les grosses / Gros dAgueulasseA

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12795 le: 23/10/12 09:04 »
Bah va caguer à la vigne ©
-= It's better to burn out than to fade away =-

Hors ligne Bitman

  • Master of Condylures
  • Administrator
  • Hero Member
  • *****
  • Messages: 85849
  • Sexe: Homme
  • Show me Uranus
    • Voir le profil
    • anal teen exploited
Le coin des barbus, Questions, réponses et blabla
« Réponse #12796 le: 23/10/12 09:08 »
:D
Hard times create strong men. Strong men create good times. Good times create weak men. And, weak men create hard times.

Hors ligne stockholm

  • Hero Member
  • Messages: 9110
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12797 le: 23/10/12 12:02 »
les vignes de muscadet sont traitées de cette façon (au mieux) depuis que le hellfest est à côté, ça n'a pas eu d'effet sur le gout du pinard [:alex666]
aka nedurb

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12799 le: 25/10/12 00:32 »
A une époque ça m'aurait tenté mais là non :/
-= It's better to burn out than to fade away =-

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12800 le: 25/10/12 00:33 »
si j'arrivais a monter le disque reseau comme un disque physique sur le mac de ma femme, je lui collerai un SSD ... mais comme j'y arrive pas :/

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12801 le: 25/10/12 00:42 »
Tu montes le disque via un partage SMB
-= It's better to burn out than to fade away =-

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12802 le: 25/10/12 00:50 »
ca fonctionne pas [:spamafote]

Hors ligne stockholm

  • Hero Member
  • Messages: 9110
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12803 le: 25/10/12 05:24 »
j'attendrai d'avoir 1To abordable en ssd maintenant je pense :o
aka nedurb

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12804 le: 25/10/12 12:11 »
si j'arrivais a monter le disque reseau comme un disque physique sur le mac de ma femme, je lui collerai un SSD ... mais comme j'y arrive pas :/




Un disque réseau en SSD pour quoi faire ?
I'm a I3omI3 !

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12805 le: 25/10/12 12:14 »
il y a un si dans la phrase qui inclue le fait que si j'arrive a lui monter le disque reseau, elle a plus besoin de 500go en physique :)

Hors ligne MickeyNox

  • Hero Member
  • Messages: 8692
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12806 le: 25/10/12 12:40 »
Je ne vois pas désolé. Qu appeles tu un disque Phisique ? et par opposition un disque virtuelle ?
I'm a I3omI3 !

Hors ligne SaVio

  • Condyluriens
  • Hero Member
  • Messages: 71716
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12807 le: 25/10/12 12:53 »
le virtuel est sur le NAS, le physique est dans le macbook ..

donc si j'arrive a lui monter de facon automatique, transparente et permanente son dossier de stockage alloué sur le NAS, elle n'a plus besoin d'avoir 500Go dans son macbook et un SSD de 256Go pour remplacer sera parfait

Hors ligne Seb corgan

  • Blaireau
  • Hero Member
  • Messages: 23533
  • Sexe: Homme
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12808 le: 25/10/12 13:55 »
Distant et local alors ;)
Le rock c'est rouky

Hors ligne Rajesh Koothrappali

  • Condyluriens
  • Hero Member
  • Messages: 19222
  • Nevermind
    • Voir le profil
Le coin des barbus, Questions, réponses et blabla
« Réponse #12809 le: 25/10/12 14:02 »
ca fonctionne pas [:spamafote]

Ca marque une erreur ou tu ne trouves pas comment faire ?
-= It's better to burn out than to fade away =-