|By Hovhannes Avoyan||
|January 31, 2012 07:41 AM EST||
As we have discussed on the Monitis blog virtualization is one of the hottest IT subjects today.
One leader in this field is Citrix — with the XenServer product family. XenServer is the most known commercial implementation of of the open source Xen hypervisor. By the way, you should pronounced Xen like “zen.” It comes from a Greek word meaning “guest.”
In the IT world, Xen originated as a research project, led by Ian Pratt at England’s Cambridge University. It was first developed by XenSource Inc., and after acquisition, the work was continued by Citrix. Currently, you can choose between 4 editions of XenServer:
- XenServer [Free Edition]
- XenServer Advanced Edition
- XenServer Enterprise Edition
- XenServer Platinum Edition
Other Citrix “Xen” technology, like XenApp or XenDesktop, are not related to the original Xen project.
In 2009, Citrix decided to open the source of XenServer, and the company created XCP (Xen Cloud Platform). In the first phase, XCP was a whole Linux distribution. Recently, the initiative has been extended to provide XAPI toolstack on standard Linux distribution, in the first place for Debian and Ubuntu. What this means is that you can try XAPI on your home machine.
In the article below, we’ll learn how to apply daemon exporting XenServer metrics to Monitis. This is only proof of concept, but it can be easily modified to do exactly what you want. (This is the power you get using Monitis Open API).
There is a dedicated XenServer monitoring tool included in all paid editions. You can also find some third-party tools. Obviously, we are interested in how we can monitor XenServer and XCP with Monitis. One possible way is to enable SNMP on XenServer and treat it as a standard Linux in Monitis. After all, XenServer and XCP dom0 are based on CentOS. Another method that we are going to give an overview of today is XenServer/XCP-specific. XenServer enables you to download, host and store all VM statistic in a RRD (Round Robin Database) using HTTP handler. You can find some information on how to use XenServer RRD data in two documents from the Citrix Community page (Click here and here). In the second document, you’ll see that there are two examples of Python scripts that we are going to use for the base to our daemon updating XenServer monitors in Monitis. Both scripts use the python “rrd_update” module. You can also find on this on the Citrix page or grab it from github.
Monitis has dedicated libraries in many programing languages. You need to use python to export XenServer RRD; therefore to update results on Monitis, we are going to use the python library, too. The code can be obtained from our github repository. Please remember that you need the elementtree module, which is not a part of standard python distribution. Plus, you have to get it from the official website or obtain it from your distribution repository. There is a note about it in the code, but not in the original article.
Having these two weapons, we are now ready to attack. First, there is the example code in our git repository that you can install on XenServer or Linux distribution with XCP. Alternately, you can choose another server with a connection to both Monitis and the XenServer that you want to monitor. However, installing our daemon on XenServer/XCP seems to be the best choice.
Here are some easy directions:
1.) Create the Xen2Monitis default directory:
2.) Download the xen2monitis code which is part of Monitis-Linux-Scripts:
3.) Copy Xen2Monits file to default location:
cp Monitis-Linux-Scripts.git/Xen2Monits/* /var/local/lib/xen2monitis
4.) Go to created directory:
5.) Obtain the elementtree module:
- You can get the source code:
- Or you can get a dedicated package for your distribution. If you plan to use XenServer, the elementtree is already installed there.
6.) Install the elementtree (if not already done by your distribution)
- for source code (the last command as root):
tar -xzf elementtree-1.2.6-20050316.tar.gz cd elementtree-1.2.6-20050316 python setup.py install
7.) Next, add your API Key and Secret to a file. Please separate them with “,”.The default ‘secret file’ is /usr/local/xen2monitis/secret
8.) Add the xenserver root password to your secret file, so it should be similar to:
5DQQ0460S18ERNRNRUI7M905N1, 7MA9XJNDL3KAMBAKFR9981N04J, secret_password
9.) Now you can start the daemon:
10.) You need to wait few minutes. You can check if your script works without any problems in /var/log/xs2monitis.log.
11.) After a few minutes, you should have a bunch of new graphs that you can add to the Dashboard by Monitors->Custom Monitor menu.
Monitor Name Conventions
When you look at newly created monitor names, you might be a bit confused. The names tend to be very long and have a strange set of strings separated by ‘-’, for example:
lisbon – cpu1 (HOST: 0c1bb847-d867-75ff-27e0-7b468f1385f2)
Such name conventions were chosen to ensure the uniqueness of each monitor. Imagine that you have two VMs called “Win7″. Daemon would not be able to distinguish between them and would save all data into one monitor! To address it, XenServer UUID (universally unique identifier), what looks like set of strings separated by “-”, is added to each title.
Using xen2monitis.py script, please remember that there are some values you can define at the beginning of the file, for example:
- where is the secret file (default /usr/local/lib/xen2monitis/secret)
- where is the lock file (default /var/run/xen2monitis.pid)
- where is the log file (default /var/log/xen2monitis.log)
- the url to pool master (default http://localhost)
You might prefer not to use daemon, but, instead, call up script from cron job. It’s not a big problem. You need to copy the main loop, start after line 115 to separate the file and convert it.
We hope this article showing you how to monitor your XenServer with Monitis makes your IT life a lot easier. Please share some tips of your own!Share Now:
The cloud. Like a comic book superhero, there seems to be no problem it can’t fix or cost it can’t slash. Yet making the transition is not always easy and production environments are still largely on premise. Taking some practical and sensible steps to reduce risk can also help provide a basis for a successful cloud transition. A plethora of surveys from the likes of IDG and Gartner show that more than 70 percent of enterprises have deployed at least one or more cloud application or workload. Yet a closer inspection at the data reveals less than half of these cloud projects involve production...
Dec. 1, 2015 11:00 AM EST Reads: 513
Most of the IoT Gateway scenarios involve collecting data from machines/processing and pushing data upstream to cloud for further analytics. The gateway hardware varies from Raspberry Pi to Industrial PCs. The document states the process of allowing deploying polyglot data pipelining software with the clear notion of supporting immutability. In his session at @ThingsExpo, Shashank Jain, a development architect for SAP Labs, discussed the objective, which is to automate the IoT deployment process from development to production scenarios using Docker containers.
Dec. 1, 2015 11:00 AM EST Reads: 130
Countless business models have spawned from the IaaS industry – resell Web hosting, blogs, public cloud, and on and on. With the overwhelming amount of tools available to us, it's sometimes easy to overlook that many of them are just new skins of resources we've had for a long time. In his general session at 17th Cloud Expo, Harold Hannon, Sr. Software Architect at SoftLayer, an IBM Company, broke down what we have to work with, discussed the benefits and pitfalls and how we can best use them to design hosted applications.
Dec. 1, 2015 10:45 AM EST Reads: 126
Discussions of cloud computing have evolved in recent years from a focus on specific types of cloud, to a world of hybrid cloud, and to a world dominated by the APIs that make today's multi-cloud environments and hybrid clouds possible. In this Power Panel at 17th Cloud Expo, moderated by Conference Chair Roger Strukhoff, panelists addressed the importance of customers being able to use the specific technologies they need, through environments and ecosystems that expose their APIs to make true change and transformation possible.
Dec. 1, 2015 10:00 AM EST Reads: 576
Microservices are a very exciting architectural approach that many organizations are looking to as a way to accelerate innovation. Microservices promise to allow teams to move away from monolithic "ball of mud" systems, but the reality is that, in the vast majority of organizations, different projects and technologies will continue to be developed at different speeds. How to handle the dependencies between these disparate systems with different iteration cycles? Consider the "canoncial problem" in this scenario: microservice A (releases daily) depends on a couple of additions to backend B (re...
Dec. 1, 2015 09:00 AM EST Reads: 481
Container technology is shaping the future of DevOps and it’s also changing the way organizations think about application development. With the rise of mobile applications in the enterprise, businesses are abandoning year-long development cycles and embracing technologies that enable rapid development and continuous deployment of apps. In his session at DevOps Summit, Kurt Collins, Developer Evangelist at Built.io, examined how Docker has evolved into a highly effective tool for application delivery by allowing increasingly popular Mobile Backend-as-a-Service (mBaaS) platforms to quickly crea...
Dec. 1, 2015 08:00 AM EST Reads: 397
Too often with compelling new technologies market participants become overly enamored with that attractiveness of the technology and neglect underlying business drivers. This tendency, what some call the “newest shiny object syndrome” is understandable given that virtually all of us are heavily engaged in technology. But it is also mistaken. Without concrete business cases driving its deployment, IoT, like many other technologies before it, will fade into obscurity.
Dec. 1, 2015 08:00 AM EST Reads: 395
We all know that data growth is exploding and storage budgets are shrinking. Instead of showing you charts on about how much data there is, in his General Session at 17th Cloud Expo, Scott Cleland, Senior Director of Product Marketing at HGST, showed how to capture all of your data in one place. After you have your data under control, you can then analyze it in one place, saving time and resources.
Dec. 1, 2015 08:00 AM EST Reads: 251
The Internet of Things is clearly many things: data collection and analytics, wearables, Smart Grids and Smart Cities, the Industrial Internet, and more. Cool platforms like Arduino, Raspberry Pi, Intel's Galileo and Edison, and a diverse world of sensors are making the IoT a great toy box for developers in all these areas. In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists discussed what things are the most important, which will have the most profound effect on the world, and what should we expect to see over the next couple of years.
Dec. 1, 2015 06:30 AM EST Reads: 515
Growth hacking is common for startups to make unheard-of progress in building their business. Career Hacks can help Geek Girls and those who support them (yes, that's you too, Dad!) to excel in this typically male-dominated world. Get ready to learn the facts: Is there a bias against women in the tech / developer communities? Why are women 50% of the workforce, but hold only 24% of the STEM or IT positions? Some beginnings of what to do about it! In her Day 2 Keynote at 17th Cloud Expo, Sandy Carter, IBM General Manager Cloud Ecosystem and Developers, and a Social Business Evangelist, wil...
Dec. 1, 2015 05:00 AM EST Reads: 622
PubNub has announced the release of BLOCKS, a set of customizable microservices that give developers a simple way to add code and deploy features for realtime apps.PubNub BLOCKS executes business logic directly on the data streaming through PubNub’s network without splitting it off to an intermediary server controlled by the customer. This revolutionary approach streamlines app development, reduces endpoint-to-endpoint latency, and allows apps to better leverage the enormous scalability of PubNub’s Data Stream Network.
Dec. 1, 2015 05:00 AM EST Reads: 359
Apps and devices shouldn't stop working when there's limited or no network connectivity. Learn how to bring data stored in a cloud database to the edge of the network (and back again) whenever an Internet connection is available. In his session at 17th Cloud Expo, Ben Perlmutter, a Sales Engineer with IBM Cloudant, demonstrated techniques for replicating cloud databases with devices in order to build offline-first mobile or Internet of Things (IoT) apps that can provide a better, faster user experience, both offline and online. The focus of this talk was on IBM Cloudant, Apache CouchDB, and ...
Dec. 1, 2015 04:45 AM EST Reads: 458
I recently attended and was a speaker at the 4th International Internet of @ThingsExpo at the Santa Clara Convention Center. I also had the opportunity to attend this event last year and I wrote a blog from that show talking about how the “Enterprise Impact of IoT” was a key theme of last year’s show. I was curious to see if the same theme would still resonate 365 days later and what, if any, changes I would see in the content presented.
Dec. 1, 2015 03:00 AM EST Reads: 470
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical to maintaining positive ROI. Raxak Protect is an automated security compliance SaaS platform and ma...
Dec. 1, 2015 03:00 AM EST Reads: 469
The Internet of Things (IoT) is growing rapidly by extending current technologies, products and networks. By 2020, Cisco estimates there will be 50 billion connected devices. Gartner has forecast revenues of over $300 billion, just to IoT suppliers. Now is the time to figure out how you’ll make money – not just create innovative products. With hundreds of new products and companies jumping into the IoT fray every month, there’s no shortage of innovation. Despite this, McKinsey/VisionMobile data shows "less than 10 percent of IoT developers are making enough to support a reasonably sized team....
Nov. 30, 2015 03:00 PM EST Reads: 497
Just over a week ago I received a long and loud sustained applause for a presentation I delivered at this year’s Cloud Expo in Santa Clara. I was extremely pleased with the turnout and had some very good conversations with many of the attendees. Over the next few days I had many more meaningful conversations and was not only happy with the results but also learned a few new things. Here is everything I learned in those three days distilled into three short points.
Nov. 30, 2015 02:00 PM EST Reads: 375
As organizations realize the scope of the Internet of Things, gaining key insights from Big Data, through the use of advanced analytics, becomes crucial. However, IoT also creates the need for petabyte scale storage of data from millions of devices. A new type of Storage is required which seamlessly integrates robust data analytics with massive scale. These storage systems will act as “smart systems” provide in-place analytics that speed discovery and enable businesses to quickly derive meaningful and actionable insights. In his session at @ThingsExpo, Paul Turner, Chief Marketing Officer at...
Nov. 30, 2015 01:45 PM EST Reads: 442
DevOps is about increasing efficiency, but nothing is more inefficient than building the same application twice. However, this is a routine occurrence with enterprise applications that need both a rich desktop web interface and strong mobile support. With recent technological advances from Isomorphic Software and others, rich desktop and tuned mobile experiences can now be created with a single codebase – without compromising functionality, performance or usability. In his session at DevOps Summit, Charles Kendrick, CTO and Chief Architect at Isomorphic Software, demonstrated examples of com...
Nov. 30, 2015 01:45 PM EST Reads: 439
In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
Nov. 30, 2015 01:00 PM EST Reads: 542
In his General Session at 17th Cloud Expo, Bruce Swann, Senior Product Marketing Manager for Adobe Campaign, explored the key ingredients of cross-channel marketing in a digital world. Learn how the Adobe Marketing Cloud can help marketers embrace opportunities for personalized, relevant and real-time customer engagement across offline (direct mail, point of sale, call center) and digital (email, website, SMS, mobile apps, social networks, connected objects).
Nov. 30, 2015 12:45 PM EST Reads: 347