<?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>Opsview Labs &#187; monitoring</title>
	<atom:link href="http://labs.opsview.com/tag/monitoring/feed/" rel="self" type="application/rss+xml" />
	<link>http://labs.opsview.com</link>
	<description>Opsview&#039;s Engineering Blog</description>
	<lastBuildDate>Fri, 20 Jan 2012 09:32:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Post Status Messages from Opsview to your Twitter Account</title>
		<link>http://labs.opsview.com/2011/11/how-to-post-status-messages-from-opsview-to-your-twitter-account/</link>
		<comments>http://labs.opsview.com/2011/11/how-to-post-status-messages-from-opsview-to-your-twitter-account/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 13:37:16 +0000</pubDate>
		<dc:creator>brian.king</dc:creator>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[notifications]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[status alerts]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=1701</guid>
		<description><![CDATA[
			
				
			
		
Opsview gives you lots of standard options for receiving status notifications, but with a bit of custom scripting you can also get status messages from Opsview and post them to a Twitter account. This could be useful if you want to keep all your status messages in one place with a timeline. Plus you can [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F11%2Fhow-to-post-status-messages-from-opsview-to-your-twitter-account%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F11%2Fhow-to-post-status-messages-from-opsview-to-your-twitter-account%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a title="@Opsview" href="http://labs.opsview.com/wp-content/uploads/2011/11/Twitter-Logo-300x293.jpg"><img class="alignleft size-thumbnail wp-image-1719" title="Follow @Opsview on Twitter" src="http://labs.opsview.com/wp-content/uploads/2011/11/Twitter-Logo-300x293-150x150.jpg" alt="How to Get Twitter Notifications in Opsview" width="150" height="150" /></a></p>
<p><a href="http://www.opsview.com">Opsview </a>gives you lots of standard options for receiving status notifications, but with a bit of custom scripting you can also get status messages from Opsview and post them to a Twitter account. This could be useful if you want to keep all your status messages in one place with a timeline. Plus you can also set up an account for other members of your team to follow so they can also see the updates. However it&#8217;s probably best that the Twitter account is kept within your organisation unless you want the world to see the status of your servers!</p>
<p>This article tells you how to configure Opsview to send messages to Twitter. For configuring this you need to have access to the shell of your Opsview server.</p>
<p><span id="more-1701"></span></p>
<p>To access Twitter from Opsview, you&#8217;ll need to install <a href="https://github.com/tweepy/tweepy">Tweepy</a>. Tweepy is a Python library for accessing the Twitter API. It requires Python 2.5 or later. If you need to install Python 2.6 you can follow the instructions on this <a href="http://ben.timby.com/?p=123">blog</a>.</p>
<pre># wget http://dagobah.ftphosting.net/yum/smartfile.repo -O /etc/yum.repos.d/smartfile.repo</pre>
<p>Then you can use YUM to install python26 package:</p>
<pre># yum install python26 python26-distribute</pre>
<p>To get a list of installed packages, do:</p>
<pre># yum list *python26* | grep -i installed</pre>
<pre>Installed Packages
python26.x86_64             2.6.5-6.el5   installed
python26-distribute.noarch  0.6.10-4.el5  installed
python26-libs.x86_64        2.6.5-6.el5   installed</pre>
<p>Install Tweepy</p>
<pre>/usr/bin/easy_install-2.6 tweepy</pre>
<p>Next you&#8217;ll need to authenticate Twitter from the command line. This blog tells you <a href="http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth">how.</a></p>
<p>At this point you&#8217;ll need to create a new Twitter account which will be used to post the notifications.</p>
<p>Make sure you enable <strong>Tweet Privacy</strong> under <strong>Settings</strong>, in the Twitter account, so that posts are not made public (unless you want them to be!)</p>
<p>After creating the Twitter account, you&#8217;ll need to <a href="http://talkfast.org/2010/05/31/twitter-from-the-command-line-in-python-using-oauth">register a new client app with Twitter.</a></p>
<p>Select &#8220;Connect the app to your Twitter account&#8221; with a minor change in the first line.. write <strong>python26 </strong>instead of python</p>
<pre>#!/usr/bin/env python26

Import tweepy

CONSUMER_KEY = 'paste your Consumer Key here'
CONSUMER_SECRET = 'paste your Consumer Secret here'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth_url = auth.get_authorization_url()
print 'Please authorize: ' + auth_url
verifier = raw_input('PIN: ').strip()
auth.get_access_token(verifier)
print "ACCESS_KEY = '%s'" % auth.access_token.key
print "ACCESS_SECRET = '%s'" % auth.access_token.secret</pre>
<p>Again, in  &#8220;Create the command line script&#8221;, change to <strong>python26</strong>. Don&#8217;t forget to add your own keys.</p>
<pre>#!/usr/bin/env python26

import sys
import tweepy

CONSUMER_KEY = 'paste your Consumer Key here'
CONSUMER_SECRET = 'paste your Consumer Secret here'
ACCESS_KEY = 'paste your Access Key here'
ACCESS_SECRET = 'paste your Access Secret here'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)
api.update_status(sys.argv[1])</pre>
<p>Then &#8220;Send a test tweet from the command line&#8221; and if the test is successful, do the following:</p>
<pre>1.	Move the script to /usr/local/nagios/libexec/notifications/.</pre>
<p>(call the script &#8216;connect_twitter&#8217;, hence script is at /usr/local/nagios/libexec/notifications/connect_twitter)</p>
<pre>2.	chown nagios:nagios /usr/local/nagios/libexec/notifications/connect_twitter
3.	chmod +x /usr/local/nagios/libexec/notifications/connect_twitter</pre>
<p>Create another script to be used by Opsview:</p>
<pre>/usr/local/nagios/libexec/notifications/notify-by-twitter</pre>
<p>The script:</p>
<pre>dt=`date '+%H:%M %d%b%y'`
if [ -n "$NAGIOS_SERVICEDESC" ]
then
msg=`echo @$NAGIOS__CONTACTTWITTERID Time:$dt. $NAGIOS_SERVICEDESC @ $NAGIOS_HOSTNAME,$NAGIOS_HOSTADDRESS is $NAGIOS_SERVICESTATE. $NAGIOS_SERVICEOUTPUT | cut -c 0-140`
/usr/local/nagios/libexec/notifications/connect_twitter "$msg"
unset msg
else
msg=`echo @$NAGIOS__CONTACTTWITTERID Time:$dt. $NAGIOS_HOSTNAME,$NAGIOS_HOSTADDRESS is $NAGIOS_HOSTSTATE. $NAGIOS_HOSTOUTPUT| cut -c 0-140`
/usr/local/nagios/libexec/notifications/connect_twitter "$msg"
unset msg
fi</pre>
<p>Again,</p>
<pre>chown nagios:nagios /usr/local/nagios/libexec/notifications/notify-by-twitter
chmod +x /usr/local/nagios/libexec/notifications/notify-by-twitter</pre>
<p>Log in to Opsview as a user with admin privileges.</p>
<p>Go to <strong>Advanced</strong> then <strong>Notification Methods</strong> from the drop down menu.</p>
<p>On the top right, click <strong>Actions</strong> and then <strong>Create new Notification Method</strong> as following: <a href="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-notify1.png"> </a></p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-notify2.jpg"><img class="aligncenter size-full wp-image-1760" title="Create new notification method" src="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-notify2.jpg" alt="Display Opsview Status in Twitter" width="500" height="155" /></a></p>
<p>Next, go to <strong>Configuration</strong> on the Opsview Menu bar, then <strong>Contacts</strong>. Click on the contact you want to set Twitter alerts for. Click the <strong>Notifications</strong> button. Add your Twitter ID (this ID will receive the Tweets).</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-profile2.jpg"><img class="aligncenter size-full wp-image-1752" title="Configure contacts" src="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-profile2.jpg" alt="Display Opsview Status on Twitter" width="500" height="386" /></a></p>
<p>Click on <strong>Submit</strong> and edit <strong>Notification Profiles</strong>.</p>
<p>Click <strong>Actions</strong>, and create new <strong>Notification Profile</strong> for user.</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-profile.jpg"></a><a href="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-notify31.jpg"><img class="aligncenter size-full wp-image-1751" title="New notification profile" src="http://labs.opsview.com/wp-content/uploads/2011/11/twitter-notify31.jpg" alt="Display Opsview Status on Twitter" width="500" height="387" /></a></p>
<p>Create the profile and submit changes.</p>
<p>Reload your configuration (click on <strong>Configuration Status</strong>, top right, then <strong>Reload Configuration</strong>).</p>
<p>Reboot one of your servers or stop a service which is added in Opsview. Note that Twitter allows 250 direct messages per day, do not cross this limit as tweets won&#8217;t come in after you exceed this number.</p>
<p>The Tweets should now start coming in!</p>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h3>About the Author</h3>
<p>Shibashish Satpathy is an Opsview Community user based in Mumbai, India. Shib works in IT Operations and enjoys photography, travelling and working with Linux!</p>
<h4>Legal Disclaimer</h4>
<p>This blog post is contributed by a member of the Opsview community. The Opsview project and Opsera Ltd accept no responsibility for the accuracy of its content and are not liable for any direct or indirect damages caused by its use.</p>
</div>
<p>Try this out for yourself by downloading <a href="http://www.opsview.com/downloads/opsview-3-vmware-virtual-appliance">Opsview Community edition</a> and get our latest tips and updates by following us on <a href="http://www.twitter.com/opsview">Twitter</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/11/how-to-post-status-messages-from-opsview-to-your-twitter-account/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Monitoring SNMP Traps from ESX hosts in Opsview (Part 1)</title>
		<link>http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-1/</link>
		<comments>http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-1/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 09:46:11 +0000</pubDate>
		<dc:creator>brian.king</dc:creator>
				<category><![CDATA[ESX]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[SNMP]]></category>
		<category><![CDATA[System Management]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[virtua]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=1188</guid>
		<description><![CDATA[
			
				
			
		This post outlines how to get SNMP traps from ESX hosts and monitor them in Opsview. The first part deals with configuring SNMP traps to get them working correctly with ESX hosts, part 2 tells you how to monitor them with Opsview.
The following steps worked on ESX 4.1. Depending on versions you may have different [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F10%2Fmonitoring-snmp-traps-from-esx-hosts-in-opsview-part-1%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F10%2Fmonitoring-snmp-traps-from-esx-hosts-in-opsview-part-1%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://labs.opsview.com/wp-content/uploads/2011/09/425_mouse_trap.jpg"><img class="alignleft size-full wp-image-1237" title="425_mouse_trap" src="http://labs.opsview.com/wp-content/uploads/2011/09/425_mouse_trap.jpg" alt="monitoring SNMP | Opsview" width="184" height="122" /></a>This post outlines how to get SNMP traps from ESX hosts and monitor them in <a href="http://www.opsview.com">Opsview</a>. The first part deals with configuring SNMP traps to get them working correctly with ESX hosts, part 2 tells you how to monitor them with Opsview.</p>
<p>The following steps worked on ESX 4.1. Depending on versions you may have different results. For simplicity, I used 10.0.0.1 as IP for my ESX host, and 10.0.0.99 for my SNMP trap handler.<span id="more-1188"></span></p>
<p>1. Download and install the <a title="Download vSphere CLI" href="http://ops.vu/mPebjb"> vSphere CLI</a>. Keep in mind that you need an account to access it. Check BugMeNot if you’re not in the mood for registering.</p>
<p>The vSphere CLI will give you a host of useful tools to control your ESX environment with without having to resport to SSH or console access.</p>
<p>2. Check if you already have an active SNMP agent on your host with the following command:</p>
<pre>vicfg-snmp --show --server 10.0.0.1</pre>
<p>3. If no traps are configured (why would you even be reading this if they were?). Add your SNMP target like this (By default, vicfg-snmp.pl is located in the C:\Program Files\VMware\VMware vSphere CLI\bin directory):</p>
<pre>vicfg-snmp.pl --server 10.0.0.1 --username root --password qwerty1234 -t 10.0.0.99@162/communitystring</pre>
<p>4. Enable the SNMP service:</p>
<pre>vicfg-snmp.pl --server 10.0.0.1 --username root --password qwerty1234 --enable</pre>
<p>5. Check that you have a working configuration by using the –show command like this:</p>
<pre>vicfg-snmp.pl --server 10.0.0.1 --username root --password qwerty1234 --show</pre>
<p>Your output should look something like this:</p>
<pre>Current SNMP agent settings: Enabled : 1 UDP port : 162 Communities : communitystring Notification targets : 10.0.0.99@162/communitystring</pre>
<p>6. If you’d like, you can send a test trap to your target to make sure you’re on the right path. If you’re just testing, you can send them to your own client PC. I use the freeware application <a title="SNMP Trap Watcher" href="http://ops.vu/oMYlZx">SNMP Trap Watcher</a> for this.</p>
<p>Sending the following command through the vSphere CLI will generate a Warm Start trap:</p>
<pre>vicfg-snmp.pl --server 10.0.0.1 --username root --password qwerty1234 --test</pre>
<p>You should receive a report in your trap watcher:</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/09/trap-watcher1.png"><img class="aligncenter size-full wp-image-1195" title="trap-watcher" src="http://labs.opsview.com/wp-content/uploads/2011/09/trap-watcher1.png" alt="" width="401" height="174" /></a></p>
<p>If you’re not getting anything, chances are the ESX firewall isn’t allowing SNMP traffic. I had to allow this using the vSphere Client (connect to the ESX server, not a vCenter host). Click the tab “Configuration”, and select “Security Profile” in the menu on your left. Click “Properties” and enable SNMP:</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/09/remote-access.jpg"><img class="size-full wp-image-1190 aligncenter" title="remote-access" src="http://labs.opsview.com/wp-content/uploads/2011/09/remote-access.jpg" alt="" width="518" height="374" /></a></p>
<p>The outgoing port will be the one you configured when you added a trap handler in step 4.</p>
<p>That’s it. You have an ESX host sending SNMP traps properly. Now all you need to do is get your monitoring software to understand what it’s saying. We’ll cover that in the <a href="http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-2/">next post.</a></p>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h3>About the Author</h3>
<p>Marcus Vejneke holds a bachelor’s degree in computer science and engineering and has worked in IT for almost 14 years. Marcus lives in Sweden and works as Sysadmin. Visit Marcus&#8217;s <a href="http://onlyblueatwork.wordpress.com/author/onlyblueatwork/">blog.</a></p>
<h3>Legal Disclaimer</h3>
<p>This blog post is contributed by a member of the Opsview community. The Opsview project and Opsera Ltd. accept no responsibility for the accuracy of its content and are not liable for any direct or indirect damages caused by its use.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 reasons why you need IT monitoring</title>
		<link>http://labs.opsview.com/2010/07/5-reasons-why-you-need-it-monitoring/</link>
		<comments>http://labs.opsview.com/2010/07/5-reasons-why-you-need-it-monitoring/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 07:17:29 +0000</pubDate>
		<dc:creator>James Peel</dc:creator>
				<category><![CDATA[Opsview]]></category>
		<category><![CDATA[System Management]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[5 reasons]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[monitoring]]></category>
		<category><![CDATA[why]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=449</guid>
		<description><![CDATA[
			
				
			
		All enterprises depend on reliable servers, network devices and business applications. Any downtime hits your bottom line. To ensure maximum IT performance across your business, you have to identify and resolve problems before they impact the user experience or security of your data.

To diagnose reliability and performance problems on complex networks you need visibility of [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Flabs.opsview.com%2F2010%2F07%2F5-reasons-why-you-need-it-monitoring%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2010%2F07%2F5-reasons-why-you-need-it-monitoring%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p>All enterprises depend on reliable servers, network devices and business applications. Any downtime hits your bottom line. To ensure maximum IT performance across your business, you have to identify and resolve problems before they impact the user experience or security of your data.</p>
<p><span id="more-449"></span></p>
<p>To diagnose reliability and performance problems on complex networks you need visibility of system events combined with the ability to spot trends and exceptions. For example, without proactive IT monitoring how can you tell whether poor application performance is related to network congestion, database performance or a high number of users?</p>
<table width="100%">
<tbody>
<tr>
<td style="text-align: center;">
<p><div id="attachment_458" class="wp-caption aligncenter" style="width: 280px"><a class="lightbox" title="derwentEvents500px" href="http://labs.opsview.com/wp-content/uploads/2010/07/derwentEvents500px.png"><img class="size-full wp-image-458 " style="border: 1px solid #ccc;" title="derwentEvents500px" src="http://labs.opsview.com/wp-content/uploads/2010/07/derwentEvents500px.png" alt="" width="270" height="141" /></a><p class="wp-caption-text">Monitoring network events as they happen!</p></div></td>
<td style="text-align: center;">
<p><div id="attachment_457" class="wp-caption aligncenter" style="width: 280px"><a class="lightbox" title="drupalCheck500px" href="http://labs.opsview.com/wp-content/uploads/2010/07/drupalCheck500px.png"><img class="size-full wp-image-457 " style="border: 1px solid #ccc;" title="drupalCheck500px" src="http://labs.opsview.com/wp-content/uploads/2010/07/drupalCheck500px.png" alt="" width="270" height="141" /></a><p class="wp-caption-text">Powerful graphing tools</p></div></td>
</tr>
</tbody>
</table>
<p>Here are five reasons why you need better network and application visibility:</p>
<p><strong>1.    To maximise your return on network investments for business application delivery</strong>
All businesses invest heavily in setting up and maintaining their IT infrastructure whether it be physical, virtualised or in the Cloud. Effective capacity planning allows you to target your spending wisely and track your return on investment. IT monitoring gives you instant access to the data you need for trend analysis and provides data warehouse capability suitable for enterprise reporting and capacity planning.</p>
<p style="text-align: center;">
<p><strong>2.    To anticipate and resolve issues before they’re problems</strong>
Knowing when there is a problem with your IT systems can be useful but anticipating problems before they occur is the real value of system monitoring. IT monitoring gives you the visibility needed to spot performance and capacity issues before they have an impact on your systems. It can also process alarms from network, storage, power and cooling infrastructure ensuring you can mitigate the effects of failing hardware.</p>
<p><strong>3.    Make your staff more effective</strong>
The biggest asset for any business is its staff, also usually this is the biggest cost. Adoption of effective IT monitoring tools shifts the focus of your staff from fire-fighting to forward-planning. A project-based approach is more time efficient and allows you to focus the talents of your staff more effectively.</p>
<p><strong>4.    To ensure quality and service levels</strong>
Maintaining quality of service requires visibility. Performance issues can remain hidden to the business while quietly eroding the confidence of customers and partners. IT monitoring exposes current problems and gives you the tools for long terms analysis and reporting. It provides service level reporting, providing clear evidence that you’re meeting the required service levels.</p>
<p><strong>5.    Move things forward!</strong>
System monitoring is the cornerstone of IT management best practice. By adopting IT monitoring you’re making immediate efficiency gains and you’re laying the foundation for even greater levels of automation, scalability and resiliency.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2010/07/5-reasons-why-you-need-it-monitoring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

