Skip to content

Lottabytes

Adventures in Enterprise Systems Management and Automation

  • My Gitlab
Lottabytes

Category: API

Deploying vRealize Log Insight (vRLI) via API

0
June 8, 2017

I’ve finally gotten around to upgrading the vRLI Configuration Management and Audit Tool to handle the full deployment process as well as clustering! Let’s take it for a spin to see what the new features allow us to do!

1. First we need to deploy the vRLI VMs from OVA that can be downloaded from my.vmware.com. Once they have been fully booted and you see them serving the following webpage we can start. You can close your browser at this point; nothing is required here other than we are checking to make sure that they are fully booted.

2. The tool uses a JSON configuration file that you can see a sample of by running the program with a “-d” flag or browsing the first part of the Python (my recommended approach). You can also generate a simplified version by calling the wizard using a “-b” flag. For now, I’m going to create my configuration file based on the sample in the documentation with a single Master Node under the “fqdn” key and 2 Secondary Nodes under the “nodes” key in my JSON file. This means that when the script is done I will have a new, 3 node vRLI Cluster.
Let’s kick off the program and tell it to use my configuration file by running:
python li-json-api.py -f  ctest.json -r

more “Deploying vRealize Log Insight (vRLI) via API”

API, automation, Configuration, Configuration Managenent, deployment, Log Insight, VMware, vRealize, vRLI

Log Insight Configuration API Audit and Standalone Remediation Tool – Updated!

0
July 1, 2016

For those of you who are interested I have updated the API based audit and remediation tool with a couple new features. After all, what is the use of automation if it isn’t user friendly?

1. Better error handling of remediation errors: In the past you would just get a message to the effect of “Something went wrong” but now the tool will pass the HTTP status code and Error Details from the Log Insight Server’s response to your remediation request. In the below example you can see this in action.

2. Now includes a wizard to help build a simplified JSON configuration file! Now, without having to create a single bit of JSON you can quickly get value from the tool. The wizard is simplified because let’s be honest, if you want the wizard you don’t want to answer 250 questions. Because of this some things are assumed/disabled. If you want them then you can simply add it to the code or use the template in the included docs (use the -d switch).

I hope that this helps you get started in seeing the value of using Configuration APIs to manage your Log Insight Servers!

API, automation, compliance, Configuration Managenent, Log Insight, Loginsight, VMware, vRLI

Setting vShield Edge Device Syslog via API

0
May 29, 2014

If you need to update your vSE devices to send traffic to a syslog server then you might be slightly disappointed to see that there are no instructions in the vCNS API guide to do this, especially if you have a bunch of edges. I experienced this same feeling today and am happy to say that now you don’t have to. Below are a quick couple scripts that will allow you to update single edges or a whole bunch at once using curl!

1. First off we need to get a list of our edge devices from the vCNS Manager. We will be using the edgeID acquired here to configure the syslog settings in a minute.

Get Edges

2. This list is a bit too much for our use so I’m going to parse it down to just the edgeID of all the devices.

vSE List

3. But I’m going to add them all to a text file (edges_test.txt) that I can parse later (code below):

curl -k -H “Authorization: Basic XXXXXXXXXXXXX” -X GET https://vsm.sub.domain.com/api/3.0/edges | xmllint –format – | grep “<id>edge-[0-9]*” | sed -n ‘s/<id>//p’ | sed -n ‘s/</id>//p’ > edges_test.txt

Now you have to make a decision, modify individual edges or all of them?

a. Let’s just edit one (MAKE SURE to set the edgeID in the below statement):

curl -k -H “Authorization: Basic XXXXXXXXXXXXX” -H “Content-Type: application/xml” -d ‘<?xml version=”1.0″ encoding=”UTF-8″?><syslog><enabled>true</enabled><protocol>udp</protocol><serverAddresses><ipAddress>XX.XX.XX.XX</ipAddress></serverAddresses></syslog>’ -X PUT https://vsm.sub.domain.com/api/3.0/edges/edge-282/syslog/config

b. Let’s edit them all! For this one I have a simple bash script that loops through the text file with all the edge devices and runs the curl statement against them.

Here’s the script:

while read edge; do
echo “Beginning Update on $edge”
curl -k -H “Authorization: Basic XXXXXXXXXXXXX” -H “Content-Type: application/xml” -d ‘<?xml version=”1.0″ encoding=”UTF-8″?><syslog><enabled>true</enabled><protocol>udp</protocol><serverAddresses><ipAddress>XX.XX.XX.XX</ipAddress></serverAddresses></syslog>’ -X PUT
https://vsm.sub.domain.com/api/3.0/edges/$edge/syslog/config
echo “Ending Update on $edge”
sleep 5s
done < edges_test.txt

Really simple but very effective!

start script

Now all that is left is to verify the results:

curl -k -H “Authorization: Basic XXXXXXXXXXXXX” -X GET https://vsm.sub.domain.com/api/3.0/edges/edge-282/syslog/config | xmllint –format –

Verify results

Have fun not having to use the UI 🙂

API, Edge, syslog, vCNS, VMware, vShield

About Me

My name is Caleb Stephenson, and I am a Sr. Cloud Reliability Engineer working on the Private Cloud Team at VMware and specializing in Systems Management and Automation. We make cloud computing happen at scale. If you have attended a VMworld since 2013 and taken a Hands-On-Labs or used HOL for another event, it is just one of the many things that we provide as a cloud provider.

I am a jack-of-all-trades and unfortunately, master at none. My various IT certifications over the years have included AWS Certified Solutions Architect – Associate,  VMware Certified Professional (VCP), Certified Scrum Product Owner (CSPO), ITIL-F, RHCSA (RHEL 7), MCSA 2003 and MCSE 2003. While I am an engineer, I am also the Product Owner for my team which means my career is a delicate balance of technical and managerial skills.

Everything on this blog should be considered mine personally and not representative of my employer. There may be stuff published here that is pertaining to VMware products or product issues/fixes or bits of code I wrote. My blog should be read just like any other blog and not as a representative of VMware in any way, shape or form.

Recent Posts

  • NFSv3 Usage and Audit Logging
  • EXEC useradd in Docker fills hard drive on host
  • Python Exception inside Try/Except Statement
  • Playing with Wavefront – Network Packet Loss
  • Playing with Wavefront – Missing Agents

Recent Comments

  • Caleb on Automatically Configure VMware Log Insight
  • Dan on Error Removing Host from vSphere
  • Caleb on Getting Fancy with Log Insight Alerting (aka. Monitoring DHCP pools via logs)
  • Caleb on Monitoring VMware vCenter Servers using HTTP Health checks
  • Karuna Yarlagadda on SSRS 2008 Domain User Issue

Archives

  • November 2018
  • August 2018
  • July 2018
  • December 2017
  • November 2017
  • October 2017
  • September 2017
  • June 2017
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • May 2016
  • March 2016
  • February 2016
  • December 2015
  • July 2015
  • July 2014
  • May 2014
  • March 2014
  • February 2014
  • November 2013
  • October 2013
  • August 2013
  • June 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • April 2012
  • March 2012
  • February 2012
  • November 2011
  • October 2011
  • August 2011
  • March 2011
  • February 2011
  • November 2010
  • October 2010
  • September 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • December 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009

Categories

  • .mp3
  • .vlcp
  • .wmv
  • 00000000000000d1
  • 0x8024402C
  • 2005
  • 2008
  • 29506
  • 5.5
  • 64bit VPN
  • 80072ee7
  • aag
  • Ac
  • Access is Denied
  • account
  • Acrobat
  • Active Directory
  • AD
  • Adobe
  • agent
  • agentless
  • alert
  • alwayson
  • analytics
  • ansible
  • API
  • Apple Mac XServer Cron Backup Windows File Server
  • APSB09-01
  • apt-get
  • ARP Poisoning
  • ASA
  • ASDM
  • audacity
  • Authentication
  • AutoDeploy
  • automation
  • availability group
  • Awesome
  • backup
  • BartPE
  • Bind
  • BitLocker
  • blinking folder with question mark
  • bluetooth
  • boot
  • bottleneck
  • bridge address-table
  • broken
  • bsod
  • Build
  • but no Image Profile is associated with it.
  • cannot display the page
  • Cannot open the Outlook Window
  • CDP
  • CentOS
  • cfapi
  • Change
  • chkdsk
  • Chuck Swindoll
  • CIM
  • Cisco
  • Cisco ASA 5510
  • cluster
  • cmd
  • Comparison
  • compliance
  • Configuration
  • Configuration Managenent
  • configure
  • Content Pack
  • converting
  • Crash
  • CSV
  • Custom Drivers
  • custom fact
  • database log
  • debugging
  • decrypting drive
  • deployment
  • detected corruption
  • DHCP
  • disable
  • dism
  • DN
  • DNS
  • Docker
  • does not have required permissions
  • Download
  • downtime.
  • Dr. Os Guinness
  • driver
  • drivers
  • DTS
  • ECM
  • Edge
  • error
  • Error: Enabling Active Directory failed
  • ESX
  • ESX Cluster
  • ESXi
  • ESXi 4
  • ethics
  • event viewer
  • exchange 2007
  • exhausted
  • Fails
  • FedEx
  • File DNS
  • find VM by MAC
  • finding rogue mac
  • firmware
  • fqdn
  • Freedom
  • FreeTDS
  • FTP
  • full
  • G7
  • get-vmhostadvancedconfiguration
  • GetDataBack for NTFS
  • Getting Started
  • Google Down
  • Government
  • guide
  • Hands On Labs
  • hangs
  • hangs on boot
  • Hardware
  • high CPU
  • History
  • Host
  • Host Profiles
  • HP
  • hung
  • hyperic
  • ID 57
  • identity source
  • IEESC
  • iLO driver
  • InetAddress Ping
  • InfluxDB
  • Install
  • Integrated
  • Integrity
  • IP-Pools
  • IPS
  • IPSec
  • iSCSI
  • Isolate
  • James
  • java
  • job
  • kb950772
  • kerberos
  • kernel
  • ldaps
  • License not available to perform the operation
  • linux
  • Linux Mint
  • log
  • Log Insight
  • log insight agent
  • Log Parsing
  • logging
  • Loginsight
  • logs
  • lust
  • Macbook
  • Make Availale Offline
  • McAfee
  • md5
  • Microsoft
  • mind
  • missing
  • missing public traffic
  • missing traffic
  • mntapi error: 176
  • module
  • Momentus XT
  • mon
  • monitoring
  • MSI
  • MSSQL
  • mssql. sql
  • multiple monitors
  • Nested 64bit
  • NetFN 0x36
  • NetGen
  • netio.sys
  • netios.sys
  • network
  • network adapter
  • new hire
  • ntbtlog.txt
  • Office12
  • Oops
  • Open Source
  • Openfiler
  • Orchestrator
  • Outage
  • Outlook 2007
  • P2V
  • password change
  • percent
  • performance issues
  • perl
  • plugins
  • pool
  • Postgres
  • PostgreSQL
  • PowerCLI
  • Powershell
  • PPTP
  • Process
  • Prometheus
  • proxy
  • Puppet
  • Puppet Master
  • purity
  • pymssql
  • python
  • reached target initrd default
  • reboot
  • recovery model
  • RedHat
  • removing bitlocker
  • replica
  • response traffic dropped
  • Review
  • RHEL
  • robocopy
  • routing
  • SCM
  • Script
  • Seagate
  • Security
  • selinux
  • serial
  • series
  • Serv-U
  • Server
  • server 2003
  • server 2008
  • Server 2012
  • services
  • set-vmhostadvancedconfiguration
  • sfc
  • sha-512
  • Sign-On and Discovery
  • simple
  • Socrates in the City
  • spn
  • SQL
  • SQL Management Studio Express
  • SS
  • ssl
  • sso
  • SSRS
  • SSRS 2008
  • svchost.exe
  • syslog
  • SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
  • target
  • theology
  • This host has been added to VC
  • time
  • tongue
  • troubleshooting
  • tsdb
  • tsql
  • Uncategorized
  • undionly.kpxe.vmw-hardwired
  • unexpected
  • uninstall drivers
  • Update DNS
  • UPS
  • US
  • used
  • user
  • vC
  • vCD
  • vcenter operations manager
  • vcloud director
  • vCM
  • vCNS
  • vCO
  • vcops
  • vCSA
  • VDR
  • vFabric
  • VIBs
  • Virtual
  • vm
  • VMware
  • VMware Configuration Manager
  • VMware Data Recovery
  • VMware HA
  • VMware vCenter Configuration Manager
  • VMworld 2013
  • VMworld2013
  • vpxd_servicecfg
  • vRealize
  • vRLI
  • vs
  • vShield
  • vSphere
  • W32/Wecorl.a
  • Wavefront
  • Web Client
  • Wecorl.a
  • Windows
  • Windows 7
  • Windows Authentication
  • Windows cannot access the specified device
  • Windows Server 2003
  • Windows Update Error
  • Windows User Account Control (UAC) restrictions have been addressed
  • WinFF
  • winrm
  • wireshark
  • won't boot
  • wordpress
  • workaround
  • x64
  • XFCE
  • XP
  • You do not have the Backup and Restore Files user rights
  • zenoss

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

WordPress Theme: Idealist

This site uses cookies: Find out more.