<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solarwinds Archives - VirtJunkie</title>
	<atom:link href="/category/solarwinds/feed/" rel="self" type="application/rss+xml" />
	<link>/category/solarwinds/</link>
	<description>Virtualization, Automation, and anything else that might be on my mind</description>
	<lastBuildDate>Thu, 14 Feb 2013 02:39:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.5.2</generator>

<image>
	<url>/wp-content/uploads/2020/04/cropped-vj4-150x150.png</url>
	<title>Solarwinds Archives - VirtJunkie</title>
	<link>/category/solarwinds/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Monitor NetApp SnapMirror via Solarwinds Server and Application Monitor</title>
		<link>/2013/02/13/monitor-netapp-snapmirror-via-solarwinds-server-and-application-monitor/</link>
					<comments>/2013/02/13/monitor-netapp-snapmirror-via-solarwinds-server-and-application-monitor/#respond</comments>
		
		<dc:creator><![CDATA[Jon]]></dc:creator>
		<pubDate>Thu, 14 Feb 2013 02:39:35 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[NetApp]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Solarwinds]]></category>
		<guid isPermaLink="false">http://45.63.13.214/?p=360</guid>

					<description><![CDATA[<p>So yesterday I talked about using a Powershell script with in Solarwinds to monitor volume sizes. Using the NetApp Data ONTAP Toolkit, we have the ability to do monitor a lot of different things, and track the information using Solarwinds. In this post I will show how to monitor SnapMirror relationships using Solarwinds. Since my last [&#8230;]</p>
<p>The post <a href="/2013/02/13/monitor-netapp-snapmirror-via-solarwinds-server-and-application-monitor/">Monitor NetApp SnapMirror via Solarwinds Server and Application Monitor</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>So <a title="Monitor NetApp SAN via Solarwinds Server and Application Monitor" href="http://45.63.13.214/?p=326">yesterday I talked about</a> using a Powershell script with in Solarwinds to monitor volume sizes. Using the <a title="Install NetApp DataOnTap Powershell" href="http://45.63.13.214/?p=304">NetApp Data ONTAP Toolkit</a>, we have the ability to do monitor a lot of different things, and track the information using Solarwinds. In this post I will show how to monitor SnapMirror relationships using Solarwinds.</p>
<p><span id="more-360"></span></p>
<p>Since my last post, I was able to find a document that gives a bit more&#8230; official insight into what Solarwinds expects in terms of Powershell script output. I&#8217;ve attached the PDF to the bottom of this post.</p>
<p>A big change from the last script, is that this one utilizes the &#8220;Message&#8221; field within solarwinds, whereas the old post only references the &#8220;Statistic&#8221; post.  This allows us to give more information as to why an issue might be occurring.</p>
<p>For example, let&#8217;s say a SnapMirror relationship is considered to be in  &#8220;critical&#8221; status if it has not been replicated in 480 minutes (or 4 hours), but you would like to know why this failure is occurring, without connecting to the CLI on your filer or NetApp System Manager (NSM). You can configure your Powershell to output important information in case of a failure. This script does just that. See an example screenshot below:</p>
<p><a href="https://new.virtjunkie.com/wp-content/uploads/2013/02/solarwinds-snapmirror-component.png"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-372" style="border: 1px solid black;" alt="solarwinds-snapmirror-component" src="https://new.virtjunkie.com/wp-content/uploads/2013/02/solarwinds-snapmirror-component.png" width="697" height="322" srcset="/wp-content/uploads/2013/02/solarwinds-snapmirror-component.png 697w, /wp-content/uploads/2013/02/solarwinds-snapmirror-component-300x139.png 300w" sizes="(max-width: 697px) 100vw, 697px" /></a></p>
<p>Important things to note about this script:</p>
<ol>
<li>The filer that you will be connecting to is determined by how you have the Application Template / Component config.</li>
<li>The Snapmirror relationship you insert in the &#8220;script argument&#8221; field should appear just like the output of the source field output of a Get-NaSnapmirror command run directly from powershell.</li>
</ol>
<p><a href="https://new.virtjunkie.com/wp-content/uploads/2013/02/Configuring_and_Integrating_PowerShell.pdf">Configuring_and_Integrating_PowerShell</a> (<a href="http://www.solarwinds.com/documentation/apm/docs/Configuring_and_Integrating_PowerShell.pdf">Alternate link</a>)</p>
<p>The script is below:</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">param (
    [string]$Location = $( Read-Host &quot;The source location or destination \
    location of the SnapMirror pair&quot; )
)
#***
# The Variable $location is filled in by Solarwinds. It accepts wildcards.
#***

############################ BEGIN GetVolumeAlert.ps1 ####################
# SnapMirror Alert Generator ~ v1.0 - Jon Howe
# REQUIRES NETAPP POWERSHELL TOOLKIT / PowerShell 2.0 recommended!
#
# Ensure that the variable ($profile) for the executing user contains the
# following line:
# import-module dataontap
##########################################################################

#Set the credentials for your filer.
$filerpassword = &quot;[Enter Your Password Here]&quot;

#The value ${IP} will be replaced by the server selected in Solarwinds
$Filername = '${IP}'

##########################################################################
# DO NOT EDIT BELOW THIS LINE
###########################################################################
Import-module DataONTAP
$password = ConvertTo-SecureString $filerpassword -AsPlainText –Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential \
 -ArgumentList &quot;root&quot;,$password
$connection =  Connect-NaController $Filername -Credential $cred

$SM_List = Get-NaSnapmirror -Location $Location

Foreach ($SM in $SM_List)
{
	$smError = $SM.CurrentTransferError
	$status = $SM.Status

	$rawSrc = $SM.Source
	# Apparently solarwinds freaks out when there's a colon in the
	$srcSplit = $rawSrc.Split(&quot;:&quot;)
	$srcFiler = $srcSplit[0]
	$srcVolume = $srcSplit[1]
	$src = &quot;$srcVolume@$srcFiler&quot;

	Write-Host &quot;Statistic.$srcVolume :&quot; $lag
	if ($smError)
	{
		Write-Host &quot;Message.$srcVolume :&quot; $status &quot;-&quot; $smError
	}
	Else
	{
		Write-Host &quot;Message.$srcVolume :&quot; $status
	}
}

exit(0)</pre><p></p>
<p>As usual, if you have any questions about this, let me know!</p>
<p>The post <a href="/2013/02/13/monitor-netapp-snapmirror-via-solarwinds-server-and-application-monitor/">Monitor NetApp SnapMirror via Solarwinds Server and Application Monitor</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/2013/02/13/monitor-netapp-snapmirror-via-solarwinds-server-and-application-monitor/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Monitor NetApp SAN via Solarwinds Server and Application Monitor</title>
		<link>/2013/02/12/monitor-netapp-san-via-solarwinds-server-and-application-monitor/</link>
					<comments>/2013/02/12/monitor-netapp-san-via-solarwinds-server-and-application-monitor/#comments</comments>
		
		<dc:creator><![CDATA[Jon]]></dc:creator>
		<pubDate>Wed, 13 Feb 2013 01:57:12 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[NetApp]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Solarwinds]]></category>
		<guid isPermaLink="false">http://45.63.13.214/?p=326</guid>

					<description><![CDATA[<p>I was unable to find any examples for how to do this online, so I came up with my own solution using the NetApp Data ONTAP toolkit as well as a slight modification of your powershell profile. You&#8217;ll need to download the toolkit and install it on your SAM machine as a prerequisite for this to [&#8230;]</p>
<p>The post <a href="/2013/02/12/monitor-netapp-san-via-solarwinds-server-and-application-monitor/">Monitor NetApp SAN via Solarwinds Server and Application Monitor</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I was unable to find any examples for how to do this online, so I came up with my own solution using the NetApp Data ONTAP toolkit as well as a slight modification of your powershell profile.</p>
<p><span id="more-326"></span></p>
<p>You&#8217;ll need to <a title="Install NetApp DataOnTap Powershell" href="http://45.63.13.214/?p=304">download the toolkit and install it on your SAM machine</a> as a prerequisite for this to work.</p>
<p>Additionally, I needed to modify the powershell profile of the user that will execute the script.  The location of the Powershell profile is stored in the variable $profile.  Just make sure that file contains the line</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">import-module dataontap</pre><p></p>
<p>After you get your environment all set, you&#8217;ll need to configure a new Application Template within SAM.</p>
<p>To do this, navigate to Admin -&gt; Settings -&gt; SAM Settings -&gt; Create a New Template</p>
<p>The important Fields to fill in are:</p>
<p>Template Name: I recommend giving this a name that identifies the particular filer you&#8217;re connecting to</p>
<p><a href="https://new.virtjunkie.com/wp-content/uploads/2013/02/template1.png"><img decoding="async" class="alignnone size-full wp-image-347" style="border: 1px solid black;" alt="template1" src="https://new.virtjunkie.com/wp-content/uploads/2013/02/template1.png" width="513" height="193" srcset="/wp-content/uploads/2013/02/template1.png 513w, /wp-content/uploads/2013/02/template1-300x113.png 300w" sizes="(max-width: 513px) 100vw, 513px" /></a></p>
<p>Then Add a component monitor:</p>
<p><a href="https://new.virtjunkie.com/wp-content/uploads/2013/02/addComponentMonitor.png"><img decoding="async" class="alignnone size-full wp-image-348" style="border: 1px solid black;" alt="addComponentMonitor" src="https://new.virtjunkie.com/wp-content/uploads/2013/02/addComponentMonitor.png" width="149" height="31" /></a></p>
<p>Select the Windows PowerShell Monitor</p>
<p><a href="https://new.virtjunkie.com/wp-content/uploads/2013/02/newPowershellComponent.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-349" style="border: 1px solid black;" alt="newPowershellComponent" src="https://new.virtjunkie.com/wp-content/uploads/2013/02/newPowershellComponent.png" width="628" height="155" srcset="/wp-content/uploads/2013/02/newPowershellComponent.png 628w, /wp-content/uploads/2013/02/newPowershellComponent-300x74.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a></p>
<p>Paste the script below into the script body, and put the name of the volume in the &#8220;Script Arguments&#8221; field. As a bonus, you can use a wildcard in the Script Arguments field in order to monitor multiple volumes at the same time.</p>
<p>If you like, you can modify line 28 below to better fit your needs. For example, I have different component that has the line below in place. This allows me more flexibility than what I get by using the script arguments field.</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">$VolArray = get-navol | Where-Object {$_.Name -eq &quot;CIFS0&quot; -or $_.Name \
-eq &quot;CIFS1&quot; -or $_.Name -eq &quot;CIFS2&quot;  -or $_.Name -eq &quot;CIFS3&quot; -or \
$_.Name -eq &quot;CIFS4&quot;}</pre><p></p>
<p>&nbsp;</p>
<p></p><pre class="urvanov-syntax-highlighter-plain-tag">param (
[string]$Volume = $( Read-Host &quot;Enter the volume name, please&quot; )
)
############################ BEGIN GetVolumeAlert.ps1 ####################
# Volume Alert Generator ~ v1.0 - Jon Howe
# REQUIRES NETAPP POWERSHELL TOOLKIT / PowerShell 2.0 recommended!
#
# Ensure that the variable ($profile) for the executing user contains the
# following line:
# import-module dataontap
##########################################################################

#Set the credentials for your filer.
$filerpassword = &quot;Enter Your Password Here&quot;

#The value ${IP} will be replaced by the server selected in Solarwinds
$Filername = '${IP}'

##########################################################################
# DO NOT EDIT BELOW THIS LINE
###########################################################################
Import-module DataONTAP
$password = ConvertTo-SecureString $filerpassword -AsPlainText –Force
$cred = New-Object -TypeName System.Management.Automation.PSCredential \
 -ArgumentList &quot;root&quot;,$password
$connection = Connect-NaController $Filername -Credential $cred

$VolArray = get-navol -Name $Volume

foreach ($vol in $VolArray)
{
 $name = $vol.Name
 $percent = $vol.Used

 # This is important - Solarwinds requires a &quot;Unique identifier&quot; for
 # each value returned by a script. The line below creates an
 # identifier for each result returned.
 Write-Host &quot;Statistic.$name :&quot; $percent
}

#Solarwinds requires that this be included in a PowerShell script.
exit(0)</pre><p></p>
<p>I&#8217;m using this right now to monitor a production environment with a lot of success. If you want to see a different setup, let me know!</p>
<p>The post <a href="/2013/02/12/monitor-netapp-san-via-solarwinds-server-and-application-monitor/">Monitor NetApp SAN via Solarwinds Server and Application Monitor</a> appeared first on <a href="/">VirtJunkie</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>/2013/02/12/monitor-netapp-san-via-solarwinds-server-and-application-monitor/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
