Director 7.7: Managing and Configuring alerts and notifications using powershell

10:41 PM
Director 7.7: Managing and Configuring alerts and notifications using powershell -

With Director 7.7, you have the ability to configure policies and conditions that you will be notified when the configured threshold is violated in a XenDesktop 7.7 environment. This post will help you configure your proactive alerts and notifications about the POSH cmdlets.

to configure the notification subscription

Let's say that you are a XenDesktop Admin and try to use your understanding XenDesktop deployment. You must be notified proactively, when the number of concurrent sessions exceeds a threshold.

Before you even get the configuration of alerts and notifications, you must configure your Notification subscription. For this you need to first add an SMTP Exchange Server, which can be used later to send e-mails when an alert is.

The Set-MonitorNotificationEmailServerConfiguration POSH cmdlets help with the configuration of the SMTP server.

Here is a sample script that can help you do it

ASNP Citrix.Monitor *

PS C: .. users administrator .BANDIT> Set -MonitorNotificationEmailServerConfiguration -ProtocolType SMTP -ServerName NameOfTheSMTPServerOrIPAddress -PortNumber port number -SenderEmailAddress EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert -RequiresAuthentication 0
Protocol: SMTP
Server name: NameOfTheSMTPServerOrIPAddress
port number: port number
SenderEmailAddress: EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert
RequiresAuthentication: false
Credential:

PS C: users administrator.BANDIT> Set-MonitorNotificationEmailServerConfiguration -ProtocolType SMTP -ServerName NameOfTheSMTPServerOrIPAddress -PortNumber port number -SenderEmailAddress EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert -RequiresAuthentication 1 -Credential " SenderEmailAddressUserNameAsPerYourExchangeServerOrAD "
Protocol: SMTP
Server name: NameOfTheSMTPServerOrIPAddress
port number: port number
SenderEmailAddress: EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert
RequiresAuthentication: [1945005Falsch]
Credential: System.Management.Automation.PSCredential

requires

If your SMTP server . no authentication, you can use the

-RequiresAuthentication flag to false

PS C: users administrator.BANDIT> set-MonitorNotificationEmailServerConfiguration -ProtocolType SMTP -ServerName NameOfTheSMTPServerOrIPAddress -PortNumber port number -SenderEmailAddress EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert -RequiresAuthentication 0
Protocol: SMTP
Server name: NameOfTheSMTPServerOrIPAddress
port number: [1945005Portnummer]
SenderEmailAddress: EmailAddressFromWhichDirectorShouldSendAnEmailWhenThereIsAnAlert
RequiresAuthentication: false
Credential:

Director multiple protocols to connect to your SMTP Server. These include SMTP, SMTP-SSL and SMTP TSL

. Note: Please do not configure more than one SMTP server

Note: You can not remove SMTP configuration, but what you can do is to edit and change its value.

a sample script

Here is an example script that will help us in creating a policy with an alert rule, parameters, conditions and e-mail recipients. We will break each part of the script in order to understand more about them.

ASNP Citrix.Monitor. *

Add

# parameter

$ timeSpan = New-TimeSpan -seconds 30

$ AlertThreshold = 1

$ alarmThreshold = 2

[1945001Add] # target UID

$ targetIds = @ ()

$ targetIds + = "0e406be1-1647-4a97-845c-7601ae1d8883"

# Add email addresses

$ emailaddress = @ ()

$ email address + = "batman @ gotham. com"

# Create a new directive

$ policy = new MonitorNotificationPolicy -Name "MyTestPolicy" description "policy created new cmdlets" -Enabled $ true test

Add -MonitorNotificationPolicyCondition -uid $ policy.Uid -ConditionType SessionsConcurrentCount -AlertThreshold $ AlertThreshold -AlarmThreshold $ alarmThreshold -AlertRenotification $ timeSpan -AlarmRenotification $ timeSpan

Add-MonitorNotificationPolicyCondition -uid $ policy.Uid -ConditionType session Speak Connected Count -AlertThreshold $ AlertThreshold - alarmThreshold $ alarmThreshold -AlertRenotification $ timeSpan -AlarmRenotification $ timeSpan

Add-MonitorNotificationPolicyTargets - uid $ policy.Uid -Scope "My test targets" -TargetKind desktop Group -TargetIds $ targetIds

Add-MonitorNotificationPolicyEmailAddresses - $ uid $ policy.Uid -EmailAddresses email address -EmailCultureName "en-US"

$ policy = Get-MonitorNotificationPolicy -uid $ policy.Uid

$ policy

configuration recipient email addresses

Since you made the SMTP Exchange Server configurations have, you now need to configure the recipients of the email.

to you specify the use of add-MonitorNotificationPolicyEmailAddresses cmdlet the recipient of the e-mail notification and select the locale to.

$ emailaddress = @ ()

$ Email address + = "batman@gotham.com"

Add-MonitorNotificationPolicyEmailAddresses -uid $ policy.Uid -EmailAddresses $ Email address -EmailCultureName "en-uS"

Since you create a notification subscription done in the previous step configuration goals and target values ​​

, let us focus on creating a policy. The first thing we need to do is to specify a target. A goal is nothing more than the device on which the alert rule is applied to. For e.g.:- If my rule "Notify me connected at the session peak hits 100 on all machines in my delivery group xyz" is; then here Delivery Group aims

is xyz To specify a target and target value, you need the cmdlet use .:

Add-MonitorNotificationPolicyTargets

Suppose that you want to set the session simultaneous warning to a delivery group for RDS machines. They are the DG have received unique identifier and provide a value for the Add-MonitorNotificationPolicyTargets cmdlets.

How can you get it?

The get-broker desktop group cmdlets and you will get the unique identifier under UUID

So, now we have set the target value of the delivery group, to which we want our specific alarm rule.

[1945001finden] Next we need to specify the destination and target type. Here we can use the add-MonitorNotificationPolicyTargets and the destination type specified as "RDSWorker"

$ targetIds = @ ()

$ targetIds + = "0e406be1-1647-4a97-845c-7601ae1d8883"

Add-MonitorNotificationPolicyTargets -uid $ policy.Uid -Scope "My test targets" -TargetKind desktop Group -TargetIds $ targetIds

We have to specify the target type as RDSWorker, or a website or. Desktop Group

generally can be aligned alarm policy in three different areas

  1. Site -. will apply to all machines in the entire site and the alarm threshold is to be applied to the total value of all equipment are included
  2. Desktop Group - .. for all machines in the entire delivery group and the alert threshold are included in the total value of all equipment applied apply
  3. RDS Worker -. will apply to all machines in the delivery group, but the alarm threshold will be applied to individual machines

configuration conditions and parameters

Now you are ready to select a destination. We previously wanted to put policy meeting simultaneous policy an alert rule. Similarly session simultaneous condition, there are other conditions that can be set for the policy. checked

Alarm type condition
tips connected sessions detected when a momentary (one minute sample) number of peaks associated sessions for the entire site of a particular delivery group exceeds a configured number threshold.
tips Disconnect Sessions Detected when a momentary (one minute sample) number of top events for the entire site of a disconnected particular delivery group exceeds a configured number threshold.
Peak Concurrent Sessions Detected when a momentary (one minute sample) number of peak concurrent (total) exceeds sessions for the entire site of a particular delivery group a configured number threshold.
Connection Failure Count Detected when the number of connections in a configurable period of time not over the entire site of a particular delivery exceeds configures a count threshold.
Connection Failure Rate is detected when the ratio of connection drops to connection attempts in a configurable period of time throughout the site a certain delivery group exceeds a configured percent threshold.
Error desktop OS machines Detected when a momentary (one minute sample) number of desktop OS machines in a failed state for the entire site of a particular delivery group a configured threshold number exceeds.
Failed Server OS machines Detected when a momentary (one minute sample) exceeds the number of server OS machines in an error state for the entire site of a particular delivery group a configured threshold number.
average Logon duration Detected when the average session login time in a configurable period of time over the entire

site or for a particular delivery group execeeds configured a duration threshold ,

RDS Evaluator Index load Detected when a configured load index value is for 5 minutes

now we have sustainably to define the conditions and parameters for the policy.

The add-MonitorNotificationPolicyCondition we can add the alarm threshold, the alarm threshold, the alarm notification again time, the alarm re-notification time and the time.

Add-MonitorNotificationPolicyCondition -uid $ policy.Uid -ConditionType SessionsConcurrentCount -AlertThreshold $ AlertThreshold -AlarmThreshold $ alarmThreshold -AlertRenotification $ timeSpan -AlarmRenotification $ timeSpan

  • AlertThreshold - threshold at which the fires warning
  • AlarmThreshold - threshold at which a critical alert is triggered
  • AlertRenotification - period after which the alarm will be triggered again
  • AlarmRenotification - duration after critical message be retriggered
  • time - window where the alert threshold condition, warning or critical is checked

the new-MonitorNotificationPolicy cmdlets will help you a new policy to create.

Now you're all set to go!

that's all, folks!

All this will help you create a new policy parameters for conditions, effectively manage policies and alerts, and in particular monitoring the provision.

Previous
Next Post »

1 comment

  1. Director 7.7: Managing And Configuring Alerts And Notifications Using Powershell - What Is A Vpn Connection >>>>> Download Now

    >>>>> Download Full

    Director 7.7: Managing And Configuring Alerts And Notifications Using Powershell - What Is A Vpn Connection >>>>> Download LINK

    >>>>> Download Now

    Director 7.7: Managing And Configuring Alerts And Notifications Using Powershell - What Is A Vpn Connection >>>>> Download Full

    >>>>> Download LINK mS

    ReplyDelete