<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Alarm expressions &#8211; Part 1 : Metric alarms	</title>
	<atom:link href="https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/</link>
	<description>My PowerShell ramblings</description>
	<lastBuildDate>Mon, 04 May 2015 17:15:21 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/><atom:link rel="hub" href="https://websubhub.com/hub"/>	<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-3492</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Mon, 04 May 2015 17:15:21 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-3492</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-3491&quot;&gt;Alex&lt;/a&gt;.

Well, thank you, much appreciated.]]></description>
			<content:encoded><![CDATA[<p>Well, thank you, much appreciated.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Alex		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-3491</link>

		<dc:creator><![CDATA[Alex]]></dc:creator>
		<pubDate>Mon, 04 May 2015 15:40:08 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-3491</guid>

					<description><![CDATA[Thank you again Luc! 
I even gave up counting how many hours saved me your amazing scripts!]]></description>
			<content:encoded><![CDATA[<p>Thank you again Luc!<br />
I even gave up counting how many hours saved me your amazing scripts!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-1290</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Tue, 15 Nov 2011 19:52:09 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-1290</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-1289&quot;&gt;Ziof3ster&lt;/a&gt;.

Thanks.
I just changed the line where I specify the subject to
&lt;code&gt;
$trigger.action.Subject = &quot;{eventDescription}&quot;
&lt;/code&gt;
The email I received got the correct subject.

&lt;img src=&quot;https://lucd.info/wp-content/uploads/2009/11/alarm-subject.png&quot; alt=&quot;Alarm email action&quot; /&gt;

If that doesn&#039;t work for you, send me the script you are actually using (to lucd (at) lucd (dot) info)]]></description>
			<content:encoded><![CDATA[<p>Thanks.<br />
I just changed the line where I specify the subject to<br />
<code><br />
$trigger.action.Subject = "{eventDescription}"<br />
</code><br />
The email I received got the correct subject.</p>
<p><img src="https://lucd.info/wp-content/uploads/2009/11/alarm-subject.png" alt="Alarm email action" /></p>
<p>If that doesn&#8217;t work for you, send me the script you are actually using (to lucd (at) lucd (dot) info)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ziof3ster		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-1289</link>

		<dc:creator><![CDATA[Ziof3ster]]></dc:creator>
		<pubDate>Tue, 15 Nov 2011 14:09:14 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-1289</guid>

					<description><![CDATA[Hi LucD,

this script is fantastic and I&#039;ve modified it to my enfvironment (Datacenter Level) to monitor the disk latency.

One question. If I want modify the email&#039;s subject using the {eventDescription} variable, it doesn&#039;t work, and simply prints &quot;eventDescription&quot;.

I&#039;ve used the environmental variable successfully inf I create the AlarmAction using the &quot;new-AlarmAction&quot; cmlet. Any Idea how I can use the Enviromental Variables inside your script?

Thanks]]></description>
			<content:encoded><![CDATA[<p>Hi LucD,</p>
<p>this script is fantastic and I&#8217;ve modified it to my enfvironment (Datacenter Level) to monitor the disk latency.</p>
<p>One question. If I want modify the email&#8217;s subject using the {eventDescription} variable, it doesn&#8217;t work, and simply prints &#8220;eventDescription&#8221;.</p>
<p>I&#8217;ve used the environmental variable successfully inf I create the AlarmAction using the &#8220;new-AlarmAction&#8221; cmlet. Any Idea how I can use the Enviromental Variables inside your script?</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tom		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-814</link>

		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Thu, 18 Nov 2010 15:06:51 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-814</guid>

					<description><![CDATA[Luc,

Have you been able to create an alarm using the perfcounter with counterID = 2 &quot;CPU Usage&quot; on a &quot;ClusterComputeResource&quot; ? When you peform a QueryAvailablePerfMetric on a cluster it returns the perfMetric with counter ID 2, so expect it should work however I keep on getting a specified parameter is incorrect... 

Any ideas ? 

Thanks,
Tom]]></description>
			<content:encoded><![CDATA[<p>Luc,</p>
<p>Have you been able to create an alarm using the perfcounter with counterID = 2 &#8220;CPU Usage&#8221; on a &#8220;ClusterComputeResource&#8221; ? When you peform a QueryAvailablePerfMetric on a cluster it returns the perfMetric with counter ID 2, so expect it should work however I keep on getting a specified parameter is incorrect&#8230; </p>
<p>Any ideas ? </p>
<p>Thanks,<br />
Tom</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-679</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Thu, 19 Aug 2010 08:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-679</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-677&quot;&gt;jrob24&lt;/a&gt;.

Hi Jason, thanks for discovering this bug.
The new version of the script should solve the problem.]]></description>
			<content:encoded><![CDATA[<p>Hi Jason, thanks for discovering this bug.<br />
The new version of the script should solve the problem.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: jrob24		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-677</link>

		<dc:creator><![CDATA[jrob24]]></dc:creator>
		<pubDate>Wed, 18 Aug 2010 18:54:26 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-677</guid>

					<description><![CDATA[Luc,

Every time I run the script to gather all of the metrics for each entity I keep receiving the following error:

Exception calling &quot;QueryAvailablePerfMetric&quot; with &quot;4&quot; argument (s): &quot;entity&quot;

Any ideas? Running against a 4.0 U2 host and vCenter. Using PowerCLI 4.1.]]></description>
			<content:encoded><![CDATA[<p>Luc,</p>
<p>Every time I run the script to gather all of the metrics for each entity I keep receiving the following error:</p>
<p>Exception calling &#8220;QueryAvailablePerfMetric&#8221; with &#8220;4&#8221; argument (s): &#8220;entity&#8221;</p>
<p>Any ideas? Running against a 4.0 U2 host and vCenter. Using PowerCLI 4.1.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: LucD		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-398</link>

		<dc:creator><![CDATA[LucD]]></dc:creator>
		<pubDate>Tue, 30 Mar 2010 18:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-398</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-395&quot;&gt;Tim&lt;/a&gt;.

Hi Tim, when you use a &lt;strong&gt;metricId&lt;/strong&gt; that returns &lt;strong&gt;percentages&lt;/strong&gt; you have to multiply the desired threshold values by 100.
For example, if you want the alarm to trigger at 75% you would have to specify 7500 in the yellow or red property.]]></description>
			<content:encoded><![CDATA[<p>Hi Tim, when you use a <strong>metricId</strong> that returns <strong>percentages</strong> you have to multiply the desired threshold values by 100.<br />
For example, if you want the alarm to trigger at 75% you would have to specify 7500 in the yellow or red property.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tim		</title>
		<link>https://www.lucd.info/2009/11/24/alarm-expressions-part-1-metric-alarms/#comment-395</link>

		<dc:creator><![CDATA[Tim]]></dc:creator>
		<pubDate>Tue, 30 Mar 2010 10:39:14 +0000</pubDate>
		<guid isPermaLink="false">http://lucd.info/?p=983#comment-395</guid>

					<description><![CDATA[Hi,

I&#039;ve modified the above to take parameters for VM, alarm name, description, counterid and red and yellow thresholds. Fairly simple modification really, however the alarm (alarm 129) is always triggering and the e-mail shows: 

Alarm Definition: 
[Yellow metric Is above 0%; Red metric Is above 0%] 

Despite me passing in 85/95 as yellow/red. When I try and drill down into the alarm settings for the created alarm:
$alarm = get-view ($alarms &#124; where-object {$_.Value -eq &quot;alarm-50&quot;})
$alarm.info.expression.expression.metric

I don&#039;t get anything back from the metric. The level above ($alarm.info.expression.expression) shows: 
Operator        : isAbove
Type            : VirtualMachine
Metric          : VMware.Vim.PerfMetricId
Yellow          : 85
YellowInterval  : 0
Red             : 95
RedInterval     : 0
DynamicType     : 
DynamicProperty : 

Any idea?

Cheers,

Tim]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;ve modified the above to take parameters for VM, alarm name, description, counterid and red and yellow thresholds. Fairly simple modification really, however the alarm (alarm 129) is always triggering and the e-mail shows: </p>
<p>Alarm Definition:<br />
[Yellow metric Is above 0%; Red metric Is above 0%] </p>
<p>Despite me passing in 85/95 as yellow/red. When I try and drill down into the alarm settings for the created alarm:<br />
$alarm = get-view ($alarms | where-object {$_.Value -eq &#8220;alarm-50&#8221;})<br />
$alarm.info.expression.expression.metric</p>
<p>I don&#8217;t get anything back from the metric. The level above ($alarm.info.expression.expression) shows:<br />
Operator        : isAbove<br />
Type            : VirtualMachine<br />
Metric          : VMware.Vim.PerfMetricId<br />
Yellow          : 85<br />
YellowInterval  : 0<br />
Red             : 95<br />
RedInterval     : 0<br />
DynamicType     :<br />
DynamicProperty : </p>
<p>Any idea?</p>
<p>Cheers,</p>
<p>Tim</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
