Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merging 0.99c #75

Merged
merged 28 commits into from
May 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ba79f71
Create VMware_Multi_VSAN_Monitor.json
rschitz Mar 27, 2016
677a75d
Update VMware_Cluster_FullStats.json
rschitz Apr 1, 2016
e5fc6fa
Update VMware_FlambX.json
rschitz Apr 1, 2016
ee0de35
Update VMware_FlambX.json
rschitz Apr 1, 2016
b719161
Create VMware_VSAN_AF_Monitor.json
rschitz Apr 4, 2016
bee2f2e
Update VsanPullStatistics.pl
rschitz Apr 8, 2016
2ed3508
Create PullGuestInfo.sh
rschitz Apr 18, 2016
450067a
Update VsanPullStatistics.pl
rschitz Apr 18, 2016
7107435
Update updateRunner.xml
rschitz Apr 18, 2016
2965534
Update sexigraf_version
rschitz Apr 18, 2016
69305f9
Added files via upload
rschitz Apr 18, 2016
d72aad0
Fix #66
vmdude Apr 18, 2016
f07c58c
Create VMware_VSAN_Space_Usage_Report.json
rschitz Apr 18, 2016
43fd019
Update PullGuestInfo.sh
rschitz Apr 18, 2016
b9e997b
Update VMware_VSAN_NAA_Latency.json
rschitz Apr 18, 2016
c8542c6
Update VMware_Cluster_FullStats.json
rschitz Apr 18, 2016
ee48953
Update PullGuestInfo.sh
rschitz Apr 20, 2016
6f93443
Update VsanPullStatistics.pl
rschitz Apr 23, 2016
e62e7a4
Update VMware_VSAN_Space_Usage_Report.json
rschitz Apr 23, 2016
9bdb2d0
Update ViPullStatistics.pl
rschitz May 12, 2016
1171253
Update VMware_VSAN_Space_Usage_Report.json
rschitz May 12, 2016
345e5e6
Fix #56
vmdude May 12, 2016
65bfbc7
Update updateRunner.php
vmdude May 12, 2016
37df73d
Create FreeNAS.json
rschitz May 12, 2016
10689c8
Create Windows.json
rschitz May 12, 2016
5bf6f90
Update updateRunner.xml
rschitz May 17, 2016
007afbb
Update VMware_VSAN_NAA_Latency.json
rschitz May 17, 2016
3ad0c59
Update updateRunner.xml
rschitz May 17, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/sexigraf_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.99b1 "Xen"
0.99c "Citadel"
50 changes: 50 additions & 0 deletions root/PullGuestInfo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash
#
GUESTINFO=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|xml_grep 'Kind' --text_only)

if [[ $GUESTINFO =~ "VMware ESXi" ]]; then

GUESTIP=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.ipaddress|awk -F'"' '{ print $4 }')
GUESTMASK=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.netmask|awk -F'"' '{ print $4 }')
GUESTGW=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.gateway|awk -F'"' '{ print $4 }')

if [[ $GUESTIP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && [[ $GUESTMASK =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]] && [[ $GUESTGW =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then

GUESTNS=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.dns|awk -F'"' '{ print $4 }')
GUESTDNS=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.domain|awk -F'"' '{ print $4 }')
GUESTNAME=$(/usr/bin/vmtoolsd --cmd "info-get guestinfo.ovfEnv"|grep guestinfo.hostname|awk -F'"' '{ print $4 }')

echo "auto lo" > /etc/network/interfaces
echo "iface lo inet loopback" >> /etc/network/interfaces
echo "allow-hotplug eth0" >> /etc/network/interfaces
echo "iface eth0 inet static" >> /etc/network/interfaces
echo " address $GUESTIP" >> /etc/network/interfaces
echo " netmask $GUESTMASK" >> /etc/network/interfaces
echo " gateway $GUESTGW" >> /etc/network/interfaces

if [[ $GUESTNS =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then

echo " dns-nameservers $GUESTNS" >> /etc/network/interfaces

fi

if [[ -n $GUESTDNS ]]; then

echo " dns-search $GUESTDNS" >> /etc/network/interfaces
fi


echo "127.0.0.1 localhost" > /etc/hosts
echo "$GUESTIP $GUESTNAME" >> /etc/hosts
echo "$GUESTNAME" > /etc/hostname

hostname $GUESTNAME

/etc/init.d/networking stop && /etc/init.d/networking start
/etc/init.d/resolvconf stop && /etc/init.d/resolvconf start

ifdown eth0 && ifup eth0

fi

fi
Loading