Creating “Maintenance Mode” for AHV using X-Play

In Prism Central 5.11 we got introduced to a new feature called X-Play. X-Play is essentially an IFTTT for Nutanix. It can do basic things like send reports on a schedule or send an alert, but it can also do some more advanced things. I wont go into all the other things it can do here, but there is a lot, and there is some flexibility to get a little creative.

As a longtime VMware admin, “Maintenance Mode” has become a staple in hypervisor management. The lack of an easy option for this in AHV was, honestly, a little frustrating.  Does AHV have “Maintenance Mode”, yes it does, but its part of the CLI, not the GUI. When I started looking at what X-play’s playbooks could do, it dawned on me that it might be able to close the gap between common tasks that can only be done through the CLI, right now.

How do we do this…

NTC 2020

Humbled once again to be accepted into the NTC Family. 2019 was a great year for Nutanix. I learned alot through the NTC program and look forward to another year of education and support by my fellow enthusiasts.

NTC 2019

Humbled to be added to the NTC family. Looking forward to sharing my experience, knowledge and challenges with more people in the community. I have had alot of fun this last year working with the numerous Nutanix employees and customers. Going to be a great year learning and implementing new products and services, running the DFW NUG and helping fellow IT community members. Thank You for your Support

Keep Calm and Automate

I recently went through training with Nutanix professional services for Calm. Nutanix’s answer/acquisition for blueprint-based deployments and automation. It went really well. My company has some specific use-cases for using something “like” Calm for Application/Service/VM provisioning. We have looked into other solutions like vRA, VMware’s flavor. I really like VMware’s products, however, it is a lot more expensive and honestly, a lot more complex to setup. That inst to say Calm is the most straight-forward, yet, but it is much easier.

Functional PowerShell with Slack

I have written this function out a few times. I have made it extremely simple and then went back and added some complexity. I have also run into a situation where I needed to write a tool that was widely used among users with Windows 7-10. So, I needed the tool to be compatible with PowerShell v2. This first function will not work with PowerShell v2 for a few different reasons. I will, however, post both functions.

function Send-ToSlack($channel, $message, $user, $heading=$null, $webhook)
{
    #Slack doesnt accept Arrays, so if it is an array, this converts it to a string
    if(($message -is [array]) -eq "True")
        {
            [System.Collections.ArrayList]$ArrayList = $message

            #Dont use the heading unless you are using an array as an input
            if($heading -ne $null)
                {
                    $ArrayList.Insert(0,$heading)
                    $ArrayList[0] = "*" + $ArrayList[0] + "*"
                    $ArrayList[0] += "`n>>>"
                }

            $message = $ArrayList | Out-String
            }

    #Bundle of information to send to slack
	$payload = @{
		channel   = $channel
		text	  = $message
		username  = $user
	}

    #Send Message via web request to slack        
	Invoke-WebRequest -Body (ConvertTo-Json -Compress -InputObject $payload) -Method Post -Uri $webhook | Out-Null
}

Read More for PowerShell v2 compatibility.

My new favorite PowerShell Tool: Slack

I have been using Slack for several years now. It is an excellent collaboration tool for teams. At its base, it is great for communicating with teammates. At another level it becomes an IT monitoring hub for alerts, metrics and tools. I have done customization with many different products, utilizing their “bots” to do basic tasks like project management and scheduling. I have configured Solarwinds, a complete infrastructure monitoring suite, to push alerts to multiple channels within Slack. This is a great benefit in an age where, as an IT professional, we get enough spam from co-workers, company announcements and vendors. Alternative notification is a must to stay agile.

PowerShell >= Screwdriver

“Always use the right tool!” I learned this early on in boy scouts, along with, “Work Smarter, not Harder!”.

Scripting and Automation are becoming the norm in IT. Every year it seems like I am writing 150% more scripts than I did the year before. As an engineer and not a programmer, it was somewhat frustrating for a long time. I was using phrases like, “No, we will need to contract someone”, “Does the dev team have time for that?”, “I am not a programmer” and “I don’t code!”. I hate saying ‘no’, when it comes to technology. I am a creative person, I like finding easier ways of doing things, making things more automated, or efficient. As long as I didn’t have to code to do it. I prided myself on finding these creative niches.

Welcome to my Blog

My name is Jarod Hallmark. I have been in IT for over 20 years. I have done everything from in-home/business support and repair, to retail tech support, help desk, administration, engineering, architecture, design and management.

In this blog i am planning on writing about IT best practice, scripting, and product reviews. I plan on focusing on a lot of practical articles that a lot of engineers and admins run into. I may be going back to the basics on many items, talking about common questions and methods.
Please feel free to leave productive comments. There are many, many ways to do the same thing in IT and there might be a better one than my way.

Thanks for visiting.
jH