Posts

Showing posts with the label CentOS7

Export VMware data directly into Nagios

I ran into an issue the yesterday.  In our environment there is NO budget for deploying an enterprise class monitoring solution.  In this case the team had chosen to deploy Nagios.  Nagios is a pretty robust tool, but limited in what you can do on the web interface.  In addtion we had 200+ VM's that had yet to be added.  There are some handy web UI tools to manage the configuration scripts, but who has time for that.  I whipped up this handy PowerCLI script to pull all the live VM data from VCenter and export that data into a .CFG file ready for Nagios Core to use.  Feel free to download and share. You can copy and paste this right into your powerCLI interface once you connect to your VI Server. #Export VM Info into Nagios Ready Configuration Files $VMInfo = Get-Cluster "BladeServers" | get-vm | Select Name, @{N="IP Address";E={@($_.guest.IPAddress[0])}},PowerState New-Item c:\temp\windowsVms.cfg -ItemType file foreach ($vm in $VMInfo){ $os = get-vm $vm

Automate Server Patching with Puppet

Image
In this build I'm going to attempt to simplify the "How To" get puppet working with Windows via Chocolatey.  Sounds simple but it took me several days to get this working as I intended.  In addition I wanted to be able to manage puppet from a web UI.  After doing some research I chose to go with Foreman.   Server Side Build: Pick the right OS (for Forman!).   You can pick many OS version that support puppet, foreman however is a different story.   In this build I got to start over with the latest version of CentOS 7.  Install the OS and ensure that your DNS is setup correctly.  You need to be sure that the name of the server and the reverse name of the server match perfectly and it cannot be local host.  Foreman installer will fail if it is.  I named my server puppet.<mydomain> Open the ports that the software will need also: firewall-cmd --zone=public --add-port=443/tcp firewall-cmd --zone=public --add-port=8443/tcp firewall-cmd --zone=public