<?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; Opsview</title>
	<atom:link href="http://labs.opsview.com/tag/opsview/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>Virtual Insanity: How To Remain Lean And Green</title>
		<link>http://labs.opsview.com/2012/01/virtual-insanity-how-to-remain-lean-and-green/</link>
		<comments>http://labs.opsview.com/2012/01/virtual-insanity-how-to-remain-lean-and-green/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 09:39:30 +0000</pubDate>
		<dc:creator>James Peel</dc:creator>
				<category><![CDATA[Green IT]]></category>
		<category><![CDATA[cloud monitoring]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=2106</guid>
		<description><![CDATA[
			
				
			
		With the likes of cloud computing and virtualisation starting to become staples for today’s business, IT environments are continuing to grow in complexity. Furthermore, there is growing pressure on many organisations to reduce the environmental impact of their IT systems.
In response to these developments, organisations need to change the way they manage and therefore monitor [...]]]></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%2F2012%2F01%2Fvirtual-insanity-how-to-remain-lean-and-green%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2012%2F01%2Fvirtual-insanity-how-to-remain-lean-and-green%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><strong><a style="font-weight: bold;" href="http://labs.opsview.com/wp-content/uploads/2012/01/green-it.jpg"><img class="size-full wp-image-2108 alignleft" style="margin-bottom: 8px; margin-right: 10px;" title="green-it" src="http://labs.opsview.com/wp-content/uploads/2012/01/green-it.jpg" alt="" width="175" height="117" /></a>With the likes of cloud computing and virtualisation starting to become staples for today’s business, IT environments are continuing to grow in complexity. Furthermore, there is growing pressure on many organisations to reduce the environmental impact of their IT systems.</strong></p>
<p>In response to these developments, organisations need to change the way they manage and therefore monitor their IT infrastructure. For example, with the advent of virtualisation, organisations now have a fundamentally different infrastructure platform from which they are running business systems. This in turn requires a different monitoring approach.<span id="more-2106"></span></p>
<p>If organisations can’t adapt their physical world approaches to monitoring, they could find that they aren’t made aware of systems problems until users start complaining about downtime.</p>
<p>When it comes to cloud they need to consider how they are going to monitor both the performance and use of cloud services. Finally, with it being unlikely that organisations will move all services to the cloud they need to find ways to monitor environmental factors such as the temperature of data centres and the CO2 emissions of IT.</p>
<p>This data will not only allow them to find ways to reduce energy costs, but also report back up the organisation when it comes to the environmental targets that have been set.</p>
<p>At the same time as being presented with an increasingly complex environment to monitor, IT departments are under pressure to dramatically reduce the cost of day to day operations. The result is a conundrum that requires new ways of thinking to solve.</p>
<h3>Taking The Pain Out Of Virtualisation</h3>
<p>Virtualisation has been utilised by many organisations looking to improve operational efficiency. Thus, with physical and virtual machines now present in many businesses, monitoring and managing both effectively is vital.</p>
<p>When implementing and monitoring virtualisation, businesses face a number of challenges – all of which add to the complexity of IT monitoring. Virtualisation allows you to improve server utilisation. Yet, when you increase the utilisation of a previously under-used server, it can be difficult to know how that server will manage the increased load.</p>
<p>Therefore, monitoring the performance of the VM host and all the virtual machines running on it is imperative otherwise organisations could find they suffer from performance slow downs or worse still, downtime. The problem is virtualisation doesn’t behave like, or conform to the same rules as physical hardware and therefore often traditional approaches to monitoring both infrastructure and applications don’t meet the grade.</p>
<p>You often find that the VM itself can be monitored, but there is no insight into what’s going on within it or into the applications it’s hosting.</p>
<p>A further challenge for a lot of organisations is staying on top of the growing sprawl of virtualisation, due to the ease of creating virtual machines. To date, this is something that many have struggled with using older proprietary IT monitoring and management tools.</p>
<p>To combat these potential issues, organisations need to update their approaches to IT monitoring. They need to use tools that can provide insight into virtualisation and that enables them to understand how every application on every virtual machine is running, what problems could occur and how they can be remedied.</p>
<p>Without this investment in IT monitoring, virtualisation will not bring the ROI expected and the increased complexity could in fact result in ongoing performance issues.</p>
<h3>Up In The Air – The Cloud Effect</h3>
<p>The acceptance of cloud computing has increased over the past few years. Now, the terms public, private and hybrid are understood by the majority of organisations, with data centre association Afcom citing that more than 70 per cent of UK businesses are already implementing cloud, or seriously considering it.</p>
<p>Adopting a cloud model allows businesses to move some applications and services off-premise, resulting in reduced costs, with less IT equipment required on-premise. However, cloud does potentially present a number of challenges when it comes to monitoring the overall performance of an organisation’s IT infrastructure.</p>
<p>With this in mind, organisations should start thinking about how they are going to monitor and assess cloud performance in the future, in order to guarantee IT performance. The difficulty at the moment is that there are not many standards around cloud when it comes to moving applications between public and private clouds, and consequently monitoring them.</p>
<p>Therefore, before choosing a monitoring tool, organisations need to ensure that the solution has the flexibility to adapt to any future changes once standards do eventually emerge.</p>
<p>Another challenge organisations should be looking out for as they begin to use cloud-based services, is that they could experience cloud sprawl. Although one of the benefits of the cloud model is that users can buy services on a pay-as-you-go basis, organisations will need to make sure they are controlling cloud deployments, as it can be very easy to continue paying for cloud services long after they have finished using them.</p>
<p>This is for the simple reason that people often forget to tell the cloud provider that they have finished using the service and therefore keep getting billed. Ultimately, businesses will need to have a consolidated view of all cloud services meaning they will then be able to monitor how much these are being used. This way, they can make sure they only pay for what they are actually using rather than paying for what they have deployed.</p>
<p><strong>Going Green Without Feeling Blue – Green IT Made Simple</strong></p>
<p>In addition to adopting new technologies or IT models to reduce costs, organisations are also under pressure to become greener. This pressure comes not just from the board as they look to achieve cost savings, but also through growing public and legislative pressure on them to reduce carbon emissions.</p>
<p>The UK Government has set a target of cutting CO2 emissions by 34% of 1990 levels by 2020. Businesses play a key part in this and the pressure is on to adhere to the new rules and regulations that aim to ensure we hit those targets.</p>
<p>The main challenge for many organisations however, is that they don’t know how much power is being consumed by their IT, especially as data centres are now often located away from an organisation’s main site. Organisations must be able to construct a better picture of energy usage in their data centres – building environmental factors into monitoring to identify areas where further energy savings can be made.</p>
<p>For example, organisations need to be able to tell when and where they can power down servers that are not in use. They also need to monitor data centre temperature very carefully – ensuring cooling systems are working efficiently and keeping their servers at optimum temperature.</p>
<p>Furthermore, IT monitoring can also help organisations build a picture to help them decide which old systems can be decommissioned if they are not performing sufficiently. Being green does not need to be difficult. The right tools will indicate the right processes to improve your environmental credentials without the need for more investment or even more IT complexity.</p>
<p>As the IT landscape continues to change, it is becoming increasingly clear that the monitoring tools and techniques that worked in the past simply don’t suit the modern environment. More flexibility and agility is needed in IT monitoring, while reducing the overall cost. Overall, IT monitoring can help organisations improve their business and environmental performance. The challenge is now to ensure they have the right tools and techniques in place to do this.</p>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h3>About the author</h3>
<p>James Peel is product manager at Opsview. He has over 12 years&#8217; experience in IT services and infrastructure management, with a focus on building data centres and developing automated monitoring and management systems.</p>
<p>Article first published in <a href="http://www.businesscomputingworld.co.uk/virtual-insanity-how-to-remain-lean-and-green/">Business Computing World, 12 Jan 2011</a></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2012/01/virtual-insanity-how-to-remain-lean-and-green/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring Apache Solr with Opsview</title>
		<link>http://labs.opsview.com/2011/12/monitoring-apache-solr-with-opsview/</link>
		<comments>http://labs.opsview.com/2011/12/monitoring-apache-solr-with-opsview/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 14:58:29 +0000</pubDate>
		<dc:creator>rbramley</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Grails]]></category>
		<category><![CDATA[Hudson]]></category>
		<category><![CDATA[JMX]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[System Management]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[agentless checks]]></category>
		<category><![CDATA[apache solr]]></category>
		<category><![CDATA[Lucene]]></category>
		<category><![CDATA[nrpe]]></category>
		<category><![CDATA[Opsview]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=2012</guid>
		<description><![CDATA[
			
				
			
		Apache Solr is an open source enterprise search service from the Lucene project. Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Tomcat.
Like any service or component in your architecture, you’ll want to monitor it to ensure that it’s available and gather performance data to [...]]]></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%2F12%2Fmonitoring-apache-solr-with-opsview%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F12%2Fmonitoring-apache-solr-with-opsview%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/solr.jpg"><img class="alignleft size-full wp-image-2027" title="solr" src="http://labs.opsview.com/wp-content/uploads/2011/12/solr.jpg" alt="monitoring Apache Solr" width="150" height="83" /></a><a title="Apache Solr" href="http://lucene.apache.org/solr/">Apache Solr</a> is an open source enterprise search service from the Lucene project. Solr is written in Java and runs as a standalone full-text search server within a servlet container such as Tomcat.</p>
<p>Like any service or component in your architecture, you’ll want to monitor it to ensure that it’s available and gather performance data to help with tuning.</p>
<p>In this post, we’ll look at how we can monitor Solr, what performance metrics we might want to gather and how we can easily achieve this with Opsview.</p>
<p><span id="more-2012"></span></p>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h2>Requirements</h2>
<ul>
<li>Installed version of Opsview <a title="Download Opsview" href="http://www.opsview.com/downloads">[download]</a></li>
<li>Apache Solr Custom Plugin <a title="Download Apache Solr Custom Plugin" href="https://github.com/rbramley/Opsview-solr-checks">[download]</a></li>
</ul>
</div>
<p><br /></p>
<h2>A check list for service checks</h2>
<p>Solr is built on Lucene so follows the same layout, an index contains documents that are comprised of fields. As part of the search service value add over Lucene, Solr provides a number of useful ways of obtaining health status / monitoring metrics:</p>
<ol>
<li>Health-check status using the <em>/admin/ping</em> handler</li>
<li>The admin statistics page <em>/admin/stats.jsp</em> (XML styled with XSL)</li>
<li><a href="http://wiki.apache.org/solr/SolrJmx">JMX MBeans</a></li>
</ol>
<p>The list of applicable checks could be defined by whether it is a health check or a data gathering check – but this would lead to a lot of overlap. Instead the list is divided into the checks that can be performed remotely (without an installed agent on the server) and those that are best performed locally to the Solr server.</p>
<h2>Remote (agent-less) checks</h2>
<p>What should we look for over the network?</p>
<p>Firstly we can have a host-level check which may perform a network level ping. Next we can check TCP connectivity to the servlet container port and then make an HTTP GET request to the Solr ‘front page’ and check for a known string (e.g. Welcome to Solr).</p>
<p>Now we’ve made it up to the application layer so can start to perform Solr specific checks.</p>
<p>Items to monitor may include (delete as applicable):</p>
<ol>
<li>Ping status</li>
<li>Number of docs</li>
<li>Number of queries / queries per second</li>
<li>Average response time</li>
<li>Number of updates</li>
<li>Cache hit ratios</li>
<li>Replication status</li>
<li>Synthetic queries</li>
</ol>
<h2>Agent-based checks</h2>
<p>Installing an <a title="Opsview Agents" href="http://www.opsview.com/downloads/opsview-agents">Opsview agent</a> on the Solr server means we can run additional checks over NRPE (Nagios Remote Plugin Executor). This could be operating system level checks such as memory/disk utilisation or CPU load, or the following:</p>
<ol>
<li>Java servlet container process is running</li>
<li>JMX checks e.g. heap memory or custom MBeans</li>
<li>File age</li>
<li>Log parsing for exceptions</li>
</ol>
<p>The Solr wiki describes how to configure JMX support: <a title="Configure JMX support" href="http://wiki.apache.org/solr/SolrJmx">http://wiki.apache.org/solr/SolrJmx.</a></p>
<h2>Opsview configuration</h2>
<p>For the rest of this article you&#8217;ll need to have <a title="Download Opsview" href="http://www.opsview.com/downloads">Opsview</a> installed (or the <a title="Opsview VMWare Appliance" href="http://www.opsview.com/downloads/opsview-3-vmware-virtual-appliance">Opsview VMWare appliance</a>) and have completed the <a title="Opsview Quick Start Guide" href="http://docs.opsview.com/doku.php?id=opsview3.14:quickstart">Quick Start.</a></p>
<h2>Solr-specific Plugin</h2>
<p>Install the Solr plugin at <a title="Opsview Solr Plugin" href="https://github.com/rbramley/Opsview-solr-checks">https://github.com/rbramley/Opsview-solr-checks</a> into /usr/local/nagios/libexec/</p>
<p>The check_solr plugin was developed using Perl, so that it could be contributed back to Opsview. It requires the CPAN XML::XPath module (sudo cpan -i XML::XPath).</p>
<p>The plugin includes usage instructions, check_solr -h which can also be viewed in Opsview by selecting the ‘Show Plugin Help‘ link beneath the Plugin drop down (see Figure 1). The -u option can be used to specify the URL path for multi-core set-ups.</p>
<h2>Service check setup</h2>
<p>Figure 1 gives an example of a service check configuration.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/figure_1_with_help.png"><img class="aligncenter size-full wp-image-2013" title="figure_1_with_help" src="http://labs.opsview.com/wp-content/uploads/2011/12/figure_1_with_help.png" alt="Opsview service check configuration." width="542" height="699" /></a></p>
<p>Figure 2 shows the <em>agentless</em> service check group with plugins and their arguments.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/solr-agentless-monitoring1.png"><img class="aligncenter size-full wp-image-2015" title="solr-agentless-monitoring" src="http://labs.opsview.com/wp-content/uploads/2011/12/solr-agentless-monitoring1.png" alt="solr agentless monitoring" width="500" height="252" /></a></p>
<h2>Host configuration</h2>
<p>Figure 3 shows a simplistic host setup with a ping check.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/set_up_host1.png"><img class="aligncenter size-full wp-image-2017" title="set_up_host" src="http://labs.opsview.com/wp-content/uploads/2011/12/set_up_host1.png" alt="set up host" width="500" height="596" /></a></p>
<p>Figure 4 is an extract from the <strong>Monitors</strong> tab, where we select the checks we want performed for the current host.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/monitors.png"><img class="aligncenter size-full wp-image-2018" title="monitors" src="http://labs.opsview.com/wp-content/uploads/2011/12/monitors.png" alt="monitors" width="288" height="226" /></a></p>
<h2>Viewing output</h2>
<p>The check results shown in Figure 5 are visible by navigating through the host group hierarchy.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/viewing-output.png"><img class="aligncenter size-full wp-image-2019" title="viewing-output" src="http://labs.opsview.com/wp-content/uploads/2011/12/viewing-output.png" alt="" width="500" height="192" /></a></p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/viewing-output.png"></a>If you click on the graph icon of <em>Solr Cache Hit Ratios</em> this will drill down onto the graph shown in Figure 6.</p>
<p>Clicking on the graph icon for <em>Solr Avg Response Time – standard</em> will take you to the graphs in Figure 7.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/cache_hit_ratios.png"><img class="aligncenter size-full wp-image-2021" title="cache_hit_ratios" src="http://labs.opsview.com/wp-content/uploads/2011/12/cache_hit_ratios.png" alt="cache hit ratios" width="500" height="209" /></a><a href="http://labs.opsview.com/wp-content/uploads/2011/12/avg_req_time.png"><img class="aligncenter size-full wp-image-2022" title="avg_req_time" src="http://labs.opsview.com/wp-content/uploads/2011/12/avg_req_time.png" alt="average request time" width="500" height="449" /></a></p>
<p>If you shutdown Solr, then the check results will start to turn critical and show in red as per Figure 8.</p>
<p><a href="http://labs.opsview.com/wp-content/uploads/2011/12/post-shutdown-alert.png"><img class="aligncenter size-full wp-image-2023" title="post-shutdown-alert" src="http://labs.opsview.com/wp-content/uploads/2011/12/post-shutdown-alert.png" alt="post shoutdown alert" width="500" height="197" /></a></p>
<h2>Alternatives</h2>
<p>There are a few other plugins available for monitoring Solr from Opsview, depending on your needs:</p>
<ul>
<li><a href="http://code.google.com/p/nagios-plugins-shamil/">http://code.google.com/p/nagios-plugins-shamil</a> – provides ping, replication status and num docs</li>
<li><a href="http://code.google.com/p/solr-nagios-check">http://code.google.com/p/solr-nagios-check</a> – provides QPS, response time and num docs</li>
</ul>
<p>Also, chapter 8 of the recently published <a href="http://www.amazon.co.uk/gp/product/1849516065/ref=as_li_ss_tl?ie=UTF8&amp;tag=leanjavaengi-21&amp;linkCode=as2&amp;camp=1634&amp;creative=19450&amp;creativeASIN=1849516065">Apache Solr 3 Enterprise Search Server</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=leanjavaengi-21&amp;l=as2&amp;o=2&amp;a=1849516065" border="0" alt="" width="1" height="1" /> book includes a section on Monitoring Solr Performance.</p>
<h2>Summary</h2>
<p>Using <em>check_solr</em> in conjunction with <a title="Opsview Open Source Monitoring" href="http://www.opsview.com">Opsview</a> allows you to  ensure that your Solr server is available and provides you with metrics  that can help you tune your Solr configuration.</p>
<p>This can be complemented  with additional agent-based operating system and JMX checks to give you  a full picture view.</p>
<div>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h3>About the Author</h3>
<p>Robin Bramley is a hands-on Technical Manager / Lead Architect at an Open Source software &amp; services company who has spent the majority of the last decade working with Java, mobile &amp; Open Source across sectors including Financial Services &amp; High Growth / start-ups. You can view Robin&#8217;s personal blog at <a href="http://leanjavaengineering.wordpress.com/">www.leanjavaengineering.com</a></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>
</div>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/12/monitoring-apache-solr-with-opsview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>5 Steps to Organising Your Server Monitoring with Attributes</title>
		<link>http://labs.opsview.com/2011/10/5-steps-to-organising-your-server-monitoring-with-attributes/</link>
		<comments>http://labs.opsview.com/2011/10/5-steps-to-organising-your-server-monitoring-with-attributes/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 11:13:55 +0000</pubDate>
		<dc:creator>brian.king</dc:creator>
				<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[business systems]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[ethernet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server monitoring]]></category>
		<category><![CDATA[servers]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=1278</guid>
		<description><![CDATA[
			
				
			
		It is often the case that hosts on your network will be similar, but differ in subtle ways depending on their exact purpose.  For example some servers may have two internal disks whilst some may have just one, and some servers may have multiple ethernet cards where others do not.  Opsview provides attributes [...]]]></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%2F5-steps-to-organising-your-server-monitoring-with-attributes%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F10%2F5-steps-to-organising-your-server-monitoring-with-attributes%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://labs.opsview.com/wp-content/uploads/2011/10/meta_data.jpg"><img class="alignleft size-full wp-image-1328" title="Gear Lever" src="http://labs.opsview.com/wp-content/uploads/2011/10/meta_data.jpg" alt="server monitoring | Opsview" width="128" height="157" /></a>It is often the case that hosts on your network will be similar, but differ in subtle ways depending on their exact purpose.  For example some servers may have two internal disks whilst some may have just one, and some servers may have multiple ethernet cards where others do not.  Opsview provides <em>attributes</em> to deal with situations like this, as they are a way of associating metadata with a host &#8211; here is an example of how to configure Opsview to use them.<span id="more-1278"></span></p>
<p>Let&#8217;s assume we have a Linux host that has three ethernet cards &#8211; <em>eth0</em>, <em>eth1</em> and <em>eth2</em>.  Rather than create three service checks which reference these interfaces explicitly, we&#8217;ll configure a single Interface Throughput check that will be duplicated for each network card that a host has.</p>
<p><strong>1. Create the attribute</strong></p>
<p>First we&#8217;ll create an attribute called &#8220;NIC&#8221; so that we can store this metadata against the host.  Go to <em>Advanced -&gt; Attributes -&gt; Actions -&gt; Create new attribute</em> and enter a name of <em>NIC</em>, then save it.</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/10/new_attribute1.png"><img class="aligncenter size-full wp-image-1276" title="new_attribute" src="http://labs.opsview.com/wp-content/uploads/2011/10/new_attribute1.png" alt="Server monitoring | new_attribute" width="510" height="249" /></a></p>
<p><strong>2. Define the attribute for one or more hosts</strong></p>
<p>Now that the attribute is known to the system, it can be applied to some hosts.  In this example, we edit the Linux host, and under the &#8220;Attributes&#8221; tab, add three entries all with a label of <em>NIC</em>, with the values <em>eth0</em>, <em>eth1</em> and <em>eth2</em>.</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/10/add-attribute-to-host.png"><img class="aligncenter size-full wp-image-1277" title="add-attribute-to-host" src="http://labs.opsview.com/wp-content/uploads/2011/10/add-attribute-to-host.png" alt="server monitoring | add-attribute-host" width="627" height="188" /></a></p>
<p><strong>3.  Create a service check which uses the attribute</strong></p>
<p>Now that we have some metadata about the host, we can create a service check that uses it.  The screenshot shows the configured service check &#8211; the &#8220;Multiple&#8221; prefix indicates that we have selected &#8220;NIC&#8221; as the value for <em>Create Multiple Services</em> under the Advanced section of the check configuration, and so at reload time Opsview will create three service checks, replacing <em>%NIC%</em> with each of the three values.</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/10/check-using-an-attribute.png"><img class="aligncenter size-full wp-image-1303" title="check-using-an-attribute" src="http://labs.opsview.com/wp-content/uploads/2011/10/check-using-an-attribute.png" alt="server monitoring | check attribute" width="646" height="80" /></a></p>
<p><strong>4.  Apply the new check to the host</strong></p>
<p>The check can either be applied directly on the <em>Monitors</em> tab of the host configuration, or using a <em>Host Template</em>.  Once the check has been applied, reload Opsview and navigate to the host status.  You should now see three services, one for each ethernet card that you have defined for the host.</p>
<p style="text-align: center;"><a href="http://labs.opsview.com/wp-content/uploads/2011/10/multiple-services-from-attribute.png"><img class="aligncenter size-full wp-image-1279" title="multiple-services-from-attribute" src="http://labs.opsview.com/wp-content/uploads/2011/10/multiple-services-from-attribute.png" alt="server monitoring | multiple-services-from-attributes" width="564" height="158" /></a></p>
<p><strong>5. Apply to more hosts</strong></p>
<p>This new service check can now be applied to any number of hosts you wish, and you simply need to define as many <em>NIC</em> attributes as you need for that particular host.</p>
<p>This example really just scratches the surface of how host attributes can help you better organise your <a href="http://www.opsview.com/learn/server-monitoring">server monitoring</a>. You can find out more about attributes on our <a title="Opsview Attributes" href="http://docs.opsview.com/doku.php?id=opsview-community:attribute&amp;s[]=attributes#">documentation site</a> and try it out for yourself by downloading <a href="http://www.opsview.com/downloads/download-opsview-community">Opsview Community Edition.</a></p>
<div style="border: 1px solid #ccc; background-color: #f5f5f5; padding: 8px;">
<h3>About the Author</h3>
<p>Neil Ferguson is Technical Manager at Opsview. Neil has been working with Opsview since the project began in 2006 and has carried out most of the largest installations in the UK, US and Europe.  Neil has a wealth of knowledge of working with network infrastructure and is also an experienced Linux/UNIX sysadmin.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/10/5-steps-to-organising-your-server-monitoring-with-attributes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Monitoring SNMP Traps from ESX hosts in Opsview (Part 2)</title>
		<link>http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-2/</link>
		<comments>http://labs.opsview.com/2011/10/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-2/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 13:09: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[debian]]></category>
		<category><![CDATA[ESX monitoring]]></category>
		<category><![CDATA[ESX4]]></category>
		<category><![CDATA[SNMP traps]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=1209</guid>
		<description><![CDATA[
			
				
			
		So you followed the steps in the previous post about enabling SNMP traps on ESX4. Now you probably want to pick those up by something useful. Opsview can be configured to handle the traps quite easily. Just follow the steps below and your server will be listening to those pesky traps. After that, you’ll need [...]]]></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-2%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-2%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/little_nipper_mouse_trap.jpg"><img class="alignleft size-full wp-image-1240" title="little_nipper_mouse_trap" src="http://labs.opsview.com/wp-content/uploads/2011/09/little_nipper_mouse_trap.jpg" alt="monitoring SNMP | Opsview" width="164" height="103" /></a>So you followed the steps in the <a href="http://labs.opsview.com/2011/09/monitoring-snmp-traps-from-esx-hosts-in-opsview-part-1">previous post</a> about enabling SNMP traps on ESX4. Now you probably want to pick those up by something useful. <a href="http://www.opsview.com">Opsview</a> can be configured to handle the traps quite easily. Just follow the steps below and your server will be listening to those pesky traps. After that, you’ll need to write a couple of service check handlers in Opsview to make sense of the traps. More on that later. This post is just about picking them up.<span id="more-1209"></span></p>
<p>This was done on an Ubuntu 10.04 LTS server. The steps are probably the same on Debian systems.</p>
<p>1. Make sure you have snmpd installed. If you don’t, install it! Easy as pie.</p>
<pre>aptitude install snmpd</pre>
<p>2. Edit /etc/snmp/snmpd.conf and uncomment “master agentx”.</p>
<p>3. Edit /etc/default/snmpd (or /etc/snmp/snmptrapd.conf on newer systems):</p>
<pre>TRAPDRUN=yes
TRAPDOPTS='-t -m ALL -M /usr/share/snmp/mibs:/usr/local/nagios/snmp/load -p /var/run/snmptrapd.pid'
SNMPDOPTS='-u nagios -Lsd -Lf /dev/null -p/var/run/snmpd.pid'</pre>
<p>4. Edit /etc/snmp/snmptrapd.conf and add the following lines:</p>
<pre>traphandle default /usr/local/nagios/bin/snmptrap2nagios
disableAuthorization yes</pre>
<p>Please note that this will make the server listen to and handle any SNMP traps it receives, regardless of source.</p>
<p>5. Restart snmpd and snmptrapd:</p>
<pre>/etc/init.d/snmpd restart</pre>
<p>6. Edit the /etc/sudoers file to allow Opsview to restart snmpd and snmptrapd:</p>
<pre>nagios ALL=NOPASSWD:/usr/local/nagios/bin/snmpd reload</pre>
<p>7. Test the permissions:</p>
<pre>su - nagios
sudo /usr/local/nagios/bin/snmpd reload</pre>
<p>8. Exit back to the root user and restart opsview-web:</p>
<pre>/etc/init.d/opsview-web restart</pre>
<p>That’s all. Opsview should now be able to handle traps sent to it.</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-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 easy steps to monitoring your ESX hosts using Opsview</title>
		<link>http://labs.opsview.com/2011/08/5-easy-steps-to-monitoring-your-esx-hosts-using-opsview/</link>
		<comments>http://labs.opsview.com/2011/08/5-easy-steps-to-monitoring-your-esx-hosts-using-opsview/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 13:16:47 +0000</pubDate>
		<dc:creator>tcallway</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ESX monitoring]]></category>
		<category><![CDATA[open source monitoring]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vSphere SDK]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=957</guid>
		<description><![CDATA[
			
				
			
		This post summarises the work involved to successfully monitor your ESX environment using Opsview and the vSphere SDK for Perl.
Prerequisites
Ensure you have the following:

1 x Opsview Master
1 x support account http://www.vmware.com/support/
Installation of  library libssl-devel

Step 1
Navigate and download the SDK Libraries that correspond to your OS Archictecture from http://communities.vmware.com/community/vmtn/developer/forums/vsphere_sdk_perl
Step 2
On the Opsview master run the [...]]]></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%2F08%2F5-easy-steps-to-monitoring-your-esx-hosts-using-opsview%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F08%2F5-easy-steps-to-monitoring-your-esx-hosts-using-opsview%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a href="http://labs.opsview.com/wp-content/uploads/2011/08/image004.jpg"><img class="alignleft size-full wp-image-1435" style="margin-bottom: 8px; margin-right: 10px;" title="image004" src="http://labs.opsview.com/wp-content/uploads/2011/08/image004.jpg" alt="" width="138" height="22" /></a>This post summarises the work involved to successfully monitor your ESX environment using Opsview and the vSphere SDK for Perl.<span id="more-957"></span></p>
<h2>Prerequisites</h2>
<p>Ensure you have the following:</p>
<ul>
<li>1 x Opsview Master</li>
<li>1 x support account <a href="http://www.vmware.com/support/">http://www.vmware.com/support/</a></li>
<li>Installation of  library libssl-devel</li>
</ul>
<h2>Step 1</h2>
<p>Navigate and download the SDK Libraries that correspond to your OS Archictecture from <a href="http://communities.vmware.com/community/vmtn/developer/forums/vsphere_sdk_perl">http://communities.vmware.com/community/vmtn/developer/forums/vsphere_sdk_perl</a></p>
<h2>Step 2</h2>
<p>On the Opsview master run the following commands:</p>
<pre>opsview@opsmstpr01:~$ sudo tar -zxvf VMware-vSphere-Perl-SDK-4.1.0-254719.x86_64.tar.gz
opsview@opsmstpr01:~$ sudo vmware-vsphere-cli-distrib/vmware-install.pl
Creating a new vSphere CLI installer database using the tar4 format.
Installing vSphere CLI.
Installing version 254719 of vSphere CLI
You must read and accept the vSphere CLI End User License Agreement to continue.
Press enter to display it.</pre>
<p>Accept the licence agreement and the default location to install the executable files [/usr/bin]</p>
<h2>Step 3</h2>
<p>Download and Install the nagios plugin check_esx3 from <a href="http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_esx3/details">http://exchange.nagios.org/directory/Plugins/Operating-Systems/*-Virtual-Environments/VMWare/check_esx3/details</a> to /tmp</p>
<h2>Step 4</h2>
<p>On the Opsview master as user nagios run the following commands:</p>
<pre>opsview@opsmstpr01:/tmp$ sudo chown nagios:nagios /tmp/check_esx3
opsview@opsmstpr01:/tmp$ cp /tmp/check_esx3 /usr/local/nagios/lib
opsview@opsmstpr01:/tmp$ sudo cp /tmp/check_esx3 /usr/local/nagios/libexec/</pre>
<h3>Examples</h3>
<p>On the Opsview master as the nagios user run the following tests for the VM server</p>
<pre>./check_esx3 -H $HOSTADDRESS$ -u root -p password -l cpu
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s list
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l io
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l mem -s usage
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l net
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s issues
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l runtime -s status
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l service
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l storage -s path
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l mem -s swap
./check_esx3 -H $HOSTADDRESS$ -u root -p password -l vmfs</pre>
<p>On the Opsview master as the nagios user run the following tests for any Guest VM on the server</p>
<pre>./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s con
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l cpu
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l io
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l mem -s usage
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l net
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s cpu
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s issues
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s mem
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s status
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l mem -s swap
./check_esx3 -H [IP of ESX Server] -u root -p [Password] -N [Guest VM] -l runtime -s tools</pre>
<h2>Step 5</h2>
<p>Create an Opsview service check and host templates. For more information see our <a href="http://docs.opsview.com">online documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/08/5-easy-steps-to-monitoring-your-esx-hosts-using-opsview/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to improve your web site&#8217;s performance and conversion rates using monitoring</title>
		<link>http://labs.opsview.com/2011/05/how-to-improve-your-web-sites-performance-and-conversion-rates-using-monitoring/</link>
		<comments>http://labs.opsview.com/2011/05/how-to-improve-your-web-sites-performance-and-conversion-rates-using-monitoring/#comments</comments>
		<pubDate>Fri, 06 May 2011 14:50:23 +0000</pubDate>
		<dc:creator>tcallway</dc:creator>
				<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[Selenium]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[online conversion rate]]></category>
		<category><![CDATA[user experience]]></category>
		<category><![CDATA[web performance]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=880</guid>
		<description><![CDATA[
			
				
			
		If you&#8217;re managing any web sites or web applications Selenium can be used with Opsview&#8217;s monitoring platform to ensure your customers get the very best user experience and increase your online conversion rates.
What is Selenium?
Selenium is a suite of tools to automate web application testing, it is also the 34th element in the periodic table. [...]]]></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%2F05%2Fhow-to-improve-your-web-sites-performance-and-conversion-rates-using-monitoring%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F05%2Fhow-to-improve-your-web-sites-performance-and-conversion-rates-using-monitoring%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a class="lightbox" title="Selenium - Periodic Table" href="http://labs.opsview.com/wp-content/uploads/2011/05/SeLogo.jpg"><img class="alignleft size-full wp-image-907" style="padding-right: 10px;" title="SeLogo" src="http://labs.opsview.com/wp-content/uploads/2011/05/SeLogo.jpg" alt="" width="79" height="100" /></a>If you&#8217;re managing any web sites or web applications Selenium can be used with Opsview&#8217;s monitoring platform to ensure your customers get the very best user experience and increase your online conversion rates.<span id="more-880"></span></p>
<h2>What is Selenium?</h2>
<p><a title="Selenium Website" href="http://seleniumhq.org/">Selenium</a> is a suite of tools to automate web application testing, it is also the 34th element in the periodic table. You can use the Selenium IDE to record web browser actions in the form of test cases. These test cases can be saved in a number of different formats and replayed when needed. The Selenium IDE is implemented as a Firefox extension.</p>
<h2>What is Opsview?</h2>
<p>Opsview provides comprehensive monitoring and management capabilities for a very wide range of web applications. Our Community Edition is free, easy to install and simple to use. More advanced features are available with Opsview Enterprise. <a href="http://www.opsview.com/learn/demos-tutorials">Check out our screencasts</a></p>
<h2>User Experience monitoring</h2>
<p>In 2001, Zona Research reported that 30% of surfers would abandon a Web site if it took more than 8 seconds to load, creating the widely-quoted ´8-second´ standard. Ten years later, with wide adoption of broadband services users become frustrated if sites take more than a couple of seconds to load.</p>
<p>Monitoring your web applications from an user&#8217;s perspective is vital for ensuring they get the best experience and allows you to get early warning of any application performance issues. You can use the Selenium IDE to record common paths through your web applications and the have Opsview replay these paths on a regular basis. Opsview will alert if any URLs fail to load in a pre-defined timescale or if the entire path takes too long to complete. These checks can be replayed from multiple locations (Opsview Slaves) to give you a complete picture of how your customers are experiencing the applications.</p>
<h2>End-to-end testing</h2>
<p>Using Selenium to perform end-to-end web application testing ensures that the whole system is being monitored in concert. This can be combined with individual component checks to provide a coherent overview of system performance and health. The Selenium IDE can be used to record transactions performed through the web applications. These are then replayed on a regular cycle to ensure the transaction completes successfully in a given timeframe. By replaying key transactions all components and sub-systems that comprise the application are exercised to ensure correct operation.</p>
<div id="attachment_885" class="wp-caption aligncenter" style="width: 310px"><a class="lightbox" title="selenium1" href="http://labs.opsview.com/wp-content/uploads/2011/05/selenium1.png"><img class="size-medium wp-image-885" title="selenium1" src="http://labs.opsview.com/wp-content/uploads/2011/05/selenium1-300x187.png" alt="Selenium in action" width="300" height="187" /></a><p class="wp-caption-text">Selenium in action</p></div>
<h2>Ten uses for Selenium with Opsview</h2>
<ol>
<li>Measure how your applications are performing for end-users</li>
<li>Keep tabs on your shopping cart / order processing application</li>
<li>Check that your landing page forms are working correctly</li>
<li>Confirm that web site authentication is working</li>
<li>Check that you&#8217;re not getting any pesky database errors</li>
<li>Track your cloud hosting provider&#8217;s performance against their SLA</li>
<li>Make sure your boss can get to his web mail account</li>
<li>Be the first to know that Opsview&#8217;s web UI is offline</li>
<li>Ensure your load balancer is working correctly</li>
<li>Get alerted if your homepage has been hacked</li>
</ol>
<h2>What next?</h2>
<p>Installation and configuration instructions can be found in Opsview&#8217;s <a href="http://docs.opsview.com/doku.php?id=thirdparty:selenium">documentation</a> along with instructions for downloading the selenium plugin.</p>
<p>Our recommended approach is to configure Selenium on an Opsview slave server, either by updating an existing slave or by deploying a new one. Selenium can place an appreciable load on your server so we recommend allocating another 1GB RAM. For heavy Selenium usage you should consider allocating an additional CPU core.</p>
<h2>Thanks</h2>
<p>Thanks to Alan Wijntje @ <a href="http://www.ziggo.nl/">Ziggo</a>, Rohit Deshmukh @ <a href="http://www.opsview.com/">Opsview</a> and Steve Burt @<a href="http://www.opsview.com"> Opsview</a> for their work on the Selenium plugin for Opsview and related documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/05/how-to-improve-your-web-sites-performance-and-conversion-rates-using-monitoring/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Managing security permissions for large teams in Opsview</title>
		<link>http://labs.opsview.com/2011/04/managing-security-permissions-for-large-teams-in-opsview/</link>
		<comments>http://labs.opsview.com/2011/04/managing-security-permissions-for-large-teams-in-opsview/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 10:34:10 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Catalyst]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[MSPs]]></category>
		<category><![CDATA[Nagios]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[System Management]]></category>
		<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[business systems]]></category>
		<category><![CDATA[multi-tenancy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=819</guid>
		<description><![CDATA[
			
				
			
		Hindsight is a wonderful thing.
In hindsight, Opsview would have always had access controls for objects at the role level &#8211; since roles also define which parts of the Opsview application you can get to, it would make sense to also put all the host and service objects into this definition.
(In our defence, we wanted to [...]]]></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%2F04%2Fmanaging-security-permissions-for-large-teams-in-opsview%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F04%2Fmanaging-security-permissions-for-large-teams-in-opsview%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a class="lightbox" title="img-secure" href="http://labs.opsview.com/wp-content/uploads/2011/04/img-secure.png"><img class="alignleft size-full wp-image-832" title="img-secure" src="http://labs.opsview.com/wp-content/uploads/2011/04/img-secure.png" alt="" width="168" height="168" /></a>Hindsight is a wonderful thing.</p>
<p>In hindsight, Opsview would have always had <a href="http://docs.opsview.com/doku.php?id=opsview3.12:access">access controls</a> for objects at the <a href="http://docs.opsview.com/doku.php?id=opsview3.12:role">role level</a> &#8211; since roles also define which parts of the Opsview application you can get to, it would make sense to also put all the host and service objects into this definition.</p>
<p>(In our defence, we wanted to make it as obvious as possible for a contact when you were changing access information.)</p>
<p>The downside of our design decision many years ago is that Opsview administrators who have lots of their users – or <a href="http://docs.opsview.com/doku.php?id=opsview3.12:contact">contacts</a> in Opsview terms – with the same sort of access and were having to change each user individually. This was painful and error prone if you had 40 &#8220;similar&#8221; users.<span id="more-819"></span></p>
<p>So <a href="http://www.opsview.com/products/opsview-enterprise">Opsview Enterprise 3.12.0</a> now has access information in the role definition. You change access at the role level and it automatically affects all users of that role. Even better, we ensure that a user&#8217;s notification profile only has references to the objects they are allowed &#8211; change the role definitions and object references will be <a href="http://docs.opsview.com/doku.php?id=opsview3.12:role#authorised_for_host_groups">automatically removed</a> from all aspects of that contact.</p>
<p>Now you can administer users in a much simpler way.</p>
<p>Hindsight &#8211; we wish we had more of it.</p>
<p>But the next best thing to hindsight &#8211; migratability.</p>
<h2>Migratability?</h2>
<p>The Opsview configuration database is <a href="http://www.ibm.com/developerworks/web/library/wa-dbdsgn2.html">normalised</a> and models the data as it is. Some application designers like to use key-value pairs to describe their data, which is nice from an expandable point of view, but rubbish when it comes to actually accessing that data in a meaningful way. When it comes to modelling our data, we model it &#8211; we don&#8217;t &#8220;meta-model&#8221; it.</p>
<p>We care a lot about people&#8217;s data because we build up a trust with our users that they can upgrade and bring their platform right up to date with the latest versions of Opsview. So we spend a lot of time getting the upgrade scripts just right.</p>
<p>If you are upgrading to Opsview 3.12, here&#8217;s what the upgrade scripts do:</p>
<ul>
<li>for each contact, it will see if this contact&#8217;s role has access information applied</li>
<li>if it hasn&#8217;t, it will use this contact&#8217;s access information to populate the role</li>
<li>if the role already has access information (from another contact), then it will compare all the current roles with their access information and if there is a match, this role is used</li>
<li>if it isn&#8217;t exactly the same, then a new role is created called &#8220;old role name &#8211; contact&#8221;</li>
</ul>
<p>So for example, let&#8217;s say you have 4 contacts &#8211; John, Paul, George and Ringo &#8211; all using the &#8220;Liverpool administrators&#8221; role.</p>
<p style="text-align: center;"><a class="lightbox" title="contact_list_preupgrade" href="http://labs.opsview.com/wp-content/uploads/2011/03/contact_list_preupgrade1.png"><img class="size-medium wp-image-821 aligncenter" title="contact_list_preupgrade" src="http://labs.opsview.com/wp-content/uploads/2011/03/contact_list_preupgrade1-300x129.png" alt="" width="300" height="129" /></a></p>
<p>The first three have their access information the same, but Ringo has missed out the <em>Production &#8211; Slicehost Servers</em> host group he should have had access to.</p>
<p style="text-align: center;"><a class="lightbox" title="ringo_config" href="http://labs.opsview.com/wp-content/uploads/2011/03/ringo_config.png"><img class="size-medium wp-image-818 aligncenter" title="ringo_config" src="http://labs.opsview.com/wp-content/uploads/2011/03/ringo_config-300x221.png" alt="" width="300" height="221" /></a></p>
<p>After the upgrade, the first three would still have the role of <em>Liverpool administrators</em>, but Ringo would have the role of a newly created <em>Liverpool administrators &#8211; ringo</em>. You could easily tell from this that Ringo should belong to the Liverpool administrators, so you can set him to this. Otherwise, maybe he is different after all, so you can rename the role to <em>Liverpool drummers</em>.</p>
<p style="text-align: center;"><a class="lightbox" title="contact_list_postupgrade" href="http://labs.opsview.com/wp-content/uploads/2011/03/contact_list_postupgrade.png"><img class="size-medium wp-image-822 aligncenter" title="contact_list_postupgrade" src="http://labs.opsview.com/wp-content/uploads/2011/03/contact_list_postupgrade-300x129.png" alt="" width="300" height="129" /></a></p>
<p>This means that most of the configuration for this new functionality is done for you automatically and you can think of your users in their role groups, rather than individually. Another step to making Opsview easier to use.</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/04/managing-security-permissions-for-large-teams-in-opsview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails alerts with jAlarms &amp; Opsview</title>
		<link>http://labs.opsview.com/2011/02/grails-alerts-with-jalarms-opsview/</link>
		<comments>http://labs.opsview.com/2011/02/grails-alerts-with-jalarms-opsview/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 08:30:00 +0000</pubDate>
		<dc:creator>rbramley</dc:creator>
				<category><![CDATA[Grails]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jalarm]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=773</guid>
		<description><![CDATA[
			
				
			
		This post is going to explore how we can raise application alarms from Grails applications into an enterprise monitoring solution such as Opsview. These are known as Passive checks, as opposed to Active checks where Opsview is actively polling to check the state of a service.
Let’s start off by describing the main building blocks that [...]]]></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%2F02%2Fgrails-alerts-with-jalarms-opsview%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F02%2Fgrails-alerts-with-jalarms-opsview%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><p><a class="lightbox" title="Jalarms Logo" href="http://labs.opsview.com/wp-content/uploads/2011/02/logo.png"><img class="alignleft size-full wp-image-781" style="margin: 0pt 10px 5px 0px;" title="logo" src="http://labs.opsview.com/wp-content/uploads/2011/02/logo.png" alt="" width="102" height="102" /></a>This post is going to explore how we can raise application alarms from Grails applications into an enterprise monitoring solution such as Opsview. These are known as Passive checks, as opposed to Active checks where Opsview is actively polling to check the state of a service.</p>
<p><span id="more-773"></span>Let’s start off by describing the main building blocks that we’ll be using (from source to sink):</p>
<p>1. <a href="http://www.grails.org">Grails</a> – a modern agile Open Source web framework with a rich plugin ecosystem that uses Groovy, the Spring Framework, Spring MVC and Hibernate.</p>
<p>2. <a href="http://jalarms.sourceforge.net/">JAlarms</a> – an Open Source framework for allowing Java developers to raise alerts from server applications (also available as a <a href="http://grails.org/plugin/jalarms">Grails plugin</a>)</p>
<p>3. <a href="http://jsendnsca.googlecode.com/">JSend NSCA</a> – an Open Source Java API that shields us from the underlying NSCA data format – described <a href="http://nagios.sourceforge.net/docs/3_0/passivechecks.html">here</a></p>
<p>4. NSCA daemon – the Nagios Service Check Acceptor, which allows applications to submit service check results to Nagios</p>
<p>5. <a href="http://www.opsview.com">Opsview</a> – an Open Source enterprise monitoring solution built on top of Nagios.</p>
<p>This post assumes you already have Opsview set up, with a host &amp; service check defined and that the service check can accept passive check results.</p>
<p>If not – see the <a href="http://docs.opsview.com/doku.php?id=opsview3.10:quickstart">Opsview quick start guide</a>.</p>
<h2>Opsview configuration</h2>
<p>We’ll start by ensuring that Opsview is configured so that it will accept remote NSCA service checks (I strongly suggest you use firewall rules to restrict access) and the encryption method is compatible with JSend NSCA (as it currently only supports NONE, XOR and TRIPLE_DES; Opsview supports about 20 algorithms with DES as the default).</p>
<p>1. Edit <em>/usr/local/nagios/bin/nagconfgen.pl</em> (as this script recreates the nsca.cfg when Opsview reloads configuration). The following diff shows the changes between the new file and the original file (<em>diff nagconfgen.pl nagconfgen.pl.bak</em>):</p>
<pre>3357,3358c3357
&lt; #server_address=127.0.0.1
&lt; server_address=0.0.0.0
---

&gt; server_address=127.0.0.1
3518c3517
&lt; decryption_method=3
---
&gt; decryption_method=2
3593c3592
&lt; encryption_method=3
---
&gt; encryption_method=2</pre>
<p>If you make Opsview reload the config – you’ll then see the new values in <em>/usr/local/nagios/etc/nsca.cfg</em></p>
<p>2. Restart opsview (as we’re binding differently):</p>
<p><em> /etc/init.d/opsview restart </em></p>
<h2>JAlarms</h2>
<p>JAlarms 1.5.2 features the addition of the NagiosPassiveCheckChannel contribution (<a href="https://github.com/rbramley/jalarms-opsview">https://github.com/rbramley/jalarms-opsview</a>) that I developed to integrate JAlarms with Opsview using JSend NSCA. <em>Note that the channel was downgraded from JSend NSCA 2.0.1 (as used in the Github code) to 1.3.1_2 so that the dependency could be sourced from the Maven central repository.</em></p>
<p><strong>NagiosPassiveCheckChannel</strong> requires the following settings:</p>
<ul>
<li><em>settings</em> – JSend NSCA NagiosSettings class</li>
<li><em>hostname</em> – this <strong>must</strong> match the hostname as configured in Opsview</li>
<li><em>sources</em> – a map of JAlarms source names to Opsview service check names (to allow for multiple jAlarms channels).</li>
</ul>
<h2>Setting up Grails jAlarms for Opsview</h2>
<p>Using the recently launched JAlarms plugin (courtesy of Hackergarten Mexico and Andres Almiray) – at the time of writing we’ll need to upgrade the version of jalarms from 1.5.1 to 1.5.2 and declare the JSend NSCA dependency.</p>
<p>1. “<em>grails install-plugin jalarms</em>“</p>
<p>2. Upgrade the jar to 1.5.2 (I built it from source)</p>
<p>3. Add the dependencies in <em>grails-app/conf/BuildConfig.groovy</em>:</p>
<p>Uncomment the repository:</p>
<p><code> </code></p>
<p><code>mavenCentral() </code></p>
<p>Add the following dependencies: <code> compile 'org.apache.servicemix.bundles:org.apache.servicemix.bundles.jsendnsca-core:1.3.1_2'</code></p>
<p><code> </code></p>
<p><code>runtime 'org.apache.servicemix.bundles:org.apache.servicemix.bundles.jsendnsca-core:1.3.1_2' </code></p>
<p>4. Set up the Spring beans &amp; configuration</p>
<p>For speed, I’ve included the configuration in <em>grails-app/conf/spring/resources.groovy</em> (ideally these would be per-environment in <em>Config.groovy</em>):</p>
<pre>import com.solab.alarms.channels.*
import com.googlecode.jsendnsca.core.*

beans = {
  nagiosSettings(NagiosSettings) {
    nagiosHost = '192.168.8.8'
    password = 'changeme'
    encryptionMethod = NagiosSettings.TRIPLE_DES_ENCRYPTION
  }

  channel(NagiosPassiveCheckChannel) {
    settings = ref(nagiosSettings)
    hostname = '192.168.8.16'
    sources = [Test:'Alfresco Share connection']
  }
}</pre>
<p><strong>Adding an alarm call</strong></p>
<p>The jAlarms Grails plugin injects a sendAlarm method into controllers &amp; services.</p>
<p>For ease of demonstration we’ll create a controller that always sends an alarm message:</p>
<pre>def index = {
  sendAlarm('Test application alert', 'Test') // msg, source
  flash.message = "Alarm sent"
  return
}</pre>
<p>Combined with a simple GSP and we get:</p>
<p><a href="http://leanjavaengineering.files.wordpress.com/2011/02/sent_alarm.png"><img class="alignnone size-full wp-image-234" title="sent_alarm" src="http://leanjavaengineering.files.wordpress.com/2011/02/sent_alarm.png?w=219&amp;h=160" alt="" width="219" height="160" /></a></p>
<p>If we look in Opsview, we see that the passive check has resulted in a critical state:</p>
<p><a href="http://leanjavaengineering.files.wordpress.com/2011/02/service_error_from_grails.png"><img class="alignnone size-full wp-image-235" title="service_error_from_Grails" src="http://leanjavaengineering.files.wordpress.com/2011/02/service_error_from_grails.png?w=500&amp;h=104" alt="" width="500" height="104" /></a></p>
<p>Hopefully that’s given you enough information to get started!</p>
<h3>About the author</h3>
<p>Robin Bramley is a Technical Architect at <a href="http://www.ixxus.com">Ixxus</a> and author of the <a href="http://leanjavaengineering.wordpress.com">LeanJavaEngineering</a> blog</p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/02/grails-alerts-with-jalarms-opsview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Next generation distributed monitoring, the Opsview way</title>
		<link>http://labs.opsview.com/2011/01/next-generation-distributed-monitoring-the-opsview-way/</link>
		<comments>http://labs.opsview.com/2011/01/next-generation-distributed-monitoring-the-opsview-way/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 10:50:01 +0000</pubDate>
		<dc:creator>tonvoon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Opsview]]></category>
		<category><![CDATA[distributed monitoring]]></category>
		<category><![CDATA[Nagios]]></category>

		<guid isPermaLink="false">http://labs.opsview.com/?p=751</guid>
		<description><![CDATA[
			
				
			
		One of Opsview&#8217;s great features is distributed monitoring, which we&#8217;ve had for over 5 years now. From the web user interface, you can assign hosts to a slave system and Opsview will take care of all the configuration work for you: from the slave configuration files, to the slave results sent to the master, to [...]]]></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%2F01%2Fnext-generation-distributed-monitoring-the-opsview-way%2F">
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Flabs.opsview.com%2F2011%2F01%2Fnext-generation-distributed-monitoring-the-opsview-way%2F&amp;style=normal&amp;b=2" height="61" width="50" />
			</a>
		</div><div id="attachment_765" class="wp-caption alignleft" style="width: 126px"><a class="lightbox" title="communityIcon" href="http://www.opsview.com/downloads/opsview-3-vmware-virtual-appliance"><img class="size-full wp-image-765   " style="margin: 0pt 10px 5px 0pt;" title="communityIcon" src="http://labs.opsview.com/wp-content/uploads/2011/01/communityIcon.png" alt="Opsview Community 3.11 - the next generation of distributed monitoring for free" width="116" height="116" /></a><p class="wp-caption-text">Opsview Community 3.11 - Free distributed monitoring</p></div>
<p>One of Opsview&#8217;s great features is distributed monitoring, which we&#8217;ve had for over 5 years now. From the web user interface, you can assign hosts to a slave system and Opsview will take care of all the configuration work for you: from the slave configuration files, to the slave results sent to the master, to the master configuration with freshness checking.</p>
<p>We do all the system integration work, so you don&#8217;t have to.</p>
<p><span id="more-751"></span>However, there are some limitations in our chosen technologies. We use <a href="http://nagios.sourceforge.net/docs/3_0/addons.html#nsca">NSCA</a>, which is the most <a href="http://nagios.sourceforge.net/docs/3_0/distributed.html">common method</a> in the Nagios&amp;reg; world, and while we&#8217;ve <a href="http://labs.opsview.com/tag/nsca/">made improvements</a> to it that have gone back upstream, there are some baked-in limitations:</p>
<ul>
<li>Only the first 511 bytes of plugin output was returned to the master, limiting the usefulness of the information you could display</li>
<li>Only the 1st line of data was returned, meaning you had to cram output together</li>
<li>NSCA communication used fixed size packets which were inefficient</li>
<li>While results were sent, Nagios would wait for completion, introducing a bottleneck</li>
<li>If there was a communication problem with the master, results were dropped</li>
</ul>
<p>Sometimes to move forward, you have to leave the past behind.</p>
<p>So we did that &#8211; we ripped out NSCA from Opsview&#8217;s slave communications and we&#8217;ve addressed every one of these limitations &#8211; and added a few nice extras too!</p>
<p>We&#8217;ve chosen <a href="http://code.google.com/p/nrd/">NRD</a> (Nagios Result Distributor) as our core technology. This is a library, written by one of our partners, <a href="http://capside.com/">CAPSiDE</a>. There are many reasons we chose this, but the top four are:</p>
<ul>
<li>It is based on perl, which is our language of choice</li>
<li>It has taken the test suite we developed for <a href="http://labs.opsview.com/2007/01/the-importance-of-being-earnestly-tested/">NSCA</a> and enhanced it, demonstrating a mature approach to code development</li>
<li>The client and server code is a thin shim over the libraries, which means you can easily create your own clients</li>
<li>We have a good relationship with CAPSiDE and they have given us access to their code repository</li>
</ul>
<p>We&#8217;ve spent some time understanding the core NRD code, enhancing it, fixing some issues and adding in some great new features. CAPSiDE have also released it on <a href="http://search.cpan.org/dist/NRD-Daemon/lib/NRD/Daemon.pm">CPAN</a> for wider consumption.</p>
<p>So Opsview&#8217;s new process for sending results from a slave is:</p>
<p style="text-align: center;"><a class="lightbox" title="NRD architecture" href="http://labs.opsview.com/wp-content/uploads/2011/01/NRD-architecture.png"><img class="size-medium wp-image-754 aligncenter" title="NRD architecture" src="http://labs.opsview.com/wp-content/uploads/2011/01/NRD-architecture-300x279.png" alt="" width="300" height="279" /></a></p>
<p>A couple of other amazing features we&#8217;ve squeezed in:</p>
<ul>
<li>A known Nagios limitation is the named pipe to submit results. We&#8217;ve overcome this by writing directly to the checkresults spool directory &#8211; this reduces a Nagios processing cycle on the Opsview master</li>
<li>We&#8217;ve implemented transactions in the results, so if the client has a failure communicating to the server, the client will back off and retry again in 5 seconds. This guarantees you do not have duplicated results</li>
<li>The nrd daemon on the master will dynamically add more servers as workload increases, thanks to the features of <a href="http://search.cpan.org/dist/Net-Server/lib/Net/Server.pod">Net::Server</a></li>
<li>As all communication between master and slaves is over a tunnelled SSH session, we&#8217;ve updated our Opsview check scripts to restart these tunnels if the slave is exhibiting communication errors</li>
</ul>
<p>With all this extra capabilities, you would think there is a cost in performance. But in fact, our testing shows that performance has got better!</p>
<p style="text-align: center;"><a class="lightbox" title="nrd performance table" href="http://labs.opsview.com/wp-content/uploads/2011/01/nrd-performance-table.png"><img class="size-medium wp-image-755 aligncenter" title="nrd performance table" src="http://labs.opsview.com/wp-content/uploads/2011/01/nrd-performance-table-300x62.png" alt="" width="300" height="62" /></a></p>
<p>(Based on sending 2016 results in a single transaction over an SSH tunnel from a slave to a master. Times measured on the client.)</p>
<p>This shows that we are getting an average 62% improvement in all aspects of slave communication back to the master!</p>
<p>We are thrilled we&#8217;ve added this major new functionality into Opsview and have taken distributed monitoring another huge step further over any of our competitors.</p>
<p>But the best thing is: this is available immediately with our Opsview Community 3.11 release. Install the VM, add a slave and you will get this new architecture setup as part of the process. And if you are an existing Opsview user, you get a silky smooth switch-over. We&#8217;ve done a lot of testing to ensure that as part of the upgrade, Opsview will automatically switch any slaves to this architecture and start sending results in the new NRD way.</p>
<p style="text-align: center;"><a title="Download Opsview VM Appliance" href="http://www.opsview.com/downloads/opsview-3-vmware-virtual-appliance"><img class="size-full wp-image-762 aligncenter" title="downloadNow_gb" src="http://labs.opsview.com/wp-content/uploads/2011/01/downloadNow_gb.png" alt="" width="197" height="42" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://labs.opsview.com/2011/01/next-generation-distributed-monitoring-the-opsview-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

