Tuesday, October 18, 2016

vCSA (vCenter Server Appliance) - Disk space monitoring



http://www.kanap.net/2014/11/vcsa-vcenter-server-appliance-part-3-advanced-customizing/

#!/bin/bash
 
# Please provide email for alert messages
email='my-email-recipient@mycompany.com'
# Please provide percentage threshold for PostgreSQL used disk space
thresh=80
 
# check that we're using PostgreSQL database
db_type=`cat /etc/odbc.ini | grep DB_TYPE | awk -F= '{print $2}' | tr -d ' '`
if [ "$db_type" != "PostgreSQL" ]; then
   exit
fi
 
if [ -z "$email" ]; then
   if [ ! -f /etc/vmware-vpx/root.email ]; then
      exit
   fi
   email=$(head -n 1 /etc/vmware-vpx/root.email)
fi
# identify PostgreSQL mount point
mount_point=`cat /etc/vmware-vpx/embedded_db.cfg | grep EMB_DB_STORAGE | awk -F"'" '{print $2}'`
# collect disk usage for the mount point
df_out=`df $mount_point | tail -n 1 | awk '{print strtonum($5)}'`
 
if [ $df_out -gt $thresh ]; then
   cat << HEREDOC | sendmail -t
To: $email
Subject: Storage Alert for MyvCSA - disk full!
From: vCenter Server Appliance disk usage <myvCSA_noreply@mycompany.com>
 
Hello!
 
Threshold of $thresh% for $mount_point is exceeded: $df_out%.
Consider extending your disk storage for $mount_point mount. Please refer to http://kb.vmware.com/kb/2056764 how to do that.
 
Regards,
my-vCSA's-name
HEREDOC
fi



Tuesday, October 4, 2016

Cisco Virtual Multi-Tenant Data Center Implementation Guide, Version 2.1

http://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Data_Center/VMDC/2-1/implementation_guide/vmdc21ImplementationGuide/implement.html

Nexus 1000v Log Collection



Nexus 1000v Log Collection

https://supportforums.cisco.com/document/85031/nexus-1000v-log-collection

Save Output From a Logged Session:
  • 1.     Start logging your SSH/Telnet session
  • 2.     From any command line level on the VSM:
        show tech-support svs | no-more
        show tech-support detail
  • 3.     The full tech-support output will be dumped to the screen, and sent to the log file created for the remote session
  • 4.     Stop logging of the session
  • 5.     Go to location of log file and provide to support engineer

Thursday, September 29, 2016

NEXUS 1000V - VSM Basic Configuration


Enable network−segmentation−manager and http−server
chrisb2−hyperv#
chrisb2−hyperv# configure terminal

Enter configuration commands, one per line. End with CNTL/Z.
chrisb2−hyperv(config)# feature network−segmentation−manager
chrisb2−hyperv(config)# feature http−server
chrisb2−hyperv(config)#

1. Create an IP pool for your VLAN. These are the IPs that you assign to your VMs. They need to be defined, but they are only used if SCVMM provides automation.
# nsm ip pool template VLAN124
# ip address 14.17.124.80 14.17.124.250
# network 14.17.124.0 255.255.255.0
# default−router 14.17.124.254

2.  Create a logical network. You only need one logical network unless you have something like a DMZ.
# nsm logical network chrisb2−CALO

3. Create a network segment pool. Make it a member of the logical network.
# nsm network segment pool chrisb2−RTP
# member−of logical network chrisb2−CALO

4. Create multiple segments, one for each access VLAN.
# nsm network segment pool chrisb2−RTP
# member−of logical network chrisb2−CALO

5. Create multiple segments, one for each access VLAN.
# nsm network segment chrisb2−124
# member−of network segment pool chrisb2−RTP
# switchport access vlan 124
# ip pool import template ip_pool_124
# publish network segment
# switchport mode access


6. Create a port−profile for the VMs. There is no need to access a VLAN here. Remember that the port−profile is simply a collection of policies.

# port−profile type vethernet defaultAccess
# no shutdown
# state enabled
# publish port−profile

7. Create a Network Segmentation Manager (NSM) uplink. The allow network segment pool command tells SVCMM that these segments are allowed out this uplink. This is needed for the host in order to see your segments.

# nsm network uplink UPLINK
# switchport mode trunk
# publish network uplink
# allow network segment pool chrisb2−RTP

8. Modify the created port−profile with any needed policies, such as port−channels.
# port−profile type Ethernet UPLINK
# channel−group auto mode on mac−pinning