Alarm configuration scripting

Hello

I am a beginner with PowerCLI but with the help of www.lucd.info and the VI Api, I am writing a script to automate the configuration of my alarm for vCenter.

My script is intended to:

-remove all measures for all alerts

-rename some alerts with a prefix to notice the

-Configure the same alerts with special values that we use in our structure

the structure of the script is as follows (I wasn't able to join the script to this topic when posting...):

#listing I target all alerts

...

$alarmMgr = get-view AlarmManager

$alarms = $alarmMgr.GetAlarm ($null)

$alarms | %{

+ $alarm = get-view $_ +.

+ $spec = New-Object VMware.Vim.AlarmSpec #Ecrasement of the old shares (SNMP,...) +.

+ $spec. Action = New-Object VMware.Vim.GroupAlarmAction #Copie of the unchanged characteristics +.

+ $spec. Expression = $alarm.Info.Expression +.

+ $spec. Definition of = $alarm.Info.Setting +.

+ $spec. Name = $alarm.Info.Name +.

+ $spec. Enabled = $alarm.Info.Enabled +.

+ $spec. Description = $alarm.Info.Description +.

+     +

+ If ($tgtAlarmName - contains $alarm.Info.Name) {+

+ $spec. Name = 'RBS'$alarm.Info.Name

+ $alarmTrigger = new-Object VMware.Vim.AlarmTriggeringAction +.

+ $alarmTrigger.Action = new-Object VMware.Vim.SendEmailAction +.

+ $alarmTrigger.Action.toList = $cibleMail +.

+ $alarmTrigger.Action.CcList = $cibleMailCopie +.

+ $alarmTrigger.Action.Subject = $objetMail$spec. Name

+ $alarmTrigger.Action.Body = "alert vCenter \n\n problem with the monitor:"$spec. "" Name'etat\n of the son check \n\n ' +.

+          +

+ #here certain conditions block the forward different configuration +.

+          ......+

+ $spec. Action.Action = $alarmTrigger

+     }+

+ $alarm. ReconfigureAlarm ($spec) +.

}

The unit test worked fine, but when I run my script with the values of wright for the final test, I always get an error:

"Exception calling 'ReconfigureAlarm' with '1' or the arguments: ' not initialized: vim.alarm.alarmAction [] action..." »

line 203 of my script, and that occur the same number of times, the number of alarms I in vCenter.

As the declaration of the VMware.Vim.AlarmSpec object is not in a block of air conditioning, I can't understand why I get these error

As anyone thoughts on that?

PS: Excuse my bad English, if one of my sentences was not quite clear, is fell free to re - ask

Likewise, my comments on the script is in french, but if you need I can translate some lines

Of course, I've PM - ed you my e-mail address.

____________

Blog: LucD notes

Twitter: lucd22

Tags: VMware

Similar Questions

  • Create alarms by script?

    Hello:

    I try to create alarms by script and would really like to see that any help.

    Right now I'm writing the script that will create the base alarms (for example, host memory status) which will send SNMP trap if memory join specific parameters...

    Is this possible?

    If you have scripts that will create other alarms and could share I really appreciate it... (I found little and do not have too much of them).

    Thank you

    qwert

    Of course, the following script will send an SNMP trap when the ESX host is in maintenance mode.

    $esxName = 
    
    $alarmMgr = Get-View AlarmManager
    $entity = Get-VMHost $esxName | Get-View
    
    # AlarmSpec
    $alarm = New-Object VMware.Vim.AlarmSpec
    $alarm.Name = "My new alarm"
    $alarm.Description = "My alarm description"
    $alarm.Enabled = $TRUE
    
    #Action
    $alarm.action = New-Object VMware.Vim.GroupAlarmAction
    
    $trigger = New-Object VMware.Vim.AlarmTriggeringAction
    $trigger.action = New-Object VMware.Vim.SendSNMPAction
    
    # Transaction
    $trans = New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec
    $trans.startstate = "yellow"
    $trans.finalstate = "red"
    $trans.repeats = $false
    
    $trigger.transitionspecs += $trans
    
    $alarm.action.action += $trigger
    
    # Expression
    $expression = New-Object VMware.Vim.EventAlarmExpression
    $expression.EventType = "EnteringMaintenanceModeEvent"
    $expression.ObjectType = "HostSystem"
    $expression.Status = "red"
    
    $alarm.expression = New-Object VMware.Vim.OrAlarmExpression
    $alarm.expression.expression += $expression
    
    $alarm.setting = New-Object VMware.Vim.AlarmSetting
    $alarm.setting.reportingFrequency = 0
    $alarm.setting.toleranceRange = 0
    
    # Create alarm.
    $alarmMgr.CreateAlarm($entity.MoRef, $alarm)
    
  • VBscript - how to disable 'Use Automatic configuration Script'

    Hello

    I currently have the script in a vbs file. below

    Const HKEY_CURRENT_USER = & H80000001
    Set objShell = CreateObject ("WScript.Shell")
    strPC = objShell.ExpandEnvironmentStrings("%COMPUTERNAME%") "

    On Error Resume Next

    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")

    strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet settings"
    strValueName = "ProxyEnable".

    objReg.GetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName and dwValue

    '#==============================================================================
    '# Proxy of IE if is currently on display message and ask the user if he
    '# should then be disabled
    '#==============================================================================
    If dwValue = 1 Then
    IEPrompt = MsgBox ("Hello David.") Your Proxy is on, you want to turn it off? (", vbQuestion + vbYesNo,"disable IE Proxy")
    If IEPrompt = vbYes Then
    dwValue = 0
    objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName and dwValue
    MsgBox "Thank you David, your proxy is now off.» "Have a nice day" & _
    ".", vbInformation, "off of the Proxy IE.
    ElseIf IEPrompt = vbNo Then
    MsgBox "David, your Proxy is always on" & _
    ".", vbInformation, "off of the Proxy IE.
    End If
    '#==============================================================================
    '# If IE Proxy is currently disabled display message and ask the user if he
    '# must then be activated
    '#==============================================================================
    Else if dwValue = 0 Then
    IEPrompt = MsgBox ("Hello David.") Your Proxy Server is turned off, you want to turn on? (", vbQuestion + vbYesNo,"activate IE Proxy")
    If IEPrompt = vbYes Then
    dwValue = 1
    objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName and dwValue
    MsgBox "Thank you David, your proxy is now on." Have a wonderful day"& _
    ".", vbInformation, "enable Proxy from IE.
    ElseIf IEPrompt = vbNo Then
    MsgBox "David, your Proxy is always on" & _
    ".", vbInformation, "enable Proxy from IE.
    End If
    End If

    This only disables the proxy server in Internet Explorer/Tools/Options/connections/Lan Settings.

    I get this same code to enable check boxes "Automatic Configuration" instead of or as well?

    Thank you very much

    Luke

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.msdn.Microsoft.com/forums/en-us/home

  • vCenter alarm action script to start a workflow vRO with curl

    I have a script that I use on the vCenter servers to launch when an alarm is triggered, and this script will use curl to start a workflow vRO.  Everything has been awesome to work until I've finished upgrading all servers in vRO to 7.x now I get this error

    Server: ~ # /root/scripts/alarmaction.sh

    * Subject to connect() to x.x.x.x port 8281 (#0)

    * Try the connected.. x.x.x.x.

    * Connected to the port x.x.x.x (x.x.x.x) 8281 (#0)

    * successfully together certificate verify locations:

    * CAfile: /etc/ssl/certs/root64.pem

    CApath: / etc/ssl/certs /.

    * SSLv3, TLS, Hello handshake customer (1):

    } [data not shown]

    * error: 140770 CF: protocol SSL routines: SSL23_GET_SERVER_HELLO:unknown

    Closing connection #0

    curl: (35): 140770 CF error: SSL routines: SSL23_GET_SERVER_HELLO:unknown

    OK, so an algorithm of encryption or something got deleted in version 7.x.  Can someone else me one that exactly and how do I add the encryption required to connect again?

    Here's my alarmAction.sh in case anyone can use something like this

    #! / bin/sh

    {vcAlarm()}

    # Create variables to store values consumed by Invoke-RestMethod command.

    Server = "x.x.x.x"

    url = » https://$server:8281/VCO/API/workflows/408d8e4d-1a95-46A4-bca6-efa3c24f81bb/executions "

    # The cmdlet runs the URL encoding.

    Cat >./alarmProps.txt < < EOF

    " <-xmlns = execution context" http://www.VMware.com/VCO "> "

    < Parameters >

    < parameter type = 'string', name = 'VMWARE_ALARM_NAME' scope = 'local' >

    < string >$ {VMWARE_ALARM_NAME} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_ID' scope = 'local' >

    < string >$ {VMWARE_ALARM_ID} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_TARGET_NAME' scope = 'local' >

    < string >$ {VMWARE_ALARM_TARGET_NAME} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_TARGET_ID' scope = 'local' >

    < string >$ {VMWARE_ALARM_TARGET_ID} < / string >

    < / parameter >

    < type parameter is 'chain' name is 'VMWARE_ALARM_OLDSTATUS' scope = 'local' >

    < string >$ {VMWARE_ALARM_OLDSTATUS} < / string >

    < / parameter >

    < type parameter is 'chain' name is 'VMWARE_ALARM_NEWSTATUS' scope = 'local' >

    < string >$ {VMWARE_ALARM_NEWSTATUS} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_TRIGGERINGSUMMARY' scope = 'local' >

    < string >$ {VMWARE_ALARM_TRIGGERINGSUMMARY} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_DECLARINGSUMMARY' scope = 'local' >

    < string >$ {VMWARE_ALARM_DECLARINGSUMMARY} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_ALARMVALUE' scope = 'local' >

    < string >$ {VMWARE_ALARM_ALARMVALUE} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENTDESCRIPTION' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENTDESCRIPTION} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_DESCRIPTION' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_DESCRIPTION} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_USERNAME' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_USERNAME} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_DATACENTER' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_DATACENTER} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_COMPUTERESOURCE' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_COMPUTERESOURCE} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_HOST' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_HOST} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_VM' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_VM} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_NETWORK' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_NETWORK} < / string >

    < / parameter >

    < parameter type = 'string', name = 'VMWARE_ALARM_EVENT_DATASTORE' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_DATASTORE} < / string >

    < / parameter >

    < type parameter is 'chain' name is 'VMWARE_ALARM_EVENT_DVS' scope = 'local' >

    < string >$ {VMWARE_ALARM_EVENT_DVS} < / string >

    < / parameter >

    < / Parameter >

    < / execution context >

    EXPRESSIONS OF FOLKLORE

    # Now run the Invoke-RestMethod command with all the variables in place.

    curl-s-i-l - v--/root/scripts/cert/vco.key--/root/scripts/cert/vco.crt--cacert cert /root/scripts/cert/root64.cer - H - key "accept: application/xml ' h ' content-type: application / xml; Charset = UTF-8 "h 'permission = 'Base base64pass' ' u" user: password "x POST $url d @alarmProps.txt"

    }

    vcAlarm

    RM./alarmProps.txt f

    In vRO 7.0.1 Protocol TLSv1 is disabled by default. Could you change the sslEnabledProtocols property in the /etc/vco/app-server/server.xml file to "TLSv1, 1, TLSv1.2 ' "TLSv1, TLSv1.1, TLSv1.2", reboot and try again with curl vco-Server service?

  • Queue error with a configuration script

    Hello
    I have two queues where the second is the error for the first queue. I can put everything manually through the console but I need to create a python script that will do it automatically.

    I saw some information on internet and I was able to create the queues:
    < pre >
    def create_Queue (moduleName, queueName, queueJNDIName, subDeployementName):
    Print 'creating named queue' + queueName
    CD (' / JMSSystemResources / ' + moduleName + "/ JMSResource /" + moduleName)
    theBean = cmo.lookupQueue (queueName)
    If theBean is None:
    cmo.createQueue (queueName)
    Another thing:
    "Queue already created...". »
    CD ("/JMSSystemResources/" + moduleName + "/JMSResource/" + moduleName + "/ Files /" + queueName)
    Set ("name", queueName)
    Set ("SubDeploymentName", subDeployementName)
    Set ("JNDIName", queueJNDIName)
    < / pre >

    but I do not know how to configure the queue of the error. I tried:

    < pre >
    prefix = "/JMSSystemResources/" + JMSModuleName + '/JMSResource/' + JMSModuleName + ' / Files / '.
    CD (prefix + "first")
    Set ("ErrorDestination", "second" + prefix)
    < / pre >

    but without success. I don't know if I'll try something completely wrong, or if just the attribute name will not...
    transferModule = cmo.createJMSSystemResource('TransferModule');
    #optionally target
    #transferModule.getTargets().append(aserver);
    
    jmsResource = transferModule.getJMSResource();
    jmsResource.createQueue('TransferQueue');
    transferQueue = jmsResource.lookupQueue('TransferQueue');
    
    jmsResource.createQueue('ErrorQueue');
    errorQueue = jmsResource.lookupQueue('ErrorQueue');
    
    transferQueue.setJNDIName('jms/TransferQueue');
    #transferQueue.setSubDeploymentName('TransferSubDeployment');
    transferQueue.getDeliveryParamsOverrides().setRedeliveryDelay(100);
    transferQueue.getDeliveryFailureParams().setRedeliveryLimit(5);
    transferQueue.getDeliveryFailureParams().setExpirationPolicy('Redirect');
    transferQueue.getDeliveryFailureParams().setErrorDestination(errorQueue);
    

    You can also do is to configure your environment to JMS using the console.
    While you do this, you can save your changes.
    The record button is located at the top in the middle of the console.

  • To conform to the configuration script config-firewall-access hardening

    We try to work on the hardening of ESXi 5 setting ID config-firewall-access. With the Client vSphere, VMware hardening guide says "for each permit to serve (for example ssh, vSphere Web Access, http client), select 'Firewall', select 'Allow only connections from the networks' and offer a range of allowed IP addresses.". Naturally, we want to this script, but I am new to PowerCLI scripting so not okay. Anyone could lead to a code to conform to this setting?

    There is a link to the guide at http://communities.VMware.com/docs/doc-19056 .

    Welcome to the VMware VMTN communities!

    The following script PowerCLI will select "Allow only connections from networks" and set the range of IP addresses allowed to 192.168.0.0/24 and will be also defined the permit IP address 192.168.1.2 to all permit services on all hosts in your environment.

    $spec = New-Object VMware.Vim.HostFirewallRulesetRulesetSpec
    $spec.allowedHosts = New-Object VMware.Vim.HostFirewallRulesetIpList
    $spec.allowedHosts.ipAddress = New-Object System.String[] (1)
    $spec.allowedHosts.ipAddress[0] = "192.168.1.2"
    $spec.allowedHosts.ipNetwork = New-Object VMware.Vim.HostFirewallRulesetIpNetwork[] (1)
    $spec.allowedHosts.ipNetwork[0] = New-Object VMware.Vim.HostFirewallRulesetIpNetwork
    $spec.allowedHosts.ipNetwork[0].network = "192.168.0.0"
    $spec.allowedHosts.ipNetwork[0].prefixLength = 24
    $spec.allowedHosts.allIp = $false
    
    $VMHost = Get-VMHost |
    ForEach-Object {
      if ($_)
      {
        $FirewallSystem = Get-View -Id $VMHost.ExtensionData.ConfigManager.Firewallsystem
        $FirewallSystem.FirewallInfo.RuleSet |
        Where-Object {$_.Enabled} |
        ForEach-Object {
          if ($_)
          {
            $FirewallSystem.UpdateRuleset($_.Key, $spec)
          }
        }
      }
    }
    

    To generate the lines in the script that begin with $spec I used VMware project Onyx. It is a very simple tool that allows you to do something in the vSphere client and generate the code corresponding PowerCLI. Like a macro recorder. You can use Onyx to generate the HostFirewallRulesetRulesetSpec specific to your environment.

    Best regards, Robert

  • Create alarm "hardware monitoring" by the script?

    Hello:

    I wonder how I can create the hardware by script monitoring alarm?

    For example, I want to write a script that will create the alarm similar to the default alarm "State of other objects of host hardware.

    Follow large docs LucD Web site (http://www.lucd.info/2009/11/27/alarm-expressions-part-2-event-alarms/), I wrote the following code:

    $alarm. Name = "status of other objects of host hardware.

    $alarm. Description = "monitor other objects of host hardware."

    $alarm. Enabled = $TRUE

    $expr1 = new-Object VMware.Vim.EventAlarmExpression

    $expr1. EventType = "com.vmware.vc.cim.CIMGroupHealthStateChanged."

    $expr1. ObjectType = "HostSystem.

    $expr1. Status = 'green '.

    $expr2 = new-Object VMware.Vim.EventAlarmExpression

    $expr2. EventType = "EnteringMaintenanceModeEvent."

    $expr2. ObjectType = "HostSystem.

    $expr2. Status = "yellow".

    $expr3 = new-Object VMware.Vim.EventAlarmExpression

    $expr3. EventType = "EnteringMaintenanceModeEvent."

    $expr3. ObjectType = "HostSystem.

    $expr3. Status = "red".

    $alarm.expression = new-Object VMware.Vim.OrAlarmExpression

    $alarm.expression.expression += $expr1

    $alarm.expression.expression += $expr2

    $alarm.expression.expression += $expr3

    $alarmMgr.CreateAlarm($entity.) MoRef, $alarm)

    But now I have problem to add arguments, operator, and value to all three different events (Advanced) Condition?

    Also, I know that I have to restart VC after creating this alarm, but it is fine with me (the same 'problem' I had added when storage network/monitoring of alarms by script).

    I would really appreciate the help.

    Thank you very much!

    Okay, I think I got it.

    You must use the property of comparisons to set conditions.

    Try this

    $entity = (Get-VMHost ).Extensiondata
    $alarm = New-Object VMware.Vim.AlarmSpec
    $alarmMgr = Get-View AlarmManager
    
    $alarm.Name = "Status of other host hardware objects"
    
    $alarm.Description = "monitor other host hardware objects"
    $alarm.Enabled = $TRUE
    
    $expr1 = New-Object VMware.Vim.EventAlarmExpression
    $expr1.EventType = "EventEx"
    $expr1.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr1.ObjectType = "HostSystem"
    $expr1.Status = "green"
    
    $condition11 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition11.attributeName = "group"
    $condition11.operator = "equals"
    $condition11.value = "Other"
    
    $condition12 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition12.attributeName = "newState"
    $condition12.operator = "equals"
    $condition12.value = "green"
    
    $expr1.Comparisons += $condition11
    $expr1.Comparisons += $condition12
    
    $expr2 = New-Object VMware.Vim.EventAlarmExpression
    $expr2.EventType = "EventEx"
    $expr2.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr2.ObjectType = "HostSystem"
    $expr2.Status = "yellow"
    
    $expr2.Comparisons += $condition11
    $condition22 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition22.attributeName = "newState"
    $condition22.operator = "equals"
    $condition22.value = "yellow"
    $expr2.Comparisons += $condition22
    
    $expr3 = New-Object VMware.Vim.EventAlarmExpression
    $expr3.EventType = "EventEx"
    $expr3.EventTypeId = "com.vmware.vc.cim.CIMGroupHealthStateChanged"
    $expr3.ObjectType = "HostSystem"
    $expr3.Status = "red"
    
    $expr3.Comparisons += $condition11
    $condition32 = New-Object VMware.Vim.EventAlarmExpressionComparison
    $condition32.attributeName = "newState"
    $condition32.operator = "equals"
    $condition32.value = "red"
    $expr3.Comparisons += $condition32
    
    $alarm.expression = New-Object VMware.Vim.OrAlarmExpression
    $alarm.expression.expression += $expr1
    $alarm.expression.expression += $expr2
    $alarm.expression.expression += $expr3
    
    $action = New-Object VMware.Vim.AlarmAction
    
    $action = New-Object VMware.Vim.AlarmTriggeringAction
    $action.action = New-Object VMware.Vim.SendEmailAction
    $action.action.toList = "[email protected];"
    $action.action.ccList = ""
    $action.action.subject = ""
    $action.action.body = ""
    $action.green2yellow = $false
    $action.yellow2red = $false
    $action.red2yellow = $false
    $action.yellow2green = $false
    
    $spec = New-Object VMware.Vim.AlarmTriggeringActionTransitionSpec
    $spec.startState = "yellow"
    $spec.finalState = "red"
    $spec.repeats = $false
    
    $action.transitionSpecs = $spec
    
    $alarm.action = New-Object VMware.Vim.GroupAlarmAction
    $alarm.action.action += $action
    
    $setting = New-Object VMware.Vim.AlarmSetting
    $setting.toleranceRange = 0
    $setting.reportingFrequency = 0 
    
    $alarm.setting = $setting
    
    $alarmMgr.CreateAlarm($entity.MoRef, $alarm)
    

    Note that I reused the $condition11 into three expressions since it does not change.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • export and import vcenter alarms

    Hello

    I'm working on the migration of all the alarms configured production vcenter (running on 5.1) to another (race with 5.5). Y at - it a medium CLI script or the power to perform the same task.

    your quick response will be highly appreciated. I need this bad.

    Please see the resources below

    VMware KB: Restoration and copy of the Server vCenter alarms

    Download | stripeyfish

    Import/export script alarms between VC or synchronize alarms between 2 virtual centres

  • Loading and running scripts consecutive in LabVIEW

    Hello

    I would like to start by saying that I am very new to LabVIEW so I apologize for questions that should seem obvious. In addition, when you answer please don't forget I am unfamiliar as I want to be with LabVIEW in general. I recently had a problem on my desktop to add features to a VI preexiting, quite complex. The solution seems to be in scripts. However, a script more 55 loading lines gives an error (is this normal? Is there a way around it?). The problem is fairly easy to break into small pieces, so that the script has been divided into several smaller parts which offer the same functions when run consecutively. After each script execution, the system will take time to process (up to 300 ms, IIRC) and assert a bit ready when you are finished. Using this ready signal as a trigger, I want to run the following script.

    Scripts are read correctly in the program using "niHSDIO Script.vi of Scripture" and can be selected by hardcode the name of the 'script' in 'Configure Script niHSDIO to Generate.vi'. It will run all the scripts successfully of when hardcoded, but trying to call the following script (script names stored in a table and incremented with a while loop) an error is given:

    Error - 1074118651 occurred at niHSDIO Write
    Script.vi
    
    Possible reason(s):
    Driver Status: (Hex 0xBFFA4005) You cannot perform this
    action while the session is in the running state.
    

    At this point, I read quite a bit online and in the documentation to trying to find a way to suspend, interrupt, etc. the State to allow another script load, but I have not been able to understand.

    On the other hand, if there is a way to load a script of arbitrary length, I think that can solve my problem as well. Please let me know what additional information may be required to help solve this, I am sure that I left out all the good bits.

    Thank you in advance,

    Landon

    Edited for clarity.

    Oops... Here is the link to the white paper:

    http://www.NI.com/white-paper/7283/en/

    See you soon,.

  • alarm with DSC on Vista record

    Hello

    I have a TT probblem with the alarm logging. I use Labview 8.6.1 module DSC on Windows Vista.

    The alarm configuration is correct. I also leave the original path to the database - C:\Program NIUninstaller Instruments\LabVIEW 8.5\data

    This issue I think is open for writing and readig database of the Citadel.

    When I look in this folder, the mssql.ldf and the mssql.mdf are lacking.

    When I try to look at the history of alarms in MAX, there is only an empty table. A view of trace works perfectly.

    I test the same project on the other computer with Windows XP. Alarm, registration of works ok. on this computer.

    I have alco the path for the database (E:\...), without success.

    Please let know us if you have any idea what else I can try out.

    Thank you.

    Best regards

    Zdenko.

    Hello

    Alarm and event logging works perfectly with Windows XP installed on the same computer.

    Best regards

    Zdenko.

  • Group Policy scripts to connect to users in the domain without roaming profiles

    Hi all

    I am the network administrator in a school, and I have a problem with the configuration scripts to the default printer for our students.

    I created a Powershell script that configures the printer default, based on the ORGANIZATIONAL unit of the computer on which the user connects from.

    When a domain user without a roaming profile on a BBS post specific work for the first time, the script does not seem to set the default printer.

    HOWEVER, the script works fine if:

    (a) the user has a roaming (no longer) profile; or

    (b) the user is logged on this before given workstation.

    From what I see in procmon, Powershell actually runs when a user logs on to a workstation, for the first time, but the printer mapping is not changed.

    Is it because the user has a local profile to each new PC they connect and that the profile is not created at a point where the default printer can be defined?

    Can you see a way to work around that rather than make roaming profiles or get the user to sign out and then sign back?

    Thank you

    Peter

    This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)

    If you give us a link to the new thread we can point to some resources it
  • Collection of data warehouses in the Script of commissioning

    Hi all

    First of all, I want to say thank you for all the help provided in these communities.  It has been very valuable in recent years.

    I had the opportunity to work on a configuration script treated for over a week now and have got almost ready for release but got stuck on the type of a basic element - collection of data warehouses.

    The idea is that we can use this to launch several environments identical demand - ripe for automation!

    We get the number of machines required is in $clcount, and $dslist can be equal to something like this...

    NameFreeSpaceGBCapacityGB
    SAN-ds-33,399.115,119.75
    SAN-ds-41,275.265,119.75
    SAN-ds-2661.8135,119.75
    SAN-ds-5292.3425,119.75
    SAN-ds-8273.2045,119.75

    My method works as long as the number of machines is less than the number of available data warehouses, but fails if the number of machines exceeds available data warehouses.

    $resources = Get-Cluster "Compute 1"
    $OSSpec = Get-OSCustomizationSpec "Base 2012 R2"
    $dslist = get-datastore | where {$_.Name -match "SAN" -and $_.FreeSpaceGB -gt 200} | Sort FreeSpaceGB -Descending
    $folder = Get-Folder "Lab 2"
    $clcount = "17"
    $envn = "Lab2-"
    $OSSpec = $OSSpec | New-OSCustomizationSpec -Name Temp-Spec -Type NonPersistent -Confirm:$false
    foreach ($num in 1..$clcount){
        $suffix = "{0:D2}" -f $num
        $datastore = $dslist[$num-1]
        $OSSpec = $OSSpec | Set-OSCustomizationSpec -NamingScheme fixed -NamingPrefix "APPCL$suffix"
        New-VM -Name $envn"APPCL"$suffix -Template $template -OSCustomizationSpec $OSSpec -Location $folder -ResourcePool $resources -Datastore $datastore
    }
    ##End build Client Machines
    $OSSpec | Remove-OSCustomizationSpec -Confirm:$false
    
    

    I know it would be easy to solve with the clusters and SDR data store, but I believe that would always choose the store of data with the most free space and you can see our environment could be a little unbalanced, so I am trying to build in a little more intelligence in the distribution of these machines in data warehouses.

    Any help or pointers in the right direction would be greatly appreciated!

    Use % (remainder of division) to transform $num into something that will be less than the size of option:

    $datastore = $dslist [$num % $dslist.count]

    Then change the ascending sort.

  • Installation BI applications Oracle 11g sur-erreur AIX 7 Configuration to the configuration of the ODI

    All,

    I installed oracle bi application for 11.1.1.7.1 AIX 7.1 server. My process of BI applications configuration is to launch a mistake in the part configuration ODI.  Detailed error is pasted below. I perform software only installation as with AIX, you must select Install only software for OBIEE and OLIVIER and configure BIAPPS later.

    I saw two others archived son who discusses this error, and it seems that it is events expected for deployments of AIX error. And both of them say that it is ok to continue the Setup process and make this ODI configuration for later.

    However, the instructions on how to do this from one of the thread is fragmentary or incomplete. If you guys have run into that, can you please guide on how you have been able to solve this problem? The location for 2 OTN discussion is stuck here as well.

    Re: OLIVIER 11.1.1.7.1 install the mistake out to ODI configuration

    Re: Installation OBIA 11 g - stuck to the configure script

    Error:

    configure_odi: problem invoking WLST - Traceback (innermost last):

    configure_odi: file ' < userpath > / Oracle/Middleware/Oracle_BI1/bifoundation/install/configure_odi.py ", line 261, in?

    configure_odi: file ' < userpath > / Oracle/Middleware/Oracle_BI1/bifoundation/install/configure_odi.py ", line 206, in _configureOdiDwIntegration

    configure_odi: at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)

    configure_odi: to sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)

    configure_odi: to sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)

    configure_odi: to java.lang.reflect.Constructor.newInstance(Constructor.java:527)

    configure_odi:

    configure_odi: java.lang.Exception: java.lang.Exception: update of the database of the DW_FILE server failed with return code: 1

    configure_odi:

    java.lang.Exception: java.lang.Exception: WLST Script task failed with status 1

    at oracle.as.install.biapps.biappsconfig.standard.ODIConfigTask.doExecute(ODIConfigTask.java:65)

    at oracle.as.install.bi.biconfig.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:70)

    at oracle.as.install.bi.biconfig.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:66)

    at oracle.as.install.bi.biconfig.BIConfigMain.doExecute(BIConfigMain.java:113)

    at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:375)

    at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)

    at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)

    at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)

    at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:96)

    at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:186)

    at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)

    at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)

    at java.lang.Thread.run(Thread.java:738)

    Caused by: java.lang.Exception: WLST Script task failed with status 1

    at oracle.as.install.bi.biconfig.standard.WLSTScriptTask.doExecute(WLSTScriptTask.java:119)

    at oracle.as.install.biapps.biappsconfig.standard.ODIConfigTask.doExecute(ODIConfigTask.java:62)

    ... 12 more

    RP

    So, that's what we were doing to solve this problem:

    1 let the Configuration process continue with the error. All other tasks should complete successfully.

    2. install the ODI studio on a client computer, WIndows/Linux.

    3. manually the program installation/editing file server and data server technology tab.

    RP

  • Recovery of vSphere PowerCLI with alarms

    Hello

    Can you please help me write a PowerCLI script that would recover the vSphere alarms?

    I want the script to show only alarms last 24 hours only if not acknowledged or deleted.

    Example:

    Get-VIEvent - MaxSamples 10 | Select Fullformattedmessage # this command shows me the last 10 events

    Win01 from green to Red alarm # the script "MyAlarm" should show me this alarm

    win01 on esx1.company.pri in Lodz is turned off

    win01 on esx1.company.pri in Lodz stops

    Task: Stop virtual machine

    win01 on esx1.company.pri in Lodz is turned on

    Message on win01 on esx1.company.pri in Lodz: running VMware ESX in a virtua...

    starts win01 on the host esx1.company.pri in Lodz

    Task: Power on virtual machine

    Task: Initialize turn

    Alarm"monitor the health status"on changed from yellow to green data centers.

    Help, please.

    If the alarm was not recognized and authorized, it should still show.

    You can see these alarms with

    $dc = get - file - name of data centers

    $dc. ExtensionData.TriggeredAlarmState |

    Select @{N = 'Entity'; E = {Get-view-Id $_.} Entity | {{Select - ExpandProperty name}}.

    OverallStatus,

    @{N = "alarm"; E = {(Get-View-ID $_.)} Alarm). Info.Name}}

    -What are you looking for?

  • Exempt / substitute a VM from a definition of the alarm

    I have a problem where a single virtual machine regularly has high CPU usage and trigger the alarm to default CPU.  I want to turn off the alarm of CPU on this virtual machine unique but want to leave it enabled on all other virtual machines.  I met someone with the same problem in this thread, what is old enough:

    Re: Substitution alarm

    Is it possible to substitute a definition of the alarm, or exempt a particular object to inherit the alarms configured at a higher level?  I know I can remove the definition of alarm CPU on the top-level object and create alarms of CPU for all other virtual machines manually, but that's not really what I'm looking for because it's a lot of work and it requires me to do not forget to create a CPU alarm whenever I create a new virtual machine.

    Is what I'm trying to do possible?

    Hello

    It is not so complicated, you can start with particular alarm (i.e. high CPU usage) on level of vCenter... then at the data center level

    Create two folders, one for VM you want to exclude the folder second alarm of CPU for other virtual machines.

    Next right on second alarm of CPU to recreate folder to make it spread to all other virtual machines.

    When you create a new virtual machine, simply place it in the right folder with desired awakening group.

    Although its not perfect for your case... you can also disable the alarm action at all to object to specific infrastructure.

    Just right click on VM - > alarm - > disable the stock alarm

Maybe you are looking for