Mise à jour de XenApp_Check : 2.3

Ajout de la section Server(s) Load, cette section regroupe les serveurs dont la charge est supérieure à 9998.

Vous pouvez désactiver cette section via le script XenApp_Check.ps1 en mettant à FALSE la variable $Check_Ctx_SrvLoad.  

Les serveurs dont le calculateur de charge correspond à celui configuré dans la variable  $LoadEval_Check(calculateur de charge de maintenance configuré via le script XenApp_Check.ps1) sont exclus de cette section.

Le billet sur XenApp_Check

Post to Twitter

4 thoughts on “Mise à jour de XenApp_Check : 2.3”

  1. Salut “ctxblog” ;), Juste une petite contribution de ma part, qui pourrais peut-être de donner des envies d’upgrade de ton super script.

    Sur une version antérieure, nous nous étions amusé à ajouter du code sur ton script afin de redémarrer les VM sous XenServer qu’il détectait offline (à juste titre) mais qui restaient dans un état “halted” sur l’hyperviseur (Etat “démarré” mais inopérant) suite à une mauvaise gestion du reboot de nos serveurs.

    Voici ce bloc que j’ai mis sous la condition Else de la sous-boucle If($OnLineServers-match $Servers.ServerName) :

    $OfflineServers += $Servers.ServerName
    $OutputOffLineServer += @($Servers | Select @{N=”Server Name”;E={$Servers.ServerName}},@{N=”Folder Path”;E={$Servers.FolderPath}}, @{N=”Zone”;E={$servers.ZoneName}} )
    $CommandVM=’vm=’+$Servers.ServerName
    #PROD
    $resultat1 = xe -s -u root -pw vm-list power-state=running | find /c /i ‘”‘$Servers.ServerName'”‘
    $resultat2 = xe -s -u root -pw vm-list power-state=running | find /c /i ‘”‘$Servers.ServerName'”‘
    $resultat3 = xe -s -u root -pw vm-list power-state=running | find /c /i ‘”‘$Servers.ServerName'”‘

    if ($resultat1=1) {xe -s -u root -pw vm-reboot force=true $CommandVM}
    if ($resultat2=1) {xe -s -u root -pw vm-reboot force=true $CommandVM}
    if ($resultat3=1) {xe -s -u root -pw vm-reboot force=true $CommandVM}
    $resultat1 = xe -s « IP XENSERVER1″ -u root -pw « MDP XENSERVER1″ vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘
    $resultat2 = xe -s « IP XENSERVER2″ -u root -pw « MDP XENSERVER2″ vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘
    $resultat3 = xe -s « IP XENSERVER3″ -u root -pw « MDP XENSERVER3″ vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘

    if ($resultat1=1) {xe -s « IP XENSERVER1″ -u root -pw « MDP XENSERVER1″ vm-reboot force=true $CommandVM}
    if ($resultat2=1) {xe -s « IP XENSERVER2″ -u root -pw « MDP XENSERVER2″ vm-reboot force=true $CommandVM}
    if ($resultat3=1) {xe -s « IP XENSERVER3″ -u root -pw « MDP XENSERVER3″ vm-reboot force=true $CommandVM}

    Evidemment, il faut qu’il y ait l’utilitaire « XE » installé avec XenCenter sur la machine qui execute le script.

  2. Ah, j’ai mis des balises qui n’ont pas été lues, si tu peux corriger mon précédent post “ctxblog” stp :

    $resultat1 = xe -s “IP XENSERVER1” -u root -pw “MDP XENSERVER1” vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘
    $resultat2 = xe -s “IP XENSERVER2” -u root -pw “MDP XENSERVER2” vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘
    $resultat3 = xe -s “IP XENSERVER3” -u root -pw “MDP XENSERVER3” vm-list power-state=running | find /c /i ‘ »‘$Servers.ServerName’ »‘

    if ($resultat1=1) {xe -s “IP XENSERVER1” -u root -pw “MDP XENSERVER1” vm-reboot force=true $CommandVM}
    if ($resultat2=1) {xe -s “IP XENSERVER2” -u root -pw “MDP XENSERVER2” vm-reboot force=true $CommandVM}
    if ($resultat3=1) {xe -s “IP XENSERVER3” -u root -pw “MDP XENSERVER3” vm-reboot force=true $CommandVM}

    Evidemment, il faut qu’il y ait l’utilitaire “XE” installé avec XenCenter sur la machine qui execute le script.

Leave a Reply to ctxblog Cancel reply

Your email address will not be published. Required fields are marked *

*